by, 04-13-2011 at 11:47 AM (1276 Views)
This is a Parallax Propeller chip running a partial implementation of Premerlani and Bizard's work on Direction Cosine Matrix computation for orientation sensing. (Check out [URL="http://diydrones.com/profiles/blog/show?id=705844%3ABlogPost%3A77893&commentId=705844%3AComment%3A335176&xg_source=activity"]their paper on DIYDrones[/URL]) I'm hoping to use this in a quad-rotor without a GPS or magnetometer - I wanted to see how good the algorithm was at stabilizing pitch and roll. So far it looks very promising.
All the work is done on the Propeller itself. It reads the gyro and accelerometer values on one core, and computes the DCM from those readings on another core. At this point the code is still written in the high-level language, Spin. Since all the math is fixed point, there's a strong chance I won't actually have to write an assembly version - I haven't timed it yet, but my update loop is running at 200Hz, so it's at least that fast.