EKF: record yaw alignment event during initialisation to allow heading fusion to start early

This ensures bad yaw gyro biases are compensated for early, rather than waiting for the tilt alignment to fully converge before fusing heading.
This commit is contained in:
Paul Riseborough 2016-05-18 19:23:44 +10:00
parent 94a63ec9d5
commit b9a3712ccb

View File

@ -511,7 +511,7 @@ bool Ekf::initialiseFilter(void)
Vector3f mag_init = _mag_filt_state;
// calculate the initial magnetic field and yaw alignment
resetMagHeading(mag_init);
_control_status.flags.yaw_align = resetMagHeading(mag_init);
// if we are using the range finder as the primary source, then calculate the baro height at origin so we can use baro as a backup
// so it can be used as a backup ad set the initial height using the range finder