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.
This commit is contained in:
Matthias Grob 2024-10-23 16:54:16 +02:00 committed by Silvan Fuhrer
parent 5a53190ed5
commit cac0133901

View File

@ -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