Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

EKF: Fix bug causing simultaneous range and baro height fusion #429

Merged
merged 1 commit into from
May 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions EKF/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -836,8 +836,7 @@ void Ekf::controlHeightFusion()
}
}

} else if (_baro_data_ready && !_baro_hgt_faulty &&
!(_in_range_aid_mode && !_range_data_ready && !_rng_hgt_faulty)) {
} else if (!_in_range_aid_mode && _baro_data_ready && !_baro_hgt_faulty) {
setControlBaroHeight();
_fuse_height = true;
_in_range_aid_mode = false;
Expand Down Expand Up @@ -920,8 +919,7 @@ void Ekf::controlHeightFusion()
}
}

} else if (_gps_data_ready && !_gps_hgt_faulty &&
!(_in_range_aid_mode && !_range_data_ready && !_rng_hgt_faulty)) {
} else if (!_in_range_aid_mode && _gps_data_ready && !_gps_hgt_faulty) {
setControlGPSHeight();
_fuse_height = true;
_in_range_aid_mode = false;
Expand Down