AP_AHRS: add method to check if ext nav is used for yaw

This commit is contained in:
hoangthien94 2019-07-24 17:48:07 +08:00 committed by Randy Mackay
parent a381502ad1
commit 916de076ec
2 changed files with 15 additions and 0 deletions

View File

@ -1821,5 +1821,17 @@ AP_AHRS_NavEKF &AP::ahrs_navekf()
return static_cast<AP_AHRS_NavEKF&>(*AP_AHRS::get_singleton());
}
// check whether compass can be bypassed for arming check in case when external navigation data is available
bool AP_AHRS_NavEKF::is_ext_nav_used_for_yaw(void) const
{
switch (active_EKF_type()) {
case EKF_TYPE2:
return EKF2.isExtNavUsedForYaw();
default:
return false;
}
}
#endif // AP_AHRS_NAVEKF_AVAILABLE

View File

@ -264,6 +264,9 @@ public:
void Log_Write();
// check whether compass can be bypassed for arming check in case when external navigation data is available
bool is_ext_nav_used_for_yaw(void) const;
private:
enum EKF_TYPE {EKF_TYPE_NONE=0,
EKF_TYPE3=3,