mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 15:28:53 +08:00
mc_pos_control smooth takeoff: if velocity is valid, the control velocity in xy during takeoff
This commit is contained in:
committed by
Daniel Agar
parent
4b70584cf4
commit
345d3278d1
@@ -687,7 +687,7 @@ MulticopterPositionControl::run()
|
||||
setpoint.thrust[0] = setpoint.thrust[1] = NAN;
|
||||
|
||||
if (PX4_ISFINITE(_states.velocity(0)) && PX4_ISFINITE(_states.velocity(1))) {
|
||||
setpoint.vx = setpoint.vy = NAN; // try to keep zero velocity
|
||||
setpoint.vx = setpoint.vy = 0.0f; // try to keep zero velocity
|
||||
|
||||
} else {
|
||||
setpoint.thrust[0] = setpoint.thrust[1] = 0.0f; // just keeping pointing upwards
|
||||
|
||||
Reference in New Issue
Block a user