From c6b24c521b01bffb6b83f881f0d705802eaa7fc1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 15 Feb 2014 09:25:03 +1100 Subject: [PATCH] AP_NavEKF: force healthy false when initialising this prevents us feeding off our own values when booting Pair-Programmed-With: Paul Riseborough --- libraries/AP_NavEKF/AP_NavEKF.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_NavEKF/AP_NavEKF.cpp b/libraries/AP_NavEKF/AP_NavEKF.cpp index 5a362b879d..db2d1251a1 100644 --- a/libraries/AP_NavEKF/AP_NavEKF.cpp +++ b/libraries/AP_NavEKF/AP_NavEKF.cpp @@ -315,6 +315,10 @@ void NavEKF::ResetHeight(void) void NavEKF::InitialiseFilterDynamic(void) { + // this forces healthy() to be false so that when we ask for ahrs + // attitude we get the DCM attitude regardless of the state of AHRS_EKF_USE + statesInitialised = false; + // Set re-used variables to zero ZeroVariables();