Shop our Airplanes Products Drone Products Sales
Thread Tools
This thread is privately moderated by Heli Hacker, who may elect to delete unwanted replies.
Aug 01, 2010, 11:56 PM
Hang on, turbulence ahead
Heli Hacker's Avatar


Even with gains carefully adjusted, DCM has a drift of several degrees per minute. Without an accelerometer to correct the drift, I need to introduce decay into the update matrix that rotates the DCM matrix. Unfortunately adding pitch and roll decay causes the matrix to have even larger drift around the yaw axis.

The whole purpose in implementing DCM was so that yaw would automatically cause rotation of pitch and roll. But since yaw accuracy goes to pieces, I have decided to use a simpler approach - one similar to the swash servo mixing equations.

' Use Yaw rotation to rotate Pitch and Yaw values
' if roll is clockwise looking down on vehicle:
' newxval = xval(cos(yaw angle)) - yval(sin(yaw angle)
' newyval = xval(sin(yaw angle)) + yval(cos(yaw angle)
'if roll is counter clockwise looking down on vehicle:
' newxval = xval(cos(yaw angle)) + yval(sin(yaw angle)
' newyval = -xval(sin(yaw angle)) + yval(cos(yaw angle)

This allows roll and pitch to be rotated at each 100hz update cycle, without tracking all three axes together.

I almost have this working, just now chasing a bug that appears to be in my sine(angle) routine.

Update: This code was causing problems, so I decided to set it aside for now and work on getting an accelerometer integrated so I can use DCM.
Last edited by Heli Hacker; Oct 28, 2010 at 08:21 AM.
Sign up now
to remove ads between posts

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Razor 6DOF + Arduino + DCM automatik UAV - Unmanned Aerial Vehicles 8 Nov 18, 2009 12:11 PM
Gallery J250s (was DCM-189, now DCM-263) Are back at AE Vipula AD Power Systems 1 Jan 17, 2006 03:38 PM
5.33:1 DCM-189 + 8 CBP 650s Dave Hederich Power Systems 557 Jul 09, 2004 12:25 AM
gearboxes for DCM-189 (Johnson motors) schnebly Foamies (Kits) 16 Dec 05, 2003 08:09 AM