ekf2: Add new mag fusion mode

Adds a mode where mag fusion is only used update the field estimates
This commit is contained in:
Paul Riseborough
2017-10-12 14:50:23 +11:00
parent 9c65968c3d
commit 7b4c957ad4
3 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -1105,7 +1105,7 @@ void Ekf::controlMagFusion()
// do no magnetometer fusion at all
_control_status.flags.mag_hdg = false;
_control_status.flags.mag_3D = false;
} else if (_params.mag_fusion_type == MAG_FUSE_TYPE_AUTO) {
} else if (_params.mag_fusion_type == MAG_FUSE_TYPE_AUTO || _params.mag_fusion_type == MAG_FUSE_TYPE_AUTOFW) {
// Check if height has increased sufficiently to be away from ground magnetic anomalies
bool height_achieved = (_last_on_ground_posD - _state.pos(2)) > 1.5f;