mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 02:33:35 +08:00
EKF: Use dead-reckoning status to determine if air data should modify non-wind states
This commit is contained in:
@@ -72,6 +72,9 @@ void Ekf::fuseAirspeed()
|
||||
|
||||
// Perform fusion of True Airspeed measurement
|
||||
if (v_tas_pred > 1.0f) {
|
||||
// determine if we need the sideslip fusion to correct states other than wind
|
||||
bool update_wind_only = !_is_dead_reckoning;
|
||||
|
||||
// Calculate the observation jacobian
|
||||
// intermediate variable from algebraic optimisation
|
||||
SH_TAS[0] = 1.0f/v_tas_pred;
|
||||
@@ -102,7 +105,7 @@ void Ekf::fuseAirspeed()
|
||||
|
||||
SK_TAS[1] = SH_TAS[1];
|
||||
|
||||
if (((_time_last_imu - _time_last_gps) < 1e6) || ((_time_last_imu - _time_last_ext_vision) < 1e6) || ((_time_last_imu - _time_last_optflow) < 1e6)) {
|
||||
if (update_wind_only) {
|
||||
// If we are getting aiding from other sources, then don't allow the airspeed measurements to affect the non-windspeed states
|
||||
for (unsigned row = 0; row <= 21; row++) {
|
||||
Kfusion[row] = 0.0f;
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user