>Excellent! I hadn't thought of it that way. A little too much math for some situations, but certianly a perspective worth keeping in mind when running into such a situation. This sounds like a problem I faced a while back, averaging compass headings. 90,89,91 averages to 90, no problem, but 359,0,1 averages to 180 which is dead wrong. What I did, was to convert the polar coordinates to rectangulars, then add them, then convert back to polar. I had to do 7200 of these every second, while dealing with a ton of serial traffic as well, on nine ports. _______________________________________________ http://www.piclist.com View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist