Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Possible problem with wind direction range web tags
- mcrossley
- Posts: 14388
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Possible problem with wind direction range web tags
Steve
I just noticed my wind gauge, over 'longer than' the last 10 minutes the wind speed has been varying between zero and not a lot, but the average is non-zero. The wind direction has been constant at 135 degrees. But the range from/to10 tags are reading 310-320, which is 180 degrees out?
From the realtime file:
"BearingRangeFrom10":"310","BearingRangeTo10":"320"
I just noticed my wind gauge, over 'longer than' the last 10 minutes the wind speed has been varying between zero and not a lot, but the average is non-zero. The wind direction has been constant at 135 degrees. But the range from/to10 tags are reading 310-320, which is 180 degrees out?
From the realtime file:
"BearingRangeFrom10":"310","BearingRangeTo10":"320"
You do not have the required permissions to view the files attached to this post.
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Possible problem with wind direction range web tags
I suspect it's connected with the zero wind speeds, which of course never happens here. I was outside just now, thinking how amazingly calm and quiet it was, and it's actually F2.
The contents of the <#wspddata> and <#wdirdata> (and <#nextwindindex>) tags would be useful, and whether or not you have 'use bearing zero when calm' set. I don't know when I'll get chance to look at this, though.
Edit: But I see you're now completely becalmed as far as the average goes, so it'll need to be when it manifests itself again, obviously.
The contents of the <#wspddata> and <#wdirdata> (and <#nextwindindex>) tags would be useful, and whether or not you have 'use bearing zero when calm' set. I don't know when I'll get chance to look at this, though.
Edit: But I see you're now completely becalmed as far as the average goes, so it'll need to be when it manifests itself again, obviously.
Steve
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Possible problem with wind direction range web tags
Actually, I think you probably have, and I think this is the reason for the problem. I'll have to have a think about what to do about that.steve wrote:whether or not you have 'use bearing zero when calm' set
Steve
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Possible problem with wind direction range web tags
I've been thinking about this some more, and I think 'use bearing zero when calm' is a red herring, because the 'range' code uses the 'raw' bearing. But it must be something to do with what happens when it's calm.
Steve
- mcrossley
- Posts: 14388
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Possible problem with wind direction range web tags
Correct, I did not capture the wind arrays at the time -if I notice it again I will.steve wrote:Actually, I think you probably have
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Possible problem with wind direction range web tags
I'll try to do some experimenting when I get chance, with my WMR200, whose anemometer is sitting on a desk, so I can easily get zero wind speeds from it.
Steve
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: Possible problem with wind direction range web tags
BTW Mark - why does the compass gauge use N for calm ?
......................Imagine, what you will KNOW tomorrow !
- mcrossley
- Posts: 14388
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Possible problem with wind direction range web tags
Well actually I use 000 for calm and 360 for Nbeteljuice wrote:BTW Mark - why does the compass gauge use N for calm ?
-
gemini06720
- Posts: 1700
- Joined: Mon 10 Aug 2009 10:16 pm
- Weather Station: No weather station
- Operating System: No operating system
- Location: World...
Re: Possible problem with wind direction range web tags
Mark, rather than completely removing the pointer (which I would not want), how about 'dimming' (or changing) the colour of the pointer? The pointer would still be pointing at 000° (or 360° depending how you look at it) and be either semi-transparent (if that is possible) or of a lighter colour.mcrossley wrote:The only other thing I can think of is to not draw the pointer at all?
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: Possible problem with wind direction range web tags
Or perhaps truncate the pointer to quarter length (just prove there is data but it's lying
)
Re. <#webtags>, I don't know which logic you presented to Steve in the end, but as far as I can see if a 0deg reading were given for calm that would simply increase the vector difference, it wouldn't give the magic 180deg shift with the correct vector difference ?
Re. <#webtags>, I don't know which logic you presented to Steve in the end, but as far as I can see if a 0deg reading were given for calm that would simply increase the vector difference, it wouldn't give the magic 180deg shift with the correct vector difference ?
......................Imagine, what you will KNOW tomorrow !
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Possible problem with wind direction range web tags
I'll post my code later, then we can have a group debugging session 
Steve
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: Possible problem with wind direction range web tags
Here's the beteljuice 'rough guide'
Javascript logic - a little psuedo code
Javascript logic - a little psuedo code
Code: Select all
// ------- Variable Wind check -------------------------
/* from METAR coding
* if direction varies by 60 deg or more and speed greater than 6 knots,
* a Variable wind direction group is reported (eg. 180V240), otherwise omitted.
* If wind direction is variable and speed 6 knots or less,
* replace wind direction with VRB followed by wind speed in knots.
*
* This emulates that to provide 'degFrom', 'degTo', and 'vectorSize' variables
*
* METAR wind degrees are rounded to nearest 10 - we work 'normal'
* I am assuming the last 10 min. although some dialogues suggest 2 min.
*
* Also I can find no info on the ORDER of the 180V240 deg. ie. 60 deg clockwise or 300 deg anti-clockwise ?
* So I am assuming (and coded) to read 'clockwise' (ie. 1st figure could be larger than 2nd.)
* eg 330V030 would be 60 deg 'around' North, 150V240 would be 90 deg 'around' South.
*
*/
/* Philosophy
* Get last 10 mins worth of CURRENT wind direction degrees
* Compare each with CURRENT AVG wind direction degrees to get a + / - 'offset'
* add (absolutely) the max 'offsets' to get wind 'vector' size
*/
/* Prerequisites: - names are for easy reference / substitution
*
* windDeg10 - an array containing the last 10 minutes of current / now wind DIRECTIONS in degrees
* windVarAvg - the CURRENT 10 minute average wind DIRECTION in degrees
*
* wind_kts_ave - could be any CURRENT AVERAGE SPEED unit, used (or maybe not) to give alternate output
*/
windVar_temp_degDiff = new Array(); // new array to store deviation from CURRENT average
windVarCount = windDeg10.length;
// step through 10min values, calculate the differences to CURRENT avg and populate a new array
y = 0; // initialise windVar_temp_degDiff[] pointer
for(x = 0; x < windVarCount; x++) { // go through 10min values
// work out difference between 'then' current and 'now' 10 min average
// Cumulus, in common with some other softwares, returns 0 degrees if zero wind speed
// if this is true for the 10min array then at this point you need to do a check and 'jump' to next 'x' to be safe
// if required - if(windDeg10[x] == 0) 'jump' check here
degDiff_temp = windDeg10[x] - windVarAvg;
if(degDiff_temp >= 180) {
degDiff_temp = degDiff_temp -360;
} else {
if(degDiff_temp <= -180){
degDiff_temp = degDiff_temp +360;
}
}
windVar_temp_degDiff[y] = degDiff_temp;
y++; // increment new array pointer
// if required - END 'jump' check
} // END 10min step through, new Array windVar_temp_degDiff has been populated with difference to average
// find (plus / minus) deviation extremes - arrayMax() and arrayMin() are 'invented' functions
degHi = arrayMax(windVar_degDiff); // positive values, might NOT be initially, if the (wx) avg period has not been completed ;-)
degLo = arrayMin(windVar_degDiff); // negative values, might NOT be initially, if the (wx) avg period has not been completed ;-)
// Belts 'n' Braces - Lo must be lower or equal to avg, Hi must be higher or equal to avg
if(degLo > 0) {degLo = 0;}
if(degHi < 0) {degHi = 0;}
// so now we have the max +/- deviation with respect to CURRENT average direction
// Now workout max 'vector' size !!
vectorSize = degHi + Math.abs(degLo);
// FINALLY - workout logical from > to values eg. 350 15 would be straddling North
// average SPEED check is optional, you may also decide eg. a vectorSize < 10 is irrelevant ? - upto you
if(wind_kts_ave > 0) { // need to build output as [from to]
degFrom = windVarAvg + degLo;
if(degFrom < 0){degFrom = 360 + degFrom;}
degTo = windVarAvg + degHi; //
if(degTo > 360){degTo=degTo-360;}
}else{ // NORMAL - I choose to o/p ave, but it could be null or current
// *** PUT ALTERNATIVE VALUES HERE !!! *************
}// END if average SPEED
// END Variable Wind
// So now you have degFrom, degTo, and vectorSize all in integer degrees available for 'output'
......................Imagine, what you will KNOW tomorrow !
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Possible problem with wind direction range web tags
Yes, I've seen that, Mark posted his and yours in the enhancement request. 'My' code uses part of yours, part of Mark's, and a light sprinkling of my own. This is probably why there's a bug in it 
Steve
- mcrossley
- Posts: 14388
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Possible problem with wind direction range web tags
It's happening again, and there are zero wind speeds. Unfortunately I am still at work and cannot RDP in to the server until I get to the hotel and out from behind our corporate proxy server.
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Possible problem with wind direction range web tags
At least that confirms that zero wind speeds cause the problem. I haven't had chance to experiment yet.
Steve