Gary, you got me thinking…

I have been thinking about this average wind direction and it is actually pretty tricky to implement! The periodic nature of wind direction 0-359 degrees with a “reset” to 0 degrees is the kicker. Taking an average is more complicated than I thought!

Assume we have this reduced data set to make an average: 355, 355, 5, 5

If you add them up and divide by 4 you get 180, which is exactly the opposite of the true wind direction average of 0 degrees. I’m sure there’s an algorithm that can fix this but it isn’t as straightforward as I originally thought, at first glance.

It probably would do something like figure out the general span of wind direction in a 180 or 270 degree range, that re-maps the raw numbers to greater than 359, so 5 degrees might become 365 degrees for the calculation, then the simple averaging method would work… i.e.

355, 355, 365, 365 added together and divided by 4 yields 360 = 0 degrees