Altitude FlightTask based on jerk-limited trajectory generator #11744
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This FlightTask is a strip-down version of the PositionSmoothVel FlightTask in order to have consistent behavior between altitude and position controlled modes for a specific position sub-mode (
MPC_POS_MODE
)This FlightTask is then used in altitude mode, when
MPC_POS_MODE
= 3.There will come later a refactor of both AltitudeSmoothVel and PositionSmoothVel in order to reduce the amount of copy/paste between those two FlightTasks.
The plot below shows a SITL test where the first part (until the red vertical line) is Altitude mode and the second part (after the red vertical line) is Position mode.
Describe problem solved by the proposed pull request
When
MPC_POS_MODE
= 3 (Smooth velocity), the behavior of the Z axis is different between the Altitude and Position controlled modes.Describe your preferred solution
Use the same algorithm for altitude and position control.