mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_AHRS: force the use of EKF for Copter and Sub
This commit is contained in:
parent
19cea4d7b7
commit
d3ede184cf
@ -37,12 +37,16 @@ extern const AP_HAL::HAL& hal;
|
|||||||
// constructor
|
// constructor
|
||||||
AP_AHRS_NavEKF::AP_AHRS_NavEKF(NavEKF2 &_EKF2,
|
AP_AHRS_NavEKF::AP_AHRS_NavEKF(NavEKF2 &_EKF2,
|
||||||
NavEKF3 &_EKF3,
|
NavEKF3 &_EKF3,
|
||||||
Flags flags) :
|
uint8_t flags) :
|
||||||
AP_AHRS_DCM(),
|
AP_AHRS_DCM(),
|
||||||
EKF2(_EKF2),
|
EKF2(_EKF2),
|
||||||
EKF3(_EKF3),
|
EKF3(_EKF3),
|
||||||
_ekf_flags(flags)
|
_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();
|
_dcm_matrix.identity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Constructor
|
// 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 */
|
/* Do not allow copies */
|
||||||
AP_AHRS_NavEKF(const AP_AHRS_NavEKF &other) = delete;
|
AP_AHRS_NavEKF(const AP_AHRS_NavEKF &other) = delete;
|
||||||
@ -301,7 +301,7 @@ private:
|
|||||||
Vector3f _accel_ef_ekf_blended;
|
Vector3f _accel_ef_ekf_blended;
|
||||||
const uint16_t startup_delay_ms = 1000;
|
const uint16_t startup_delay_ms = 1000;
|
||||||
uint32_t start_time_ms = 0;
|
uint32_t start_time_ms = 0;
|
||||||
Flags _ekf_flags;
|
uint8_t _ekf_flags; // bitmask from Flags enumeration
|
||||||
|
|
||||||
uint8_t ekf_type(void) const;
|
uint8_t ekf_type(void) const;
|
||||||
void update_DCM(bool skip_ins_update);
|
void update_DCM(bool skip_ins_update);
|
||||||
|
Loading…
Reference in New Issue
Block a user