mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
FlightTask: preserve vertical velocity during reactivation
to allow descending by stick for reliable land detection. Issue: Stick smoothing gets completely reset to state when not taken off -> downwards velocity setpoint is gone when not taken off -> in_descend flag of land detection is never true when not taken off -> when landing but falling out of landing it landing detection fails bafore taking off and landing again
This commit is contained in:
parent
c20e5e3a00
commit
a461bb971a
@ -20,7 +20,10 @@ bool FlightTask::activate(const vehicle_local_position_setpoint_s &last_setpoint
|
||||
|
||||
void FlightTask::reActivate()
|
||||
{
|
||||
activate(empty_setpoint);
|
||||
// Preserve vertical velocity while on the ground to allow descending by stick for reliable land detection
|
||||
vehicle_local_position_setpoint_s setpoint_preserve_vertical{empty_setpoint};
|
||||
setpoint_preserve_vertical.vz = _velocity_setpoint(2);
|
||||
activate(setpoint_preserve_vertical);
|
||||
}
|
||||
|
||||
bool FlightTask::updateInitialize()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user