Author Topic: Average wind direction  (Read 3437 times)

UncleBuck

  • Strong Breeze
  • ***
  • Posts: 114
    • IVICTORI276
    • Point Cook Weather
  • Station Details: Oregon WMR200, MAC OS X 10.10, WeatherCat V2
Average wind direction
« on: January 10, 2013, 11:57:15 PM »
I noticed this whilst I have been working on the Steel Series Gauges.

The wind we have been getting today has varied between about 315 deg and 045 deg but the average wind direction appears to be using the full 000 deg to 359 deg to work out its average.

The attached image may explain this a little better.

Col.

UncleBuck

  • Strong Breeze
  • ***
  • Posts: 114
    • IVICTORI276
    • Point Cook Weather
  • Station Details: Oregon WMR200, MAC OS X 10.10, WeatherCat V2
Re: Average wind direction
« Reply #1 on: January 11, 2013, 12:22:32 AM »
Actually ignore that last post.....

The gauges use two tags called "BearingRangeFrom10" and "BearingRangeTo10" which I have set as follows:

"BearingRangeFrom10":"STAT$WINDDIRECTION:MIN:SINCE9AM$",
"BearingRangeTo10":"STAT$WINDDIRECTION:MAX:SINCE9AM$",

This is resulting in the following entries going to the gauges realtime file because the wind is fluctuating around the 360 deg bearing today:

"BearingRangeFrom10":"0",
"BearingRangeTo10":"360"

This shows in the gauges to be an average of 180 deg (which makes sense).

This is where I need you help Stu.
Can you think of any way to get around this? My brain is a little fried on this so I am not sure if I should even be using these WC tags for the realtime tags.

Col.

P.S. Feed free to move this topic to another area if needed.

UncleBuck

  • Strong Breeze
  • ***
  • Posts: 114
    • IVICTORI276
    • Point Cook Weather
  • Station Details: Oregon WMR200, MAC OS X 10.10, WeatherCat V2
Re: Average wind direction
« Reply #2 on: January 11, 2013, 01:22:32 AM »
Yet another update on this and from what I have found this is NOT a WC problem so this topic may be best moved over to where the discussions are about the SS Gauges.

This is the official description of the tags in the realtime file:
<BearingRangeFrom10>   The 'lowest' clockwise bearing in the last 10 minutes rounded down to nearest 10 degrees
<BearingRangeTo10>   The 'highest' clockwise bearing in the last 10 minutes rounded down to nearest 10 degrees

This will cause a problem if the wind stays in the area of 045 deg to 315 deg as the gauges think the wind swung in a clockwise direction and hence draws the red background covering the entire face of the gauge rather than just from 315 deg to 045 deg.

Not sure just yet as to how this can be addressed.

Col.


WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Average wind direction
« Reply #3 on: January 11, 2013, 05:26:53 PM »
Hi Col,

The tags look very specific; I'm assuming the gauges code will have a way of determining how they should be used and drawn? If not there'll be the problem you identified.

I'll add them on to the list of required tags but we're going to have to get 1.1.3 out shortly for the 10.8.3 update, so will carry on work with these after that.

I'll get this thread moved to the web forum.

UncleBuck

  • Strong Breeze
  • ***
  • Posts: 114
    • IVICTORI276
    • Point Cook Weather
  • Station Details: Oregon WMR200, MAC OS X 10.10, WeatherCat V2
Re: Average wind direction
« Reply #4 on: January 11, 2013, 08:10:48 PM »
Thanks for that Stu.

I have found a way to get around the specificity if the tags by using the following:
"BearingRangeFrom10":"STAT$WINDDIRECTION:MIN:HRS(0.17)$",
"BearingRangeTo10":"STAT$WINDDIRECTION:MAX:HRS(0.17)$",

But as for the issue about a wind variation between 0 deg and 360 deg, I will be contacting the author to see what, if anything, can be done in the base code.

Col.

UncleBuck

  • Strong Breeze
  • ***
  • Posts: 114
    • IVICTORI276
    • Point Cook Weather
  • Station Details: Oregon WMR200, MAC OS X 10.10, WeatherCat V2
Re: Average wind direction
« Reply #5 on: January 13, 2013, 07:56:42 PM »
Stu,
I have been in touch with the author and asked for clarification regarding the Min and Max bearing:
Quote
I still don't see how the software (by that I mean Cumulus) can understand that 350 deg is lower than 0 deg.

For arguments sake, lets say the variation was from 355 deg to 11 deg. How would Cumulus know that 350 deg is the low value it should pass through and 10 deg is the high value?

As another example, what if the variation was from 274 deg to 94 deg? How does Cumulus know that the wind swung around through North or through South? In this example which would be high and which would be low?

The answer I got was as follows:
Quote
It uses the (calculated) average bearing. It knows that 355 is 'less' than 11 because it knows that the average bearing is north-ish rather than south-ish. Any readings in the half of the compass anticlockwise from the average are regarded as 'lower' values, and any in the other half of the compass are 'higher' values.
and
Quote
...yes as Steve says you would calculate the variation as a from-to pair of values that 'contains' the current average direction. For Davis sensors the variation is usually quite small and the from-to is obvious, not always so with the Fine Offsets.

Is this the same way that WC works out the Max and Min bearing values to use with STAT$WINDDIRECTION:MIN:HRS(0.17)$ and STAT$WINDDIRECTION:MAX:HRS(0.17)$

Col.


WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Average wind direction
« Reply #6 on: January 14, 2013, 05:22:28 PM »
Thanks Col - that makes sense, but the problem is the rounding down to the nearest 10 degrees; I'll add those tags to the list of needed things.