1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

OP-1287 fix to lower speed limit in autocruise do not allow absolute zero speed to not loose direction

This commit is contained in:
Corvus Corax 2014-06-07 16:16:55 +02:00
parent 090db92e8a
commit 8f9b5b2282

View File

@ -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],