mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 02:36:37 +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:
@@ -2304,7 +2304,7 @@ FixedwingPositionControl::Run()
|
|||||||
_reference_altitude = 0.f;
|
_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
|
// handle estimator reset events. we only adjust setpoins for manual modes
|
||||||
if (_control_mode.flag_control_manual_enabled) {
|
if (_control_mode.flag_control_manual_enabled) {
|
||||||
|
|||||||
Reference in New Issue
Block a user