Browse Source

AP_RCTelemetry: check EKF checks against failsafe defaults.

apm_2208
Andy Piper 3 years ago committed by Andrew Tridgell
parent
commit
13464ebb20
  1. 10
      libraries/AP_RCTelemetry/AP_RCTelemetry.cpp

10
libraries/AP_RCTelemetry/AP_RCTelemetry.cpp

@ -253,23 +253,23 @@ void AP_RCTelemetry::check_ekf_status(void)
uint32_t now = AP_HAL::millis(); uint32_t now = AP_HAL::millis();
if ((now - check_ekf_status_timer) >= 10000) { // prevent repeating any ekf_status message unless 10 seconds have passed if ((now - check_ekf_status_timer) >= 10000) { // prevent repeating any ekf_status message unless 10 seconds have passed
// multiple errors can be reported at a time. Same setup as Mission Planner. // multiple errors can be reported at a time. Same setup as Mission Planner.
if (velVar >= 1) { if (velVar >= 0.8f) {
queue_message(MAV_SEVERITY_CRITICAL, "Error velocity variance"); queue_message(MAV_SEVERITY_CRITICAL, "Error velocity variance");
check_ekf_status_timer = now; check_ekf_status_timer = now;
} }
if (posVar >= 1) { if (posVar >= 0.8f) {
queue_message(MAV_SEVERITY_CRITICAL, "Error pos horiz variance"); queue_message(MAV_SEVERITY_CRITICAL, "Error pos horiz variance");
check_ekf_status_timer = now; check_ekf_status_timer = now;
} }
if (hgtVar >= 1) { if (hgtVar >= 0.8f) {
queue_message(MAV_SEVERITY_CRITICAL, "Error pos vert variance"); queue_message(MAV_SEVERITY_CRITICAL, "Error pos vert variance");
check_ekf_status_timer = now; check_ekf_status_timer = now;
} }
if (magVar.length() >= 1) { if (magVar.length() >= 0.8f) {
queue_message(MAV_SEVERITY_CRITICAL, "Error compass variance"); queue_message(MAV_SEVERITY_CRITICAL, "Error compass variance");
check_ekf_status_timer = now; check_ekf_status_timer = now;
} }
if (tasVar >= 1) { if (tasVar >= 0.8f) {
queue_message(MAV_SEVERITY_CRITICAL, "Error terrain alt variance"); queue_message(MAV_SEVERITY_CRITICAL, "Error terrain alt variance");
check_ekf_status_timer = now; check_ekf_status_timer = now;
} }

Loading…
Cancel
Save