Weather Station Hardware > WiFiLogger/Meteo-Pi

Calculating 1 hour average direction

(1/1)

**WexfordWx**:

Does anyone have a procedure for calculating a long term average for wind direction? I have my WiFiLogger 2 set to transmit weather data every 3 minutes. I want to calculate averages of wind speed, direction, air temperature and humidity and max-windspeed every hour to display on a website graph. As a first approximation I save both direction and pseudo-direction i.e. deviation from 0 which can be positive or negative. Averaging the pseudo-direction works fairly well if the directions are from 270 - 180 and average direction works well if the directions range from 0 to 270. But bugs can arise and average of a wind mainly from the S can become a N wind. There must be a recognised procedure because lots of anemometer systems average direction albeit mostly for shorter times.

**mcrossley**:

Hint... You average the wind vectors either including or excluding the speed depending on the purpose - just use 1 for the speed if excluding it.

So a bit of high school trig is required. Then average the x and y values.

**WexfordWx**:

Thank you, that is perfect. It makes absolute sense and I would not have thought of weighting the average direction based on the windspeed without your suggestion.

Navigation

[0] Message Index

Go to full version