A common parameter of interest in meteorological and air quality systems is the wind direction. It is often measured by some type of device which gives an output proportional to the direction on a compass. This is called the "polar coordinate" system. Very accurate spontaneous measurements can be made in this way. However, very serious errors can and will occur when doing averages and sigmas (standard deviations) in the polar system.
The reason for these problems is simple. In a 360 degree system 360° = North = 0°. Consider the following two-sample average: Sample 1, 350° (10° West of North) and Sample 2, 10° (10° East of North). Averaging, (350 + 10) / 2 = 180. Intuition would suggest (correctly) that the average should be North, but the answer comes out South, as wrong as possible. This is called "wrap-around."
Another problem with doing a straight average on wind direction is that no account is taken of speed. Suppose the wind is calm for 1/2 hour, and the wind comes in at 5 mph from the South. Clearly, the hourly average, using straight averaging, will be South-East, but the only wind was from the South. This problem is called the "unweighted direction problem."
The use of a 0-540° wind sensor will improve the situation, but will not solve the problem. Every time the sensor switches mode, which may be several times a day, serious errors will occur.
The above problems can be solved by translating the wind speed and wind direction into an X-Y (or Cartesian) coordinate system. Thus each wind direction observation is converted into a vector, that is, an Easterly and a Northerly component of speed, and the data is accumulated in vector form. When the time comes for an output report, computations are done and the results are transformed back to polar coordinates.