Template with weather trends for pas 24 hours

Definitions of graphs you want to share with us

Moderator: Mattk

Post Reply
User avatar
WS Grave
Expert Boarder
Expert Boarder
Posts: 103
Joined: Fri Oct 30, 2009 3:42 pm
Location: Grave - the Netherlands
Contact:

Template with weather trends for pas 24 hours

Post by WS Grave »

Hey guys, I've made a template for a table with the weather for the past 24 hours. See code below. The wind is shown in knots. Does anyone know how to change that to km/h ?

Visit my website and click in the menu on "Verleden weer". See the table at the bottom.

Image

/edit:
The code messed up the screen.
Now you can download the template.
User avatar
WS Grave
Expert Boarder
Expert Boarder
Posts: 103
Joined: Fri Oct 30, 2009 3:42 pm
Location: Grave - the Netherlands
Contact:

Re:Table with weather trends - how to convert knots to km/h?

Post by WS Grave »

You can download the txt-file and rename it to trend.html and put it in the graph direcotry of Meteohub. [file name=trend.txt size=10376]http://www.meteohub.de/joomla/images/fb ... /trend.txt[/file]
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re:Template with weather trends for pas 24 hours

Post by skyewright »

WS Grave wrote:The wind is shown in knots. Does anyone know how to change that to km/h ?
Using _kmh in place of _kn doesn't seem to work with these variables (maybe because they were designed with WDL support in mind) but you can do use the template maths functions to apply a multiplier, e.g:

{math* [seqhour1_wind0_gustspeed_kn@1] 1.852}
User avatar
WS Grave
Expert Boarder
Expert Boarder
Posts: 103
Joined: Fri Oct 30, 2009 3:42 pm
Location: Grave - the Netherlands
Contact:

Re:Template with weather trends for pas 24 hours

Post by WS Grave »

That works great Sky :)
Do you have a way to translate the wind direction degrees to N-W-S-E ?

/edit:
Attached file is with km/h [file name=trend-18820097b1e6d278542810e643cba4e0.txt size=10585]http://www.meteohub.de/joomla/images/fb ... cba4e0.txt[/file]
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re:Template with weather trends for pas 24 hours

Post by skyewright »

WS Grave wrote:Do you have a way to translate the wind direction degrees to N-W-S-E ?
Sorry, I don't have a neat trick for that.

Probably a case for a bit of javascript (or php if you use php)?
wfpost
Platinum Boarder
Platinum Boarder
Posts: 591
Joined: Thu Jun 12, 2008 2:24 pm
Location: HONSOLGEN
Contact:

Re:Template with weather trends for pas 24 hours

Post by wfpost »

skyewright wrote:
WS Grave wrote:Do you have a way to translate the wind direction degrees to N-W-S-E ?
Sorry, I don't have a neat trick for that.

Probably a case for a bit of javascript (or php if you use php)?
well, always, but I would be happy if Boris could implement additional IF..THEN operators with the already existing logic of meteohub;)
Post Reply