From e371a303a9b93aa337e05a33a82fc1fa455db1d2 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Mon, 23 May 2016 21:07:35 +1000 Subject: [PATCH] EKF: publish the quaternion reset event --- EKF/ekf.h | 7 +++++++ EKF/estimator_interface.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/EKF/ekf.h b/EKF/ekf.h index 0773c526bc..4b83b66379 100644 --- a/EKF/ekf.h +++ b/EKF/ekf.h @@ -139,6 +139,13 @@ public: // return the amount the local horizontal velocity changed in the last reset and the time of the reset void get_velNE_reset(Vector2f *delta, uint64_t *time_us) {*delta = _state_reset_status.velNE_change; *time_us = _state_reset_status.velNE_time_us;} + // return the amount the quaternion has changed in the last reset and the time of the reset + void get_quat_reset(Quaternion *delta, uint64_t *time_us) + { + *delta = _state_reset_status.quat_change; + *time_us = _state_reset_status.quat_time_us; + } + private: static const uint8_t _k_num_states = 24; diff --git a/EKF/estimator_interface.h b/EKF/estimator_interface.h index 8f36a4c97b..e2c594720b 100644 --- a/EKF/estimator_interface.h +++ b/EKF/estimator_interface.h @@ -229,6 +229,9 @@ public: // return the amount the local horizontal velocity changed in the last reset and the time of the reset virtual void get_velNE_reset(Vector2f *delta, uint64_t *time_us) = 0; + // return the amount the quaternion has changed in the last reset and the time of the reset + virtual void get_quat_reset(Quaternion *delta, uint64_t *time_us) = 0; + protected: parameters _params; // filter parameters