AP_AHRS: added a getter function to get active source set once the ekf3 filter is started

This commit is contained in:
nrt 2022-08-06 20:41:34 +05:30 committed by Randy Mackay
parent 5decc08dd4
commit c3d8f0fa45
2 changed files with 13 additions and 0 deletions

View File

@ -3148,6 +3148,16 @@ void AP_AHRS::set_posvelyaw_source_set(uint8_t source_set_idx)
#endif
}
//returns active source set used, 0=primary, 1=secondary, 2=tertiary
uint8_t AP_AHRS::get_posvelyaw_source_set() const
{
#if HAL_NAVEKF3_AVAILABLE
return EKF3.get_active_source_set();
#else
return 0;
#endif
}
void AP_AHRS::Log_Write()
{
#if HAL_NAVEKF2_AVAILABLE

View File

@ -360,6 +360,9 @@ public:
// set position, velocity and yaw sources to either 0=primary, 1=secondary, 2=tertiary
void set_posvelyaw_source_set(uint8_t source_set_idx);
//returns index of active source set used, 0=primary, 1=secondary, 2=tertiary
uint8_t get_posvelyaw_source_set() const;
void Log_Write();
// check if non-compass sensor is providing yaw. Allows compass pre-arm checks to be bypassed