Calculate wind vector-direction

I have been in the business of software for electronic weather stations for nearly 20 years now
So I do know a thing or two :sunglasses:

3 Likes

This is the Wikipedia reference I use whenever it comes to averaging circular quantities:

I can never remember the exact expression for the average off the top of my head!

you need to use vectors
i.e using sin and cos
as like Gary Funk showed
but even better is too weight that vector with the windspeed

1 Like

I prefer my math vector-less.
:hugs:


I don’t do Math often, but when I do, I use Vectors!
Stay Mathy, my friends.

3 Likes

10 posts were split to a new topic: The ol’ guys and coding skills from way way back :wink:

A post was merged into an existing topic: The ol’ guys and coding skills from way way back :wink:

It is weighted. Look closer at the formula.

just wondering where these two lines are good for, atan2(y,x) is almost the same as atan(y/x) so multiplying both with the same number is kind of pointless. isn’t it?

Those two lines get the average.

But atan2(10,20) is the same as atan2(1,2), so it’s not needed.

Okay. Try it both ways and see for yourself.

It doesn’t matter too much, I was just curious about how you calculated it. But those two lines are redundant. Atan((ya) /(xa)) is independent of the value of a ( unless a is zero). atan2 is just a fancy, better way of calculating this.

@peter Here is thread with the formula to calculation for average wind direction.

1 Like

That formula looks correct but still I’m getting a very suspicious amount of northerly winds when the average windspeed in 1 minute is low but not zero. My sky is in powersave.

What if you rotated the SKY by 90 degrees or so to see if you still get “northerly winds?”

I would, but I’m already happy I managed to put up once. Going up twice for this test is a bit much, but it would help to diagnose of it was a software or hardware /firmware.

Mine are really quite easy to reach. I have both my permanent one and mobile one within a couple of feet of each other with the permanent one about three feet above the other. Look at the wind graphs from 10/10/2018 at around 7pm and see if the data looks similar to what you are seeing. If so, I could go up and turn one of the units and see what the results are like.

E Kelso: https://smartweather.weatherflow.com/station/5075/graph/15788/wind/2
SKY%20-%20Roof
Mobile: https://smartweather.weatherflow.com/station/5080/graph/14695/wind/2
SKY%20-%20Mobile

1 Like

At 18:40 PT I went up and turned the SKY on station 5080 so its North faced due West. I’ll probably correct it tomorrow afternoon unless we discover something unusual. I would expect that if the direction calculations are correct that the general wind directions of 5080 should be generally from the East while 5075 should still be from the North. If both are generally North then your suspicion might correct.

1 Like

so, I just looked at your stations, and to me it appears that weak winds are still north for both stations, indicating a bug, because if it were real wind, the non-zero winds should have rotated with your device.

Sorry for the delay. We were really scratching our heads at this one because we actually don’t use “North” when wind speed is zero. When the wind is zero speed, the direction is “NULL”. You can see this in the “rapid wind” data - there is no direction at all when the speed is zero.

However, it turns out we were including those NULLs as zeroes in the average direction calculation - that’s what introduces the North bias at low speeds (the more 0 speed measurements in a given observation period, the more North bias). We’ll fix that in the next firmware update!

5 Likes