mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 21:33:33 +08:00
Use helper function to switch to gps height
This commit is contained in:
committed by
Mathieu Bresciani
parent
042d9b6615
commit
88c4929c96
+1
-3
@@ -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 the user has selected GPS as the primary height source, switch across to using it
|
||||||
if (_params.vdist_sensor_type == VDIST_SENSOR_GPS) {
|
if (_params.vdist_sensor_type == VDIST_SENSOR_GPS) {
|
||||||
ECL_INFO_TIMESTAMPED("EKF GPS checks passed (WGS-84 origin set, using GPS height)");
|
ECL_INFO_TIMESTAMPED("EKF GPS checks passed (WGS-84 origin set, using GPS height)");
|
||||||
_control_status.flags.baro_hgt = false;
|
setControlGPSHeight();
|
||||||
_control_status.flags.gps_hgt = true;
|
|
||||||
_control_status.flags.rng_hgt = false;
|
|
||||||
// zero the sensor offset
|
// zero the sensor offset
|
||||||
_hgt_sensor_offset = 0.0f;
|
_hgt_sensor_offset = 0.0f;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user