yaw_align: let the mag control logic do the alignement and resets

This commit is contained in:
bresch
2021-05-11 12:21:05 +02:00
committed by Paul Riseborough
parent 2cc023038b
commit a4fe2b1e72
2 changed files with 4 additions and 9 deletions
+3 -1
View File
@@ -203,7 +203,9 @@ bool Ekf::initialiseFilter()
}
// calculate the initial magnetic field and yaw alignment
_control_status.flags.yaw_align = resetMagHeading(_mag_lpf.getState(), false, false);
// but do not mark the yaw alignement complete as it needs to be
// reset once the leveling phase is done
resetMagHeading(_mag_lpf.getState(), false, false);
// initialise the state covariance matrix now we have starting values for all the states
initialiseCovariance();