hi Arducopter fans there,
i will try to give some suggestions regarding arducopter v2.6 before its release. Since there has been some time without any improvement about AHRs algorithms over recent arducopter versions. I think, the best place to begin is DCM algoritm itself.
My suggestion is to combine DCM and quaternion methods with their most superior parts. I know there has been a marg quaternion algorithm, but it is unnecessarily complicated. We know that DCM is easy to understand and has a better implemention for drift correcting algorithms and magnetic offset calculations. But DCM algorithm needs to orthogonalize and normalize rows or colums of the direction cosine matrix, also it is slightly inefficient due to 9 elements of the matrix is to be updated. As for quaternion method, only one vector of element size 4 needs to be updated and normalized. Actually, it is possible to integrate quaternions while preserving their unity. There is an algorithm for it. A DCM matrix, which can be calculated from updated quaternion will have aldready orthonomalized rows and columns. So i think it will be much more efficient and logical to do attitude update using quaternions with unity preserving integration and then calculate DCM representation from the updated quaternions and use it when necessary .
I have already implemented my DCM-quaternion hybrid suggestion. It can be easly integrated to the arducopter v2.5.5 code just using new versions of AP_AHRS_DCM library which i put in the attachments. I hope we will have more stable loiter and waypoint navigation in the future.
Kinds,
O.A
Tags: DCM, hard-iron, imu, magnetic, quaternion, soft-iron

Permalink Reply by Dave C on June 12, 2012 at 3:12am Really appreciate this work Ozan, I'm a novice regarding code changes and coding, however I am prepared to try out all sorts of wild and crazy codes on my quad, as long as its a simple matter of just uploading (I'm ok with arduino) and flying. I have 2 unbreakable quads for testing APM1 and 2, always start testing indoors for safety of course.
Would there be any chance of zipping up your mods, I'd be happy to give my opinions, for what they are worth. Or am i correct in thinking I can just copy the attachments above into my 2.6gamma build and try that?
Permalink Reply by Ozan Aktaş on June 12, 2012 at 3:22am Hi Dave,
it very easy, you just need to copy .h and .cpp files (in my attachment) in your library/AP_AHRS then you are ready to go! You may want to save default files before that. Then compile and upload .
Bests,
Ozan

Permalink Reply by Dave C on June 12, 2012 at 4:33am Thanks Ozin, i thought that may be the case. Is it ok to do this with 2.6 gamma too?
Cheers
Permalink Reply by Ozan Aktaş on June 12, 2012 at 1:14pm Yes,it is ok.
Bests,
ozan
Permalink Reply by emile on June 13, 2012 at 3:15am Ozan, I had a go at your code and it works pretty well. Unfortunately where I am now is very windy all the day, so it is difficoult to have a real comparison.
But I had more or less 6 batteries and had no issues at all.
What do you thing about gains in the DCM? Do you think they need to be updated, or should we just stick with defaults?
I'm talking about the KP_roll_pitch and KP_yaw.
Chers,
Emile
Permalink Reply by Ozan Aktaş on June 13, 2012 at 6:13am Hi Emile,
i had a real comparison today. I tried simple, altitude hold and loiter modes. As far as i could observed, DCM-Quaternion hybrid code performed better. Especially control of the quad was more stable and fast. I recommend to fly aggresively and stop suddenly in simple mode. I started to tune my quad parameters today, so need some time to make them perfect. Maybe i can also upload a video later. I will push my branch today to google git.
As for the gains in imu, we do not need to stick with defaults but for now they are well enough. Soon i will add other improvements about imu including gains. Keep update.
bests,
ozan
Permalink Reply by Ozan Aktaş on June 14, 2012 at 11:43am I pushed my branch about DCM-Quaternion hybrid implementation to arducopter git repository
http://code.google.com/r/aktaso-wip/
Bests,
Ozan
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.184 members
24 members
1283 members
180 members
4 members
© 2013 Created by Chris Anderson.
Powered by
