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: