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.
This commit is contained in:
Paul Riseborough 2020-05-10 18:23:42 +10:00 committed by Andrew Tridgell
parent 3a10838c65
commit 85e53d53e1

View File

@ -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;
}