Commit Graph

109 Commits

Author SHA1 Message Date
Jonathan Challinger d230690b7b AHRS: brought DCM more inline with Bill's implementation
omega_I applied continuously. _ki larger. Stop integrating when _omega.length()>20

The key change was the scaling of ge to ensure the error is not
quadratic
2012-06-27 16:01:49 +10:00
Andrew Tridgell d4c8041c51 AHRS: first successful version of Bills new drift correction system
This makes 3 major changes:

 1) fixes the scaling of the yaw drift correction term to fix the time
 constant

 2) don't integrate the mag vector over multiple readings

 3) accumulate omega_I changes over 15 seconds before applying, to try
 to prevent omega_I picking up short term responses
2012-06-27 16:01:49 +10:00
Andrew Tridgell 0f5c22bd8e AHRS: implement Bills new drift correction algorithm
this is an initial implementation of this paper:

  http://gentlenav.googlecode.com/files/RollPitchDriftCompensation.pdf
2012-06-27 16:01:49 +10:00
rmackay9 6e1798b104 AP_AHRS: updated default AHRS_YAW_P to 0.2 (was 0.4)
This reduces the compass's default authority over the yaw direction by half
2012-04-30 17:29:45 +09:00
Andrew Tridgell 2a3af369b6 DCM: buffer omega_I changes over 10 seconds
this buffers up _omega_I changes in _omega_I_sum over a period of 10
seconds, applying the slope limit only when _omega_I_sum is
transferred to _omega_I.

The result is a huge improvement in the ability of _omega_I to track
gyro drift over the long term.
2012-04-23 12:13:25 +10:00
Andrew Tridgell 8e90aeea4e AHRS: added AHRS_YAW_P parameter
this allows users to change the yaw gain in DCM
2012-04-16 20:55:13 +10:00
Andrew Tridgell b549b88e5e AHRS: fixed error_yaw reporting with 2 MAVLink connections
when a user first connects with USB, and later switches to the
telemetry port without restarting we were getting zero for error_yaw
in the logs, as AHRS.get_error_yaw() was being called twice.

This ensures we give the last value after the counter is reset
2012-03-29 12:39:53 +11:00
Andrew Tridgell d4bb068d5b AHRS: adapt the DCM library to the AHRS framework 2012-03-19 17:29:02 +11:00
Andrew Tridgell 9d75ffeba1 AHRS: rename DCM and Quaternion implementions ready for AHRS class
this is the first step to creating a general AHRS class for ArduPilot
2012-03-19 17:29:01 +11:00