From cac01339018b9beddcf669f7f2f67461c37fefd0 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Wed, 23 Oct 2024 16:54:16 +0200 Subject: [PATCH] FlightTaskDescned: fix horizontal acceleration overriding vertical one Also descend with more acceleration again to avoid the risk of ascending instead of descending because of a wrong hover thrust estimate. --- .../flight_mode_manager/tasks/Descend/FlightTaskDescend.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/flight_mode_manager/tasks/Descend/FlightTaskDescend.cpp b/src/modules/flight_mode_manager/tasks/Descend/FlightTaskDescend.cpp index 85ba49ea0bf2..4d16f7d4c9c7 100644 --- a/src/modules/flight_mode_manager/tasks/Descend/FlightTaskDescend.cpp +++ b/src/modules/flight_mode_manager/tasks/Descend/FlightTaskDescend.cpp @@ -55,7 +55,7 @@ bool FlightTaskDescend::update() } else { // descend with constant acceleration (crash landing) _velocity_setpoint(2) = NAN; - _acceleration_setpoint(2) = .15f; + _acceleration_setpoint(2) = .3f; } // Nudging @@ -69,7 +69,7 @@ bool FlightTaskDescend::update() _acceleration_setpoint(2) -= _sticks.getThrottleZeroCentered() * 10.f; } else { - _acceleration_setpoint = matrix::Vector3f(0.f, 0.f, NAN); // stay level to minimize horizontal drift + _acceleration_setpoint.xy() = matrix::Vector2f(0.f, 0.f); // stay level to minimize horizontal drift _yawspeed_setpoint = NAN; // keep heading