I am testing DCM update with PI drift tracking. I am using one closed loop with gravity vector and other for magnetic field vector (3 axis vector), i am comparing measured vector with my local magnetic field vector. it works ok!i have read than magnetometers can not be used with electric motors, but i have tested this board over a electric plane, and i can see noise due electric motor is very very small, it is dificult to see any effect in algorithm result.Thanks to Bill Premerlani and Paul Bizard for his DCM method description.jlcortexnmine.com
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones


  • Hi Jose,
    Good job, looks like you have done some fantastic work on porting the DCM algorithm to your platform. The RC hardware and GUI looks great too. Would you mind sharing the details of using the 3-axes magnetometer into the algorithm?

  • Jose,
    Again - thanks for the matlab code. I was nice to compare to my matlab version. It is nice to see that you have it now workings! Unfortunately I have not been able to devote much time to this recently or to review your matlab code to see what your problems were earlier (I think I may have the same issues right now however - my roll estimate changes when I move the unit around the yaw axis) but I managed to get it to work on my ARM7 board for pitch and roll for now.

    I also want to use a magnetometer for yaw compensation.

    Paul and Bill's work on this has been fantastic. Bill has especially been patient with my ongoing questions -Thanks Bill.

    Back to my issue that I still need to work on --- the changing roll estimate when I move the unit in the yaw axis (around z axis). I have something still a little off, but my port using floating points is now working without the oscillations I was having earlier. I hopefully should be able to work on this in the next few days, and perhaps I could also show a video of my progress with this as well.

  • T3
    Really nice work. I hope to be following in your footsteps very soon - once I get my hardware built up. I'll be building hardware and coding up general sensor data collecting and timing functions this weekend. Assuming all goes well next week will be implementing inertial attitude estimation.
    Any code snippets or words of wisdom you can give me on integrating the magnetometer data would be greatly appreciated. I'm looking for any help I can get to speed up my development.

    Your GUI looks great too. Is that part of the GreatKhan tool you mentioned on your website? I didn't see any links for purchasing or test driving, is it available for others to use??

    Thanks for sharing and keep us posted on your progress.

  • T3

    You are quite welcome. Paul and I in turn thank Mahony for his publications on the subject.

    Very nice work. I am impressed that you were able to figure out how to integrate the magnetometer into the algorithm on your own.

    Bill Premerlani
This reply was deleted.