Skip to content

Commit

Permalink
EKF: Fix bug causing simultaneous range and baro height fusion (PX4#429)
Browse files Browse the repository at this point in the history
  • Loading branch information
priseborough authored and CarlOlsson committed Jun 25, 2018
1 parent a09bc06 commit f5fa328
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions EKF/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,8 +825,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 @@ -909,8 +908,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

0 comments on commit f5fa328

Please sign in to comment.