mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
FW Position Controller: fix Altitude mode without valid z reference (e.g. no GPS)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
parent
f91103af6e
commit
34cb69898e
@ -2304,7 +2304,7 @@ FixedwingPositionControl::Run()
|
||||
_reference_altitude = 0.f;
|
||||
}
|
||||
|
||||
_current_altitude = -_local_pos.z + _local_pos.ref_alt; // Altitude AMSL in meters
|
||||
_current_altitude = -_local_pos.z + _reference_altitude; // Altitude AMSL in meters
|
||||
|
||||
// handle estimator reset events. we only adjust setpoins for manual modes
|
||||
if (_control_mode.flag_control_manual_enabled) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user