Fixed wing Auto Speed Mode#11595
Open
breadoven wants to merge 2 commits into
Open
Conversation
Contributor
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Test firmware build ready — commit Download firmware for PR #11595 237 targets built. Find your board's
|
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.
Adds Auto Speed mode for fixed wing similar to #10928.
Operation is pretty simple. It is enabled as an aux mode so can be activated in the usual way. Minimum and maximum allowed speeds are set using 2 settings with a range of 5 to 50 m/s, defaults of 11m/s and 22m/s respectively.. The desired speed is set between these limits using the throttle stick which acts as a speed controller only. An OSD element has been added which displays the current set speed, this is only visible when Auto speed mode is active. Speeds are 3D GPS based so a valid velocity estimated is required. There is no option to use pitot airspeed at the moment, virtual or otherwise, but it could be added.
Throttle is automatically controlled using PID control with P, I and D inputs with filtering to damp out rapid throttle changes. In Nav modes the normal fixed wing pitch to throttle control is bypassed as are the other speed related functions. There are no minimum and maximum throttle limits set at the moment, throttle is controlled over the full range from idle to maximum. This could be changed if need be, perhaps defaulting to using the current
nav_fw_min_thrandnav_fw_max_thrsettings.The mode can be activated in all cases except during during Failsafe, Launch, FW Auto landing and Emergency Landing. So it can be using in Manual and Acro as well as the other navigation modes.
Currently there is no way to rapidly shut off the mode other than via the aux activation. This may need to be looked further if it's considered a problem together with other changes to improve functionality such as dealing with strong head winds etc.
HITL tested only at the moment where it works well with the default PID tune. Throttle control is smooth and responsive.
Configurator support iNavFlight/inav-configurator#2641.