Use the look up tables if you need the speed, or use avrlib's functions if you can afford the time.

For the tables, you could just copy Admin's, as they are fairly accurate -- two decimal places for every fifth degree --, or if you need more accuracy, you/someone could write new ones with more degree entries or "tangent line approximation", making a line between two points you know and finding your value from that line.

With avr-libc, just add an include for the math,

`include <math.h>`

and you can make the calls, but be warned, as this uses doubles for high precision, but *slow* speed.

I would first try out the math library, and if that is too slow, try to get some tables together -- Admin's trig tables should be plenty, and a square root table shouldn't be too hard...

Good Luck,