Today I tested my latest plane design. Before the first flights I decided to make a short test drive with a car just to test how the APM 2.5 and installed telemetry and other things work. During the test I noticed quite interesting thing...

The plane was inside the car steady and levelled. During forward acceleration artificial horizon in Mission Planner showed positive values (+15°) and during de-acceleration (braking) the horizon showed negative values -15°. This is quite understandable when the orientation is based on accelerometers only. But I don't understand the behaviour with the APM 2.5 because it has gyro sensors that should compensate these accelerometer caused errors...

Does anyone know if this is normal behaviour? Is the APM code more accelerometer oriented so that the gyro information affects a bit slower or something???


Views: 754

Reply to This

Replies to This Discussion

Dunno, but pass the popcorn :)


I'm gonna try this tomorrow! You weren't driving a monster truck were you?

No, not a monster truck.... :) I was also thinking that is the Mission Planner showing the actual gyro/accelerometer fusion in the artificial horizon or is it showing only accelerometer based orientation.

Did you have airspeed sensor enabled and/or did you have gps attached and working?  Sounds like you were not providing appropriate inputs to the autopilot to perform acceleration correction and the linear acceleration was being interpreted as gyro drift - normal behavior in this case...

Orientation is calculated based on the gyro outputs, but the gyro bias is corrected with an estimate of the gravity vector from the accelerometers.  The accelerometers, however, do not measure gravity but instead measure specific force.  The acceleration force must be removed before the accelerometer outputs can be used to correct the gyros.  If you do not have gps lock (and airspeed measurement if the airspeed sensor is enabled) then the acceleration correction cannot do its job and you get the false pitching behavior you witnessed.

Hi, I did not have airspeed sensor enabled/connected. And I did have gps 3d fix. But I'm not sure how accurate the GPS was during the test.

What is the best way to make sure the gyro/accelerometer fusion is correct..


Dave, did you try the test...any results?

No, sorry not had a suitable chance, last few days have been hectic. Not forgotten though, it's pricked my curiosity.


I like that experiment :)

The IMU does work with a gyroscope for each axis whole value is added to a sum at an interval. If there is the slightest offset error, the sum will give the appearance that the plane is constantly (slowly) rotating when actually standing still. The solution is to blend in (low pass) an accelerometer reference as well, which then again has the disadvantage that you have discovered. Especially in a car, which accelerates to a higher speed than most small UAVs and over longer time.

The parameter decides how much acceleromter correction is used, and you can turn it down somewhat on APM2, because its gyros have quite good termal stability.



Try reducing the AHRS_RP_P parameter.



OK, thanks for the info. Maybe if the gyro drift is very minimal then the accelerometer correction could be set to slower frequency.

Reply to Discussion


© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service