Browse Source

AP_Arming: add gps consistency and blend health check

master
Randy Mackay 8 years ago
parent
commit
9f21649dc0
  1. 20
      libraries/AP_Arming/AP_Arming.cpp

20
libraries/AP_Arming/AP_Arming.cpp

@ -369,6 +369,26 @@ bool AP_Arming::gps_checks(bool report) @@ -369,6 +369,26 @@ bool AP_Arming::gps_checks(bool report)
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;
}

Loading…
Cancel
Save