EKF: Add method to fuse horizontal magnetometer data

This method is more suitable than a raw heading measurement because it works across a full range of pitch angles.
It has been made the default for ground operation.
This commit is contained in:
Paul Riseborough
2016-02-20 14:42:17 +11:00
parent 6df6ac0023
commit a711632017
5 changed files with 239 additions and 21 deletions
+3
View File
@@ -150,6 +150,9 @@ bool Ekf::update()
fuseDeclination();
}
} else if (_control_status.flags.mag_2D && _control_status.flags.yaw_align) {
fuseMag2D();
} else if (_control_status.flags.mag_hdg && _control_status.flags.yaw_align) {
fuseHeading();