Plane: Quadplane QPOS1 never acclerate away from home #21102
Closed
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.
Currently the QPOS1 controller always accelerates away from home. This is to decelerate the vehicle based on the assumption that you will always be moving towards home and want to slow down. However if your not this causes issues, such as #21064
Take off in Qloiter, switch to loiter and then QRTL.

The vehicle is pushed away from home by this "deceleration".
This PR stops it doing that resulting in:
Once in the QPOS1 state it takes a more or less tangential path. This is better but still not really ideal.
I think the underlying problem is that were inputting velocity and acceleration. To calculate those velocity's and accelerations we have a limited position controller.
I think we should just be using the full position controller. However, we may need to add some functionality to allow overspeeds.
Just a draft because its not a great solution but does highlight the issue.