From ddfe077f7cae2928d339809d48df3c74a80f6e87 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Fri, 24 Nov 2017 12:19:41 +1100 Subject: [PATCH] commander: strengthen pre-flight fail checking The commander checks use instantaneous values which are vulnerable to false negatives or positives with noisy data or transient faults. This patch checks the estimators published pre flight check status which is based on persistent checks using filtered data. --- src/modules/commander/PreflightCheck.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/commander/PreflightCheck.cpp b/src/modules/commander/PreflightCheck.cpp index 72b769c9f4..9a0485215b 100644 --- a/src/modules/commander/PreflightCheck.cpp +++ b/src/modules/commander/PreflightCheck.cpp @@ -502,6 +502,12 @@ static bool ekf2Check(orb_advert_t *mavlink_log_pub, bool optional, bool report_ goto out; } + // Check if preflight check perfomred by estimator has failed + if (status.pre_flt_fail) { + success = false; + goto out; + } + // check vertical position innovation test ratio param_get(param_find("COM_ARM_EKF_HGT"), &test_limit); if (status.hgt_test_ratio > test_limit) {