Skip to main content

Posts

Showing posts from April, 2016

Navigation algorithms now include Drift compensation PI controller

So it turns out that I was very optimistic about just using a gain mixing of accelerometer rand gyros than computing a DCM matrix of the aircraft rotation. So I decided to overhaul the code by creating data structures that will hold the information requires for such computation. I must say that at the back of my mind I was really worried about the computational time that these calculations will take in the small Atmega328 micro. To my surprise, provided that one sticks with a minimum of division operands, float arithmetic is actually quite fast even in an 8-bit controller. Given that this application is for high L/D aircraft and who’s mission is mainly waypoint tracking, the slow changing dynamics can be reasonably captured with this environment. The bad part of the implementation was to discover how quickly the gyro drift (especially in the roll channel) hurts the computation of the Euler angles. (See the pics below), even-though all sensor are bias compensated fro