AP_AHRS: added GPS disable for EKF3 switch

This commit is contained in:
Andrew Tridgell 2024-11-27 11:11:35 +11:00
parent 3ec68a9c0a
commit 66eee5103a
2 changed files with 11 additions and 0 deletions

View File

@ -3629,6 +3629,14 @@ float AP_AHRS::get_air_density_ratio(void) const
return 1.0 / sq(eas2tas);
}
#if HAL_NAVEKF3_AVAILABLE
// AUX switch support for disabling GPS only in EKF3
void AP_AHRS::gps_disable_ek3(bool gps_disable)
{
EKF3.force_gps_disable(gps_disable);
}
#endif
// singleton instance
AP_AHRS *AP_AHRS::_singleton;

View File

@ -683,6 +683,9 @@ public:
// get access to an EKFGSF_yaw estimator
const EKFGSF_yaw *get_yaw_estimator(void) const;
// AUX switch support for disabling GPS only in EKF3
void gps_disable_ek3(bool gps_disable);
private:
// roll/pitch/yaw euler angles, all in radians