From ffd9f7a4ed40afc2d46abbe515bf8f685ff93c3d Mon Sep 17 00:00:00 2001
From: priseborough <p_riseborough@live.com.au>
Date: Mon, 5 Jan 2015 17:13:58 +1100
Subject: [PATCH] AP_NavEKF: Predict filter solution status

---
 libraries/AP_NavEKF/AP_NavEKF.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libraries/AP_NavEKF/AP_NavEKF.cpp b/libraries/AP_NavEKF/AP_NavEKF.cpp
index 529bed0bf..3ed3be8b0 100644
--- a/libraries/AP_NavEKF/AP_NavEKF.cpp
+++ b/libraries/AP_NavEKF/AP_NavEKF.cpp
@@ -4503,8 +4503,8 @@ void  NavEKF::getFilterStatus(nav_filter_status &status) const
     status.flags.vert_pos = !hgtTimeout;            // vertical position estimate valid
     status.flags.terrain_alt = gndOffsetValid;		// terrain height estimate valid
     status.flags.const_pos_mode = constPosMode;     // constant position mode
-    status.flags.pred_horiz_pos_rel = status.flags.horiz_pos_rel;
-    status.flags.pred_horiz_pos_abs = status.flags.horiz_pos_abs;
+    status.flags.pred_horiz_pos_rel = optFlowNavPossible || gpsNavPossible; // we should be able to estimate a relative position when we enter flight mode
+    status.flags.pred_horiz_pos_abs = gpsNavPossible; // we should be able to estimate an absolute position when we enter flight mode
 }
 
 // Check arm status and perform required checks and mode changes
-- 
GitLab