Skip to content

Commit

Permalink
AirspeedValidator: fuse true airspeed before sideslip (#742)
Browse files Browse the repository at this point in the history
- the states can be initialised more accurately using an airspeed measurement
and the wind estimator uses the first measurement to initialise

Signed-off-by: RomanBapst <[email protected]>
  • Loading branch information
RomanBapst authored and sfuhrer committed Dec 10, 2020
1 parent 72420df commit de21999
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/lib/airspeed_validator/AirspeedValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,14 @@ AirspeedValidator::update_wind_estimator(const uint64_t time_now_usec, float air
Vector3f vI(lpos_vx, lpos_vy, lpos_vz);
Quatf q(att_q);

// sideslip fusion
_wind_estimator.fuse_beta(time_now_usec, vI, q);

// airspeed fusion (with raw TAS)
const Vector3f vel_var{Dcmf(q) *Vector3f{lpos_evh, lpos_evh, lpos_evv}};
_wind_estimator.fuse_airspeed(time_now_usec, airspeed_true_raw, vI, Vector2f{vel_var(0), vel_var(1)});

// sideslip fusion
_wind_estimator.fuse_beta(time_now_usec, vI, q);


}
}

Expand Down

0 comments on commit de21999

Please sign in to comment.