Here is the answer. I figured it out.
Click this link
Weather Synopsis
Moderator: Mattk
Re:Weather Synopsis
Station: Davis Vantage Pro2 Plus
Hardware: Raspberry Pi 2 (Meteohub status)
Hardware: Raspberry Pi 2 (Meteohub status)
Re:Weather Synopsis
This a great script you wrote. I have it on my site now but converted it to PHP using a Joomla Module. I have it at http://n7acm.com/weather-summary
Re:Weather Synopsis
Looking good!
Station: Davis Vantage Pro2 Plus
Hardware: Raspberry Pi 2 (Meteohub status)
Hardware: Raspberry Pi 2 (Meteohub status)
-
- Fresh Boarder
- Posts: 8
- Joined: Sat Jan 24, 2009 12:49 pm
Re:Weather Synopsis
Well done great work for the wind so I have resolved '
// wind
var wtxt="";var b="";
var wn=(Math.round([last15m_wind0_speed_mph:-]));
if (wn<1){b="vento calmo "}
else if (wn>=1 && wn<=3){b=" vento quasi calmo "}
else if (wn>=4 && wn<=7){b=" vento leggero "}
else if (wn>=8 && wn<=12){b=" brezza tesa "}
else if (wn>=13 && wn<=17){b=" vento moderato "}
else if (wn>=18 && wn<=24){b=" vento teso "}
else if (wn>=25 && wn<=30){b=" vento sostenuto "}
else if (wn>=31 && wn<=38){b=" vento forte "}
else if (wn>=39 && wn<=46){b=" vento molto forte "}
document.write(b,"da");
// winddir
var b="";
var wn=(Math.round([last15m_wind0_maindir_deg:-]));
if (wn>=337 && wn<=22){b="Nord. "}
else if (wn>=23 && wn<=68){b=" Nord Est. "}
else if (wn>=69 && wn<=112){b=" Est. "}
else if (wn>=113 && wn<=157){b=" Sud Est. "}
else if (wn>=158 && wn<=202){b=" Sud. "}
else if (wn>=203 && wn<=247){b=" Sud Ovest. "}
else if (wn>=248 && wn<=292){b=" Ovest. "}
else if (wn>=293 && wn<=336){b=" Nord Ovest. "}
document.write(b);
// wind
var wtxt="";var b="";
var wn=(Math.round([last15m_wind0_speed_mph:-]));
if (wn<1){b="vento calmo "}
else if (wn>=1 && wn<=3){b=" vento quasi calmo "}
else if (wn>=4 && wn<=7){b=" vento leggero "}
else if (wn>=8 && wn<=12){b=" brezza tesa "}
else if (wn>=13 && wn<=17){b=" vento moderato "}
else if (wn>=18 && wn<=24){b=" vento teso "}
else if (wn>=25 && wn<=30){b=" vento sostenuto "}
else if (wn>=31 && wn<=38){b=" vento forte "}
else if (wn>=39 && wn<=46){b=" vento molto forte "}
document.write(b,"da");
// winddir
var b="";
var wn=(Math.round([last15m_wind0_maindir_deg:-]));
if (wn>=337 && wn<=22){b="Nord. "}
else if (wn>=23 && wn<=68){b=" Nord Est. "}
else if (wn>=69 && wn<=112){b=" Est. "}
else if (wn>=113 && wn<=157){b=" Sud Est. "}
else if (wn>=158 && wn<=202){b=" Sud. "}
else if (wn>=203 && wn<=247){b=" Sud Ovest. "}
else if (wn>=248 && wn<=292){b=" Ovest. "}
else if (wn>=293 && wn<=336){b=" Nord Ovest. "}
document.write(b);