forked from PX4/PX4-Autopilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VelocitySmoothing: fix division by zero cases
Problem: Zero maximum jerk and/or zero direction would lead to divisions by zero in various cases depending on the exact configuration and code path. Solution: There was already one check for the direction being zero in one path and I summarized to check in both updateDurations...() functions the product of direction * max_jerk to not be zero because that's exactly the value calculations devide by.
- Loading branch information
Showing
3 changed files
with
92 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters