mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-22 20:53:20 +08:00
ekf2: resetHeightTo -> resetAltitudeTo
The vertical position state is now an altitude, not just a local height
This commit is contained in:
committed by
Mathieu Bresciani
parent
93c690f133
commit
14fe6c2167
@@ -137,7 +137,7 @@ bool Ekf::setAltOrigin(const float altitude, const float vpos_var)
|
||||
if (!PX4_ISFINITE(_local_origin_alt) && isLocalVerticalPositionValid()) {
|
||||
const float local_alt_prev = _gpos.altitude();
|
||||
_local_origin_alt = altitude;
|
||||
resetHeightTo(local_alt_prev + _local_origin_alt);
|
||||
resetAltitudeTo(local_alt_prev + _local_origin_alt);
|
||||
|
||||
} else {
|
||||
const float delta_origin_alt = altitude - _local_origin_alt;
|
||||
@@ -235,7 +235,7 @@ bool Ekf::initialiseAltitudeTo(const float altitude, const float vpos_var)
|
||||
ECL_INFO("Origin alt=%.3f", (double)_local_origin_alt);
|
||||
}
|
||||
|
||||
resetHeightTo(altitude, vpos_var);
|
||||
resetAltitudeTo(altitude, vpos_var);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user