> The problem is the discontinuity in the number system being > used. Creating a continuous wrap around number system > representing the compass as 0 to 179 180 -179 to -1 makes all > of the averaging problems go away. Conversion of negative > numbers requires a simple add of 360. So which formula would you use to calculate the average? Simple sum(Xi)/N does not work: take 170 and -170, sum = 0, average would be 0, correct answer is 180. Wouter van Ooijen -- ------------------------------------------- Van Ooijen Technische Informatica: www.voti.nl consultancy, development, PICmicro products docent Hogeschool van Utrecht: www.voti.nl/hvu _______________________________________________ http://www.piclist.com View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist