3drobotics / ardupilot-solo

GNU General Public License v3.0
137 stars 122 forks source link

Allow in-flight yaw and mag field alignment for repeated takeoffs from magnetic surfaces #273

Closed priseborough closed 7 years ago

priseborough commented 7 years ago

Addresses: https://3drsolo.atlassian.net/browse/IG-1637

Landing on a surface with a magnetic anomaly large enough to require the EKF to reset its field states can result in poor heading and large EKF magnetometer and velocity innovations if the vehicle is re-armed and takes off. This happens because the flags indicating that completion of the in-air yaw and field states was not being reset if a ground reset had occurred. This patch ensures that any reset of magnetic field states that occurs whilst disarmed causes the flags to be reset.