title: Averaging angles... Again
body: <p>I want to calculate the average of a set of angles, <strong>which represents source bearing (0 to 360 deg) - (similar to wind-direction)</strong></p>
  
  <p>I know it has been discussed before (several times). The accepted answer was <strong>Compute unit vectors from the angles and take the angle of their average</strong>.</p>
  
  <p>However this answer defines the average in a non intuitive way. The average of 0, 0 and 90 will be <strong>atan( (sin(0)+sin(0)+sin(90)) / (cos(0)+cos(0)+cos(90)) ) = atan(1/2)= 26.56 deg</strong> </p>
  
  <p>I would expect the average of 0, 0 and 90 to be 30 degrees.</p>
  
  <p>So I think it is fair to ask the question again: How would you calculate the average, so such examples will give the intuitive expected answer.</p>
  
  <p><strong>Edit 2014:</strong></p>
  
  <p>After asking this question, I've posted <a href="http://www.codeproject.com/Articles/190833/Circular-Values-Math-and-Statistics-with-Cplusplus" rel="noreferrer">an article on CodeProject</a> which offers a thorough analysis. The article examines the following reference problems:</p>
  
  <ul>
  <li>Given time-of-day [00:00-24:00) for each birth occurred in US in the year 2000 - Calculate the mean birth time-of-day</li>
  <li>Given a multiset of direction measurements from a stationary transmitter to a stationary receiver, using a measurement technique with a wrapped normal distributed error – Estimate the direction.</li>
  <li>Given a multiset of azimuth estimates between two points, made by “ordinary” humans (assuming to subject to a wrapped truncated normal distributed error) – Estimate the direction.</li>
  </ul>