I was writing the atan function for x,y to angle last night, and got working code using very simple gonio, where I calculated the hypotenuse, and then took the sine and looked it up in my existing sine table (from scope_pic). However (and this is all about doing it without fleetwood point math, it still took some multiplies, (32 bit) and a square root, and some lookup, and it was not really that accurate (about around one degree), so basically it sucked. I thought, well, CORDIC works in FPGA, so why not in a PIC, and did a web search for PIC 18F and CORDIC.
Least what I expected to find was asm for atan... So I found asm for atan, of course it did not work, but after some changes (tables to RAM at 0x100) I got it working.
Here are some interesting links, this is the original CORDIC code for PIC18, but is as called from C:
Here is a nice discussion, and a port to PIC BASIC that I found very helpful for testing:
Anyways it is fun, will play with it some more.
PS If you think CORDIC is a strange word, look wat NASA came up with:
quote (from sci.space.news): The mission, called Origins-Spectral Interpretation-Resource Identification-Security-Regolith Explorer, or OSIRIS-REx, will be the first U.S. mission to carry samples from an asteroid back to Earth. end quote
LOL