AP_AHRS: add set_posvelyaw_source_set

This commit is contained in:
Randy Mackay 2020-06-17 15:35:07 +09:00
parent 8895d20c45
commit dc5d1d099b
3 changed files with 14 additions and 0 deletions

View File

@ -186,6 +186,9 @@ public:
// request EKF yaw reset to try and avoid the need for an EKF lane switch or failsafe
virtual void request_yaw_reset(void) {}
// set position, velocity and yaw sources to either 0=primary, 1=secondary, 2=tertiary
virtual void set_posvelyaw_source_set(uint8_t source_set_idx) {}
// Euler angles (radians)
float roll;
float pitch;

View File

@ -2339,6 +2339,14 @@ void AP_AHRS_NavEKF::request_yaw_reset(void)
}
}
// set position, velocity and yaw sources to either 0=primary, 1=secondary, 2=tertiary
void AP_AHRS_NavEKF::set_posvelyaw_source_set(uint8_t source_set_idx)
{
#if HAL_NAVEKF3_AVAILABLE
EKF3.setPosVelYawSourceSet(source_set_idx);
#endif
}
void AP_AHRS_NavEKF::Log_Write()
{
#if HAL_NAVEKF2_AVAILABLE

View File

@ -299,6 +299,9 @@ public:
// request EKF yaw reset to try and avoid the need for an EKF lane switch or failsafe
void request_yaw_reset(void) override;
// set position, velocity and yaw sources to either 0=primary, 1=secondary, 2=tertiary
void set_posvelyaw_source_set(uint8_t source_set_idx) override;
void Log_Write();
// check whether external navigation is providing yaw. Allows compass pre-arm checks to be bypassed