Browse Source

EKF: Report horizontal acceleration

sbg
Lorenz Meier 9 years ago
parent
commit
dc7369a1d0
  1. 4
      src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp
  2. 2
      src/modules/ekf_att_pos_estimator/estimator_22states.h

4
src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp

@ -852,7 +852,9 @@ void AttitudePositionEstimatorEKF::publishControlState() @@ -852,7 +852,9 @@ void AttitudePositionEstimatorEKF::publishControlState()
/* Accelerations in Body Frame */
_ctrl_state.x_acc = _ekf->accel.x;
_ctrl_state.y_acc = _ekf->accel.y;
_ctrl_state.z_acc = _ekf->accel.z;
_ctrl_state.z_acc = _ekf->accel.z - _ekf->states[13];
_ctrl_state.horz_acc_mag = _ekf->getAccNavMagHorizontal();
/* Velocity in Body Frame */
Vector3f v_n(_ekf->states[4], _ekf->states[5], _ekf->states[6]);

2
src/modules/ekf_att_pos_estimator/estimator_22states.h

@ -382,6 +382,8 @@ public: @@ -382,6 +382,8 @@ public:
void get_covariance(float c[28]);
float getAccNavMagHorizontal() { return _accNavMagHorizontal; }
protected:
/**

Loading…
Cancel
Save