Conversion degress ---> english direction wind. **solved**

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

Post Reply
Luca02
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Wed Nov 04, 2020 3:50 pm

Conversion degress ---> english direction wind. **solved**

Post by Luca02 »

Hi,

Is it possibile to convert wind direction in normal meteobridge from degrees to english directions text? I'm not so good in html language and variables... thank you so much for help :D

PS Another question: how i can convert from UTC to local clock time?
User avatar
wvdkuil
Platinum Boarder
Platinum Boarder
Posts: 606
Joined: Sun Jul 24, 2011 8:00 pm
Location: Belgium
Contact:

Re: Conversion degress ---> english direction wind

Post by wvdkuil »

Luca02 wrote: Wed Nov 04, 2020 4:19 pm Hi,

Is it possibile to convert wind direction in normal meteobridge from degrees to english directions text? I'm not so good in html language and variables... thank you so much for help :D

PS Another question: how i can convert from UTC to local clock time?
Check this : https://www.meteobridge.com/wiki/index.php/Templates
endir converts a wind direction into one of 16 English direction texts.
wind0dir-act=endir

Default a Meteobridge returns the timestamps not in UTC but in your local time as you set your local timezone,
"Timestamps are strings of format "YYYYMMDDhhmmss".
You have to set it to =utc to get an utc timestamp.

Wim
Luca02
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Wed Nov 04, 2020 3:50 pm

Re: Conversion degress ---> english direction wind

Post by Luca02 »

Hi Wim,

thank you so much for help, but i notice something wrong on my website page.

Meteobridge report a gust from SE, but on my website it is reported from E, also SW becomes W.

This is the variable expressed: [wind0dir-act=endir.1:—]

How can i fix?
User avatar
wvdkuil
Platinum Boarder
Platinum Boarder
Posts: 606
Joined: Sun Jul 24, 2011 8:00 pm
Location: Belgium
Contact:

Re: Conversion degress ---> english direction wind

Post by wvdkuil »

Luca02 wrote: Wed Nov 04, 2020 7:55 pm Hi Wim,

thank you so much for help, but i notice something wrong on my website page.

Meteobridge report a gust from SE, but on my website it is reported from E, also SW becomes W.

This is the variable expressed: [wind0dir-act=endir.1:—]

How can i fix?
The .1 makes it one position returned.

Better use [wind0dir-act=endir:--]
After the : it is the value returned if there is no value available, such as with a broken wind-device.

Wim
Luca02
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Wed Nov 04, 2020 3:50 pm

Re: Conversion degress ---> english direction wind. **solved**

Post by Luca02 »

Thank you so much Wim! sorry for the stupid question
Post Reply