Interesting Tech Projects
WH1080 Weather Station Wind Vane
I think the jury is still out on the wind vane that comes with WH1080 weather stations (e.g. Fine Offset, Mapin). Some people claim it works fine when placed high up away from any buildings, trees or other obstructions. Many people complain that it is just not reliable regardless. It doesn’t help that the weather stations come with a short pole.
From watching the vane it seems one of the issues is when the wind is gusty. I’ve noticed that when a gust ends the vane becomes destabilized and simply spins around and around.
For me it is simply not feasible to locate the vane on the chimney so I wondered if adding software filtering to my weather station code might work.
pywws already contains wind direction averaging for hourly summaries so I thought it would give that a try. Here is how the wind direction data looked a few days ago before adding averaging to the code:
The top part shows the wind speed and gusts. The bottom shows the wind direction. As you can see it is hard to see any pattern beyond the wind coming from the south, east or north.
Here is the wind direction data today after adding the averaging:
Much better. It is clear the wind was coming out of the west. While the above data was being captured I could see the vane swinging from north to south all the time, so it is pretty nice that the averaging was able to pick out the correct wind direction.
As previously mentioned the algorithm was taken from pywws, but with a couple of changes added. It works as follows:
- When the receiver starts it collects a new wind vector every 48 seconds. The vector consists of the wind direction and average speed. This comes directly from the weather station transmitter.
- While the receiver is collecting the first 16 wind vectors it reports the current wind direction to Weather Underground. So for the first 12.8 minutes (16 x 48 seconds) after reset the wind direction is not averaged.
- Once 16 wind vectors have been collected the receiver starts averaging the wind direction and reporting the average to Weather Underground. Every 48 seconds when new data is received the oldest wind vector is overwritten. So the receiver always has the last 16 wind vectors to work with.
- The latest 16 wind vectors are converted into weighted vectors. There is one vector for each compass point direction and the size of each vector is the sum of the average wind speeds measured coming from that direction. This method ensures the result favors directions where stronger winds came from.
- Using some trigonometry the average wind direction is calculated.
- In the situation where there is no wind for all 16 wind vectors (so no wind for 12.8 minutes) then the last average wind direction is used.
The code can be obtained from github.
Print article | This entry was posted by Andy on June 10, 2014 at 1:49 pm, and is filed under Linux, Software Engineering. Follow any responses to this post through RSS 2.0. Both comments and pings are currently closed. |
Comments are closed.
about 8 years ago
“The jury is still out” WRONG! The bearing seizes up after the oil seeps out in hot weather. This affects the wind vane & the anemometer [wind speed detector].
about 8 years ago
Well clearly I was referring to the data performance in my post. Regarding the mechanics – I wouldn’t expect a dirt cheap weather station to handle high temperatures. I live in a moderate climate and mine has been working fine for five years. YMMV. You could always disassemble it and replace the bearing with a higher performance one of the same size – takes 30 seconds and probably only a few dollars. At a minimum you could repair it and put it back into service.