From 85e53d53e1cbe5ec76b35b25d711295a9e4415c7 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Sun, 10 May 2020 18:23:42 +1000 Subject: [PATCH] ArduPlane: Don't use optical flow health when assessing EKF nav health Plane currently doesn't use optical flow for navigation - it is used fo terrain height estimation. --- ArduPlane/ekf_check.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ArduPlane/ekf_check.cpp b/ArduPlane/ekf_check.cpp index 6ef7f2da00..efe6bfc837 100644 --- a/ArduPlane/ekf_check.cpp +++ b/ArduPlane/ekf_check.cpp @@ -122,16 +122,6 @@ bool Plane::ekf_over_threshold() over_thresh_count++; } - bool optflow_healthy = false; -#if OPTFLOW == ENABLED - optflow_healthy = optflow.healthy(); -#endif - if (!optflow_healthy && (vel_variance >= (2.0f * g2.fs_ekf_thresh))) { - over_thresh_count += 2; - } else if (vel_variance >= g2.fs_ekf_thresh) { - over_thresh_count++; - } - if ((position_variance >= g2.fs_ekf_thresh && over_thresh_count >= 1) || over_thresh_count >= 2) { return true; }