mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 05:13:34 +08:00
ekf2: allow filter init with only IMU (#21041)
- if mag enabled heading init is now pushed to controlMagFusion()
This commit is contained in:
@@ -556,6 +556,12 @@ void Ekf::resetQuatCov()
|
||||
rot_vec_var.setAll(sq(_params.initial_tilt_err));
|
||||
|
||||
initialiseQuatCovariances(rot_vec_var);
|
||||
|
||||
// update the yaw angle variance using the variance of the measurement
|
||||
if (_params.mag_fusion_type <= MagFuseType::MAG_3D) {
|
||||
// using magnetic heading tuning parameter
|
||||
increaseQuatYawErrVariance(sq(fmaxf(_params.mag_heading_noise, 1.0e-2f)));
|
||||
}
|
||||
}
|
||||
|
||||
void Ekf::zeroQuatCov()
|
||||
|
||||
Reference in New Issue
Block a user