Copter: Set Force Descend to true only when in the last phase of landing #17824
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 PR fixes a problem where the aircraft crashes into the ground it the decent speed is greater than the maximum descent speed the aircraft is capable of. Land currently sets Force_Desend to true at all times. This PR changes this to only be true in the last phase of landing or when land_detect_maybe is true.
Before:
After:
This problem was discovered when descending with the callisto from 500m at 15m/s. This worked very well until we used land rather than a waypoint in a mission. The aircraft's terminal velocity is ~13m/s and attempting to descend at 15m/s resulted in the aircraft impacting the ground at 4m/s. No damage was done (sand) but this is a problem others may face.