EKF: Move MAG_FUSE_TYPE_AUTOFW control to the expected place

This commit is contained in:
Paul Riseborough
2017-10-12 14:50:23 +11:00
parent e834522f62
commit 6f7f05fdc0
2 changed files with 9 additions and 9 deletions
-8
View File
@@ -163,14 +163,6 @@ void Ekf::fuseMag()
return;
}
/*
When flying as a fixed wing aircraft, a misaligned magnetometer can cause an error in pitch/roll and accel bias estimates.
When MAG_FUSE_TYPE_AUTOFW is selected and the vehicle is flying as a fixed wing, then magnetometer fusion is only allowed
to access the magnetic field states.
*/
_control_status.flags.update_mag_states_only = (_params.mag_fusion_type == MAG_FUSE_TYPE_AUTOFW)
&& _control_status.flags.fixed_wing;
// update the states and covariance using sequential fusion of the magnetometer components
for (uint8_t index = 0; index <= 2; index++) {