Hi People,

This is a simple question I am having for some experts out there. I am getting a GIMBAL LOCK problem when I pitch my APM-1 board 90 degrees (downwards), the roll and yaw values becomes crazy.

My current implementation uses ahrs.pitch_sensor (euler angle) values.

Can anyone tell me how to prevent this problem using  ahrs.get_dcm_matrix() or using the Quaternions (in this case I am not sure how to call update, as this class does not have one).

I am looking for a solution to this problem with logic and\or code. HELP is really appreciated!


Thanks in advance.

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

Join diydrones

Replies are closed for this discussion.

Replies

  • Locked, Duplicate post as http://www.diydrones.com/forum/topics/gimbal-lock-how-to-solve-via-...

  • Developer

    Shyam,

         So I guess the question is, what are you trying to do with the euler angles that's causing you problems?  Depending upon what you're trying to do, maybe you could use dcm in a different way...for example you can use the dcm matrix to rotate a given vector from body-frame to earth-frame (or the other way around)...

This reply was deleted.

Activity