Skip to content

Commit

Permalink
Use helper function to switch to gps height
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilritz authored and bresch committed Dec 11, 2019
1 parent 042d9b6 commit 88c4929
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions EKF/gps_checks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ bool Ekf::collect_gps(const gps_message &gps)
// if the user has selected GPS as the primary height source, switch across to using it
if (_params.vdist_sensor_type == VDIST_SENSOR_GPS) {
ECL_INFO_TIMESTAMPED("EKF GPS checks passed (WGS-84 origin set, using GPS height)");
_control_status.flags.baro_hgt = false;
_control_status.flags.gps_hgt = true;
_control_status.flags.rng_hgt = false;
setControlGPSHeight();
// zero the sensor offset
_hgt_sensor_offset = 0.0f;
} else {
Expand Down

0 comments on commit 88c4929

Please sign in to comment.