Browse Source

EKF: fix sign error in bluff body drag fusion

master
Paul Riseborough 4 years ago committed by Paul Riseborough
parent
commit
de8625d255
  1. 2
      EKF/drag_fusion.cpp

2
EKF/drag_fusion.cpp

@ -92,7 +92,7 @@ void Ekf::fuseDrag() @@ -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) {

Loading…
Cancel
Save