From c23d72ba298e3432c0558274882b0a2e582f0032 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Wed, 16 Mar 2016 17:22:27 +1100 Subject: [PATCH] EKF: Ensure filter control modes are correctly initialised --- EKF/ekf.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/EKF/ekf.cpp b/EKF/ekf.cpp index 262d4ddf05..cdfe4cc01b 100644 --- a/EKF/ekf.cpp +++ b/EKF/ekf.cpp @@ -84,8 +84,6 @@ Ekf::Ekf(): _rng_hgt_faulty(false), _baro_hgt_offset(0.0f) { - _control_status = {}; - _control_status_prev = {}; _state = {}; _last_known_posNE.setZero(); _earth_rate_NED.setZero(); @@ -156,6 +154,9 @@ bool Ekf::init(uint64_t timestamp) _filter_initialised = false; _terrain_initialised = false; + _control_status.value = 0; + _control_status_prev.value = 0; + return ret; }