From 8f9b5b228284a7d1975c4eea0cb0255d9d06d98c Mon Sep 17 00:00:00 2001 From: Corvus Corax Date: Sat, 7 Jun 2014 16:16:55 +0200 Subject: [PATCH] OP-1287 fix to lower speed limit in autocruise do not allow absolute zero speed to not loose direction --- flight/libraries/plans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flight/libraries/plans.c b/flight/libraries/plans.c index b2ee1b481..03798b5da 100644 --- a/flight/libraries/plans.c +++ b/flight/libraries/plans.c @@ -407,7 +407,7 @@ void plan_run_AutoCruise() controlVector[3] = 0.5f; // dummy, thrust is normalized separately normalizeDeadband(controlVector); // return value ignored ManualControlCommandThrustGet(&controlVector[3]); // no deadband as we are using thrust for velocity - controlVector[3] = boundf(controlVector[3], 0.0f, 1.0f); + controlVector[3] = boundf(controlVector[3], 1e-6f, 1.0f); // bound to above zero, to prevent loss of vector direction // normalize old desired movement vector float vector[3] = { pathDesired.End.North - hold_position[0],