4 ms·
If anyone wants a fast atan2 that I wrote a while ago (2007), for making a microcontroller navigate, it's at http://robots-everywhere.com/portfolio/math/ http:/
by spiritplumber 12y ago
If anyone wants a fast atan2 that I wrote a while ago (2007), for making a microcontroller navigate, it's at http://robots-everywhere.com/portfolio/math/ http://robots-everywhere.com/portfolio/math/
- readerrrr 12y agoDid you compare its speed to built in atan2 function? I counted the cycles for you method and it comes to around 50 plus a conditional. Built in function should be around the same.
- GFK_of_xmaspast 12y agohow's it compare to a CORDIC?
- spiritplumber 12y agoI wrote it for the Parallax Propeller, which is slow at doing divisions - so I tried to keep those to a minimum (one, which isn't too bad).
- GFK_of_xmaspast 12y agoWith a CORDIC the only divides should be by powers of 2 in the main loop and taking out the gain factor at the end, all of which can be turned into multiplies?
- spiritplumber 12y agoThanks, I'm going to go back and try it :)