mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 05:01:37 +08:00
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:
committed by
Silvan Fuhrer
parent
5a53190ed5
commit
cac0133901
@@ -55,7 +55,7 @@ bool FlightTaskDescend::update()
|
|||||||
} else {
|
} else {
|
||||||
// descend with constant acceleration (crash landing)
|
// descend with constant acceleration (crash landing)
|
||||||
_velocity_setpoint(2) = NAN;
|
_velocity_setpoint(2) = NAN;
|
||||||
_acceleration_setpoint(2) = .15f;
|
_acceleration_setpoint(2) = .3f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nudging
|
// Nudging
|
||||||
@@ -69,7 +69,7 @@ bool FlightTaskDescend::update()
|
|||||||
_acceleration_setpoint(2) -= _sticks.getThrottleZeroCentered() * 10.f;
|
_acceleration_setpoint(2) -= _sticks.getThrottleZeroCentered() * 10.f;
|
||||||
|
|
||||||
} else {
|
} 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;
|
_yawspeed_setpoint = NAN;
|
||||||
|
|
||||||
// keep heading
|
// keep heading
|
||||||
|
|||||||
Reference in New Issue
Block a user