mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 05:03:35 +08:00
EKF: Output mag sensor isolation warning first time only
This commit is contained in:
+1
-1
@@ -372,7 +372,7 @@ bool Ekf::realignYawGPS()
|
|||||||
ECL_WARN("EKF bad yaw corrected using GPS course");
|
ECL_WARN("EKF bad yaw corrected using GPS course");
|
||||||
|
|
||||||
// declare the magnetomer as failed if a bad yaw has occurred more than once
|
// declare the magnetomer as failed if a bad yaw has occurred more than once
|
||||||
if (_flt_mag_align_complete && (_num_bad_flight_yaw_events >= 2)) {
|
if (_flt_mag_align_complete && (_num_bad_flight_yaw_events >= 2) && !_control_status.flags.mag_fault) {
|
||||||
ECL_WARN("EKF stopping magnetometer use");
|
ECL_WARN("EKF stopping magnetometer use");
|
||||||
_control_status.flags.mag_fault = true;
|
_control_status.flags.mag_fault = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user