AP_AHRS: force the use of EKF for Copter and Sub

This commit is contained in:
Peter Barker 2019-11-26 14:48:07 +11:00 committed by Peter Barker
parent 19cea4d7b7
commit d3ede184cf
2 changed files with 7 additions and 3 deletions

View File

@ -37,12 +37,16 @@ extern const AP_HAL::HAL& hal;
// constructor
AP_AHRS_NavEKF::AP_AHRS_NavEKF(NavEKF2 &_EKF2,
NavEKF3 &_EKF3,
Flags flags) :
uint8_t flags) :
AP_AHRS_DCM(),
EKF2(_EKF2),
EKF3(_EKF3),
_ekf_flags(flags)
{
#if APM_BUILD_TYPE(APM_BUILD_ArduCopter) || APM_BUILD_TYPE(APM_BUILD_ArduSub)
// Copter and Sub force the use of EKF
_ekf_flags |= AP_AHRS_NavEKF::FLAG_ALWAYS_USE_EKF;
#endif
_dcm_matrix.identity();
}

View File

@ -45,7 +45,7 @@ public:
};
// Constructor
AP_AHRS_NavEKF(NavEKF2 &_EKF2, NavEKF3 &_EKF3, Flags flags = FLAG_NONE);
AP_AHRS_NavEKF(NavEKF2 &_EKF2, NavEKF3 &_EKF3, uint8_t flags = FLAG_NONE);
/* Do not allow copies */
AP_AHRS_NavEKF(const AP_AHRS_NavEKF &other) = delete;
@ -301,7 +301,7 @@ private:
Vector3f _accel_ef_ekf_blended;
const uint16_t startup_delay_ms = 1000;
uint32_t start_time_ms = 0;
Flags _ekf_flags;
uint8_t _ekf_flags; // bitmask from Flags enumeration
uint8_t ekf_type(void) const;
void update_DCM(bool skip_ins_update);