Return the mean (and sdev) of a set of angles.
ma = ang_mean(ang)
ang = array of angles. in
/DEGREES Angles are in degrees (else Radians).
MAGNITUDES=mag Weighting for each angle (def=1).
SDEV=sd Returned standard deviation of angle.
ma = mean of angles. out
Notes: Uses component method, treating each angle
as the angle of a vector. May give weight each value
by giving vector magnitudes.
R. Sterner, 2005 Feb 17
Copyright (C) 2005, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.