mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 23:13:34 +08:00
Update time of last fusion event really only if fused
Except for the velpos fusion
This commit is contained in:
committed by
Mathieu Bresciani
parent
efd96db49d
commit
05855b7fc1
@@ -159,9 +159,6 @@ void Ekf::fuseAirspeed()
|
|||||||
_innov_check_fail_status.flags.reject_airspeed = false;
|
_innov_check_fail_status.flags.reject_airspeed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Airspeed measurement sample has passed check so record it
|
|
||||||
_time_last_arsp_fuse = _time_last_imu;
|
|
||||||
|
|
||||||
// apply covariance correction via P_new = (I -K*H)*P
|
// apply covariance correction via P_new = (I -K*H)*P
|
||||||
// first calculate expression for KHP
|
// first calculate expression for KHP
|
||||||
// then calculate P - KHP
|
// then calculate P - KHP
|
||||||
@@ -211,6 +208,7 @@ void Ekf::fuseAirspeed()
|
|||||||
// apply the state corrections
|
// apply the state corrections
|
||||||
fuse(Kfusion, _airspeed_innov);
|
fuse(Kfusion, _airspeed_innov);
|
||||||
|
|
||||||
|
_time_last_arsp_fuse = _time_last_imu;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -250,7 +250,6 @@ void Ekf::fuseGpsYaw()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (healthy) {
|
if (healthy) {
|
||||||
_time_last_gps_yaw_fuse = _time_last_imu;
|
|
||||||
// apply the covariance corrections
|
// apply the covariance corrections
|
||||||
P -= KHP;
|
P -= KHP;
|
||||||
|
|
||||||
@@ -259,6 +258,7 @@ void Ekf::fuseGpsYaw()
|
|||||||
// apply the state corrections
|
// apply the state corrections
|
||||||
fuse(Kfusion, _heading_innov);
|
fuse(Kfusion, _heading_innov);
|
||||||
|
|
||||||
|
_time_last_gps_yaw_fuse = _time_last_imu;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -192,9 +192,6 @@ void Ekf::fuseSideslip()
|
|||||||
_innov_check_fail_status.flags.reject_sideslip = false;
|
_innov_check_fail_status.flags.reject_sideslip = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// synthetic sideslip measurement sample has passed check so record it
|
|
||||||
_time_last_beta_fuse = _time_last_imu;
|
|
||||||
|
|
||||||
// apply covariance correction via P_new = (I -K*H)*P
|
// apply covariance correction via P_new = (I -K*H)*P
|
||||||
// first calculate expression for KHP
|
// first calculate expression for KHP
|
||||||
// then calculate P - KHP
|
// then calculate P - KHP
|
||||||
@@ -249,6 +246,8 @@ void Ekf::fuseSideslip()
|
|||||||
|
|
||||||
// apply the state corrections
|
// apply the state corrections
|
||||||
fuse(Kfusion, _beta_innov);
|
fuse(Kfusion, _beta_innov);
|
||||||
|
|
||||||
|
_time_last_beta_fuse = _time_last_imu;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user