mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_AHRS: ensure AHRS never uses an unhealthy gyro
This commit is contained in:
parent
f65172f2e4
commit
5e5775c3ca
@ -185,7 +185,7 @@ void AP_AHRS_NavEKF::update_EKF2(void)
|
||||
|
||||
// calculate corrected gyro estimate for get_gyro()
|
||||
_gyro_estimate.zero();
|
||||
if (primary_imu == -1) {
|
||||
if (primary_imu == -1 || !_ins.get_gyro_health(primary_imu)) {
|
||||
// the primary IMU is undefined so use an uncorrected default value from the INS library
|
||||
_gyro_estimate = _ins.get_gyro();
|
||||
} else {
|
||||
@ -258,7 +258,7 @@ void AP_AHRS_NavEKF::update_EKF3(void)
|
||||
|
||||
// calculate corrected gyro estimate for get_gyro()
|
||||
_gyro_estimate.zero();
|
||||
if (primary_imu == -1) {
|
||||
if (primary_imu == -1 || !_ins.get_gyro_health(primary_imu)) {
|
||||
// the primary IMU is undefined so use an uncorrected default value from the INS library
|
||||
_gyro_estimate = _ins.get_gyro();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user