Page 1 of 1

Trouble with Wind Speed

Posted: Fri 21 Jan 2022 3:31 pm
by bort483
Just another query if I may...

We've had a couple of windy days here, so naturally I've been paying close attention to the wind data on the template. I've noticed the recorded wind speed seems to get stuck for quite a period of time...so right now it's 5.6km/h and it's been that way for some minutes without change. The same was happening earlier in the day when it was quite blustery on & off..but the template would show the one wind speed reading for quite some time. My internal Cumulus readings are as they should be - they vary with the breeze, up, and down, but on the template it appears to always be stuck at something like 5.6km/h, 11.1km.h etc, and now it's stuck on 6 km/h. Obviously I don't expect it to record and upload the wind speed for every single second but is it normal to see it stuck on certain values for 5+ minutes? I tried setting var wind = convertWind(realtime[5]); to var wind = convertWind(realtime[6]); as I saw in another thread but it made no difference.

Thanks in advance.

Re: Trouble with Wind Speed

Posted: Fri 21 Jan 2022 6:18 pm
by saratogaWX
The Windspeed displayed comes from two sources, both produced by CumulusMX

When the page first loads, the PHP displays the value of

Code: Select all

$avgspd = $WX['wspeed'];
from CUtags.php via CU-defs.php.

When the AJAX script (ajaxCUwx.js) starts execution, the data comes from realtime.txt as uploaded by CumulusMX. Looks like you're uploading every 10 seconds.
The current windspeed (with the stock ajaxCUwx.js script) uses field

Code: Select all

var wind = convertWind(realtime[5]);
which is the wind speed (average) <#wspeed> to match what the PHP displays. You can use

Code: Select all

var wind = convertWind(realtime[6]);
which would use the latest windspeed <#wlatest> instead.

I don't know what the period used to average windspeed in <#wspeed>/realtime[5] is, but it's likely to be 1 to 5 minutes.. Mark can say for certain.

In any case, the website simply reports what data is available from CumulusMX uploads of CUtags.php and realtime.txt