|
Post by gb0101010101 on Apr 6, 2019 15:59:06 GMT -8
I noticed the that wind vane bounces around a lot and the data it produces is not very useful. I added some calculations to figure out the overall bearing from a sample size of 6 data points over 30 seconds (5 second update interval). This use polar vector to add up the wind speed and direction and then determine the overall bearing and distance (effective wind speed). This uses a rolling data array so updates are provided every 5 seconds for the past 30 seconds of data.
In the pic you see the original values in blue and the average bearing in green.
Forgot so much about trigonometry! Had to do a quick refresher. Wrote a small generic class for it that should work to provide smoothing on all weather readings. Getting better in C++ but its still painful. Think it came out pretty good. You can almost see if the vane rotates around a full circle. Attachments:
|
|
|
Post by SDL on Apr 7, 2019 12:14:54 GMT -8
Makes absolute sense!
BP
|
|
|
Post by loquin on Jun 17, 2019 15:13:26 GMT -8
Am curious - when looking at the raw signal, have you seen an increase in the noise when the wind vane is pointing at the anemometer, or 180° away from the anemometer?
With both instruments at the same level, and with the close proximity of the two instruments, you might expect to see turbulence, introduced by the anemometer cups to affect the wind direction vane.
In commercial units, the two always appear to be at a different level, with the vane typically at a higher level.
|
|
|
Post by SDL on Jun 20, 2019 8:01:17 GMT -8
We haven't noticed that but the effect might very well be there. It's going to be small, but statistically you should be able to pick it up with enough data.
BP
|
|
david
Junior Member
Posts: 95
Raspberry Pi: Yes
|
Post by david on Jun 22, 2019 6:48:56 GMT -8
Hi gb0101010101 This is very interesting. I have a question and a request. Question: What are you using to create the graph you show? Request: Can you post a copy or a link to the class code you wrote to do this? David
|
|