mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-26 17:53:59 -04:00
AP_Arming: add gps consistency and blend health check
This commit is contained in:
parent
729ce34ce3
commit
9f21649dc0
@ -369,6 +369,26 @@ bool AP_Arming::gps_checks(bool report)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check GPSs are within 50m of each other and that blending is healthy
|
||||||
|
if ((checks_to_perform & ARMING_CHECK_ALL) || (checks_to_perform & ARMING_CHECK_GPS_CONFIG)) {
|
||||||
|
float distance_m;
|
||||||
|
if (!gps.all_consistent(distance_m)) {
|
||||||
|
if (report) {
|
||||||
|
GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_CRITICAL,
|
||||||
|
"PreArm: GPSs inconsistent by %4.1fm",
|
||||||
|
(double)distance_m);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!gps.blend_healthy()) {
|
||||||
|
if (report) {
|
||||||
|
GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_CRITICAL, "PreArm: GPS blending unhealthy");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user