mc_pos_control smooth takeoff: if velocity is valid, the control velocity in xy during takeoff

This commit is contained in:
Dennis Mannhart
2018-10-16 11:13:00 -04:00
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