Hi All,

I use APM, and I need to do 'drift compensation'.  I have the following:

ahrs.pitch, ahrs.roll, ahrs.yaw.

drift vector =( x, y, z )

I use an external Compass for Yaw , and it is enabled. Now, how do I make use of the vectors above; do I need to assign them manually, how do I make use of the drift vector to really compensate for the drift that I get in all roll, pitch and yaw ??

Your answer will be appreciated.

Views: 1287

Reply to This

Replies to This Discussion


      the APM code already does gyro drift compensation for the yaw using the compass, and for roll and pitch using the accelerometers so you shouldn't need to do anything I think...but i suspect i'm not understanding your question completely.

HI Randy,

Thank you for your reply. I was apparently working with the APM 'libraries' example under AP_AHRS. There I found the display of the drift vector so I was wondering what I can do with it?

I went through the DCM draft earlier, and now remember that as you say this drift vector is used internally for compensation. However, I still see quite some drift in Yaw direction (of the order of 8 deg/min) and a few deg in roll/pitch/minute. 

I use a magnetometer for yaw, and gyro/accel for roll/pitch. Is there something I need to enable otherwise to cancel out the drift completely like enabling the PI_Controller class (with tag APM_Control in config.h)> It is currently commented out.

Hi Shyam,

I just posted a question about the same problem. I am running the AHRS test and get the same kind of drift you are experiencing. 

Did you find a solution to your problem?



Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service