mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15: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:
parent
090db92e8a
commit
8f9b5b2282
@ -407,7 +407,7 @@ void plan_run_AutoCruise()
|
|||||||
controlVector[3] = 0.5f; // dummy, thrust is normalized separately
|
controlVector[3] = 0.5f; // dummy, thrust is normalized separately
|
||||||
normalizeDeadband(controlVector); // return value ignored
|
normalizeDeadband(controlVector); // return value ignored
|
||||||
ManualControlCommandThrustGet(&controlVector[3]); // no deadband as we are using thrust for velocity
|
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
|
// normalize old desired movement vector
|
||||||
float vector[3] = { pathDesired.End.North - hold_position[0],
|
float vector[3] = { pathDesired.End.North - hold_position[0],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user