mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-14 11:54:01 -04:00
use_compass() and reset() are common to AP_AHRS_DCM and AP_AHRS_NavEKF. As AP_AHRS_NavEKF is a child of AP_AHRS_DCM, when we call use_compass() from within AP_AHRS_DCM we actually end up calling AP_AHRS_NavEKF::use_compass(). This has the effect of disabling the compass in DCM when EKF is active and EKF has decided not to use the compass. That means that the DCM yaw (and in fact the whole attitude) can get badly off while EKF is enabled, making DCM an ineffective fallback if EKF fails. The fix is to call the specific class versions of use_compass() and reset() |
||
---|---|---|
.. | ||
examples/AHRS_Test | ||
AP_AHRS_DCM.cpp | ||
AP_AHRS_DCM.h | ||
AP_AHRS_NavEKF.cpp | ||
AP_AHRS_NavEKF.h | ||
AP_AHRS.cpp | ||
AP_AHRS.h |