EKF: fix sign error in bluff body drag fusion

This commit is contained in:
Paul Riseborough 2021-06-10 17:52:08 +10:00 committed by Paul Riseborough
parent 73d1e514d0
commit de8625d255

View File

@ -92,7 +92,7 @@ void Ekf::fuseDrag()
const float mea_acc = _drag_sample_delayed.accelXY(axis_index) - _state.delta_vel_bias(axis_index) / _dt_ekf_avg;
// predicted drag force sign is opposite to predicted wind relative velocity
const float drag_sign = (rel_wind_body(axis_index) >= 0.f) ? 1.f : -1.f;
const float drag_sign = (rel_wind_body(axis_index) >= 0.f) ? -1.f : 1.f;
float pred_acc; // predicted drag acceleration
if (axis_index == 0) {