From 60abf07beee927c8229f16aa0d37a3a7df9a931e Mon Sep 17 00:00:00 2001 From: Roman Bapst Date: Mon, 11 Apr 2016 14:12:24 +0200 Subject: [PATCH] added function to return accelerometer bias --- EKF/ekf.h | 2 ++ EKF/estimator_interface.h | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/EKF/ekf.h b/EKF/ekf.h index 30801ad6dd..5fca7e4c65 100644 --- a/EKF/ekf.h +++ b/EKF/ekf.h @@ -121,6 +121,8 @@ public: // return the estimated terrain vertical position relative to the NED origin bool get_terrain_vert_pos(float *ret); + void get_accel_bias(float *bias) {*bias = _state.accel_z_bias;} + private: static const uint8_t _k_num_states = 24; diff --git a/EKF/estimator_interface.h b/EKF/estimator_interface.h index 22f4b58840..6579c8eeeb 100644 --- a/EKF/estimator_interface.h +++ b/EKF/estimator_interface.h @@ -209,10 +209,7 @@ public: *val = _mag_declination_to_save_deg; } - void copy_accel_bias(float *bias) - { - *bias = _state[15]; - } + virtual void get_accel_bias(float *bias) = 0; protected: