> I would do this: > - count the number of values in each quadrant. > - If there are values in all 4 quadrants, reject the measurements. > - rotate the samples such that there are no measurements in Q4 (270..359) > - average > - rotate back Drat, that is not enough for some funny cases. The measurements must be=20 restricted to two adjacent quadrants for this to work. --=20 Wouter van Ooijen -- ------------------------------------------- Van Ooijen Technische Informatica: www.voti.nl consultancy, development, PICmicro products docent Hogeschool van Utrecht: www.voti.nl/hvu C++ on uC blog: http://www.voti.nl/erblog --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .