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