Beau Schwabe
Active Member
Just wondering if anyone has a slick Cartesian to Polar algorithm they would be willing to share that will work on a small microprocessor (PIC10F202) that does not have any built-in math functions? The X and Y values from the sensor are 12-Bit resolution, and I am just looking for the angle in the polar conversion and NOT the radius. It is easy enough to determine which 90-Deg quadrant the angle is in based on the sign of the X & Y values, and taking that a step further you can compare the X & Y values to determine which 45-Deg slice it is in within the 90-Deg quadrant... i.e. X=Y it's right on the 45... if X>Y or X<Y you can determine which half of the 90-Deg quadrant you are in... beyond that it gets a little more complex. I would like to minimize the lookup table to something as small as possible with at least 1 Deg resolution ....
Thanks!
Thanks!