[Multirotor Only] Automatic learning of hover throttle #8507
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 adds an algorithm that has the ability to automatically learn the value of the Throttle Hover to be used in flight modes that depend on Alt-Hold (Pos-Hold, WP and RTH). The Throttle Hover value calculated by the algorithm will slowly move towards the average engine power whenever the vehicle is maintaining a constant hover (Functional only when Alt-Hold is active (Alt-Hold alone, or Pos-Hold), does not work on Angle, Horizon or Acro). By default this feature will always be active, and can be turned off by the user through the
nav_mc_thr_hover_learn
parameter.Two good things this PR promises:
This prevents users from creating multiple battery profiles, with a different Hover configuration to fly with batteries of different voltages.
The user does not need to fly and find the correct Throttle Hover value to be set in the
nav_mc_hover_thr
parameter, the algorithm will do it itself.How to make the feature calculate the Hover value for your Multirotor:
1 - Arm
2 - TakeOff
3 - Fly hovering in Alt-Hold or Pos-Hold.
4 - Avoid vertical speeds (Z) above 60 cm/s up and down (Above that the feature will be turned off).
5 - Avoid making the Roll and Pitch angles greater than 5 degrees of inclination.
6 - Wait for something between 10 to 15 seconds (The time here depends on how your multirotor is behaving, see previous steps 4 and 5).
7 - Disable Alt-Hold or Pos-Hold.
8 - Land
9 - Disarm. Done, you have an automatically calculated Throttle Hover value (See the new value stored in the
nav_mc_hover_thr
parameter)