From 42cedb7fdafbcc7b8183381f98dc1073194e8e0a Mon Sep 17 00:00:00 2001 From: bresch Date: Fri, 13 Sep 2019 10:35:19 +0200 Subject: [PATCH] VelocitySmoothing - Change direction of "brake" as braking means that only the T3 part is required and that the jerk applied during T3 is the opposite of the one defined by "_direction". --- src/lib/FlightTasks/tasks/Utility/VelocitySmoothing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/FlightTasks/tasks/Utility/VelocitySmoothing.cpp b/src/lib/FlightTasks/tasks/Utility/VelocitySmoothing.cpp index ec85a9d6df..d54cdb33b0 100644 --- a/src/lib/FlightTasks/tasks/Utility/VelocitySmoothing.cpp +++ b/src/lib/FlightTasks/tasks/Utility/VelocitySmoothing.cpp @@ -188,7 +188,7 @@ int VelocitySmoothing::computeDirection() if (direction == 0) { // If by braking immediately the velocity is exactly // the require one with zero acceleration, then brake - direction = -math::sign(_state.a); + direction = math::sign(_state.a); } return direction;