mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 07:23:35 +08:00
EKF: Report horizontal acceleration
This commit is contained in:
@@ -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]);
|
||||
|
||||
@@ -382,6 +382,8 @@ public:
|
||||
|
||||
void get_covariance(float c[28]);
|
||||
|
||||
float getAccNavMagHorizontal() { return _accNavMagHorizontal; }
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user