From b062bd2e380cfda2b7971d23eda3850efe66f5e5 Mon Sep 17 00:00:00 2001 From: bugobliterator Date: Sat, 30 Jan 2016 12:45:23 -0800 Subject: [PATCH] EKF: move estimator specific variables to estimator core --- EKF/ekf.h | 4 ++++ EKF/estimator_base.h | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/EKF/ekf.h b/EKF/ekf.h index 476870e7de..e8b0b8e938 100644 --- a/EKF/ekf.h +++ b/EKF/ekf.h @@ -94,6 +94,8 @@ private: static const uint8_t _k_num_states = 24; static constexpr float _k_earth_rate = 0.000072921f; + stateSample _state; + bool _filter_initialised; bool _earth_rate_initialised; @@ -129,6 +131,8 @@ private: Vector3f _delta_angle_corr; Vector3f _delta_vel_corr; Vector3f _vel_corr; + imuSample _imu_down_sampled; + Quaternion _q_down_sampled; // variables used for the GPS quality checks float _gpsDriftVelN = 0.0f; // GPS north position derivative (m/s) diff --git a/EKF/estimator_base.h b/EKF/estimator_base.h index abc7ed53f4..ea8eaeff4d 100644 --- a/EKF/estimator_base.h +++ b/EKF/estimator_base.h @@ -177,8 +177,6 @@ protected: uint64_t _imu_time_last; imuSample _imu_sample_delayed; - imuSample _imu_down_sampled; - Quaternion _q_down_sampled; magSample _mag_sample_delayed; baroSample _baro_sample_delayed;