This is a demonstration of complementary filters on pitch and roll attitude using 3 gyroscopes and 3 accelerometers running on a custom Quadrotor controller board. Filters are coded in Python on the laptop with VPython rendering of spinning 3D cubes. Sensor processing code is running on the ATMega644p-based controller and is written in C. For Python code, see: For details on the custom Quadrotor sensor board, look here:

I know its not as impressive as DCM, but you have to start somewhere :-)

(Inspired by Brian Wolfe's demo-

- Roy

Views: 2760

Comment by Hugo Vincent on February 16, 2010 at 3:42pm
> I know its not as impressive as DCM, but you have to start somewhere :-)

Bear in mind the DCM filter often used here *is* a complementary filter, albeit one that uses a direction cosine matrix (DCM) representation of the angles rather than plain-old Euler angles.
Comment by Roy Brewer on February 16, 2010 at 4:33pm
One can certainly consider the DCM as implemented here as either an "observer" or as a complementary filter.

BTW, the "complementary filter" I demo isn't even using proper Euler angles - they are independent linear angles :-)

- Roy


You need to be a member of DIY Drones to add comments!

Join DIY Drones


Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service