Repository navigation
Conversation
…e pilot acceleration
Global Size Summary (Total Flash delta in bytes)Built from 5ddf689 rebased onto a42f84a
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Limit the Loiter coordinated turn acceleration so that, combined with the pilot's acceleration request, it stays within the pilot lean angle limit. This fixes the speed surge after releasing the sticks reported in Loiter: speed surge after releasing pitch + yaw with coordinated turns on (4.7.2 SITL logs).
Classification & Testing (check all that apply and add your own)
Description
With LOIT_OPTIONS coordinated turns enabled, the turn acceleration (desired speed times yaw rate) was added to the pilot's acceleration without any limit. At moderate speed and full yaw the result exceeds the maximum lean angle, so the desired velocity turns faster than the aircraft can follow. The logs in the discussion show this, with the desired velocity at 6.8 m/s and the aircraft at 3.2 m/s when the sticks are released and the position error at its 2 m limit. The aircraft then speeds up to catch the desired velocity and stops about 12 m from the release point, compared with under 3 m with coordinated turns disabled.
The turn acceleration is now shortened along its own direction so that the pilot acceleration plus the turn acceleration does not exceed the Loiter pilot lean angle, capped by the AltHold lean angle limit. The remaining margin up to the full lean angle stays available for position correction. The limit is calculated once from the pilot's desired acceleration and added to both the desired and predicted accelerations. When the pilot's own request uses the whole budget, the turn acceleration is zero and Loiter behaves as it does with coordinated turns disabled.