mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-11 17:13:56 -03:00
AP_AHRS: take secondary attitude from EKF3 if it is configured
This commit is contained in:
parent
0f234583d6
commit
814aa4e5ec
@ -608,13 +608,20 @@ bool AP_AHRS_NavEKF::get_secondary_attitude(Vector3f &eulers) const
|
||||
switch (active_EKF_type()) {
|
||||
case EKFType::NONE:
|
||||
// EKF is secondary
|
||||
#if HAL_NAVEKF2_AVAILABLE
|
||||
EKF2.getEulerAngles(-1, eulers);
|
||||
return _ekf2_started;
|
||||
#else
|
||||
return false;
|
||||
switch ((EKFType)_ekf_type.get()) {
|
||||
#if HAL_NAVEKF3_AVAILABLE
|
||||
case EKFType::THREE:
|
||||
EKF3.getEulerAngles(-1, eulers);
|
||||
return _ekf3_started;
|
||||
#endif
|
||||
|
||||
#if HAL_NAVEKF2_AVAILABLE
|
||||
case EKFType::TWO:
|
||||
EKF2.getEulerAngles(-1, eulers);
|
||||
return _ekf2_started;
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
#if HAL_NAVEKF2_AVAILABLE
|
||||
case EKFType::TWO:
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user