From b2e432e21198d52c29065c9553838ebee762894d Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Mon, 23 May 2016 19:57:05 +1000 Subject: [PATCH] EKF: publish position and velocity reset data --- EKF/ekf.h | 13 +++++++++++-- EKF/estimator_interface.h | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/EKF/ekf.h b/EKF/ekf.h index 7de59879b7..f971f8d683 100644 --- a/EKF/ekf.h +++ b/EKF/ekf.h @@ -127,8 +127,17 @@ public: // get GPS check status void get_gps_check_status(uint16_t *_gps_check_fail_status); - // return the amount the local vertical position changed in the last height reset and the time of the reset - void get_vert_pos_reset(float *delta, uint64_t *time_us) {*delta = _state_reset_status.posD_change; *time_us = _state_reset_status.posD_time_us;} + // return the amount the local vertical position changed in the last reset and the time of the reset + void get_posD_reset(float *delta, uint64_t *time_us) {*delta = _state_reset_status.posD_change; *time_us = _state_reset_status.posD_time_us;} + + // return the amount the local vertical velocity changed in the last reset and the time of the reset + void get_velD_reset(float *delta, uint64_t *time_us) {*delta = _state_reset_status.velD_change; *time_us = _state_reset_status.velD_time_us;} + + // return the amount the local horizontal position changed in the last reset and the time of the reset + void get_posNE_reset(Vector2f *delta, uint64_t *time_us) {*delta = _state_reset_status.posNE_change; *time_us = _state_reset_status.posNE_time_us;} + + // 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;} private: diff --git a/EKF/estimator_interface.h b/EKF/estimator_interface.h index fc67fe1a9d..8f36a4c97b 100644 --- a/EKF/estimator_interface.h +++ b/EKF/estimator_interface.h @@ -217,8 +217,17 @@ public: // get GPS check status virtual void get_gps_check_status(uint16_t *val) = 0; - // return the amount the local vertical position changed in the last height reset and the time of the reset - virtual void get_vert_pos_reset(float *delta, uint64_t *time_us) = 0; + // return the amount the local vertical position changed in the last reset and the time of the reset + virtual void get_posD_reset(float *delta, uint64_t *time_us) = 0; + + // return the amount the local vertical velocity changed in the last reset and the time of the reset + virtual void get_velD_reset(float *delta, uint64_t *time_us) = 0; + + // return the amount the local horizontal position changed in the last reset and the time of the reset + virtual void get_posNE_reset(Vector2f *delta, uint64_t *time_us) = 0; + + // 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; protected: