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:
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. You can leave a response or trackback from your own site.|
No trackbacks yet.
about 2 years ago - 33 comments
Previously I wrote about using a Raspberry Pi to receive 433MHz signals from a WH1080 weather station. This is the mess of wiring I came up with: This worked fine until it stopped. I probably didn’t crimp a wire properly and too many knocks resulted in unreliable operation. To solve this I designed a PCB…
about 2 years ago - 3 comments
A couple of years ago I bought a WH1080 weather station (e.g. Fine Offset, Mapin). It’s available under many brands from many outlets all over the world and is very common. Here are pictures of what this cheap weather station looks like: I had the touchscreen connected to a Linux sever via USB and used…