mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 10:40:34 +08:00
EKF: Prevent covariance initialisation overwriting yaw variance
Also typo fix
This commit is contained in:
committed by
Lorenz Meier
parent
a3347b7e06
commit
89bcebd631
+3
-3
@@ -193,6 +193,9 @@ bool Ekf::initialiseFilter()
|
||||
// calculate the initial magnetic field and yaw alignment
|
||||
_control_status.flags.yaw_align = resetMagHeading(_mag_lpf.getState(), false, false);
|
||||
|
||||
// initialise the state covariance matrix now we have starting values for all the states
|
||||
initialiseCovariance();
|
||||
|
||||
// update the yaw angle variance using the variance of the measurement
|
||||
if (_params.mag_fusion_type <= MAG_FUSE_TYPE_3D) {
|
||||
// using magnetic heading tuning parameter
|
||||
@@ -213,9 +216,6 @@ bool Ekf::initialiseFilter()
|
||||
// reset the output predictor state history to match the EKF initial values
|
||||
alignOutputFilter();
|
||||
|
||||
// initialise the state covariance matrix now we have starting values for all lthe states
|
||||
initialiseCovariance();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user