Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plane: added fast attitude recovery for inverted flight in Q modes #28320

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Oct 5, 2024

This makes recovery to level a lot faster from an upset attitude when using a Q mode as a recovery mode. It resets the target thrust angle to be within the limits set for the vehicle, which prevents the input shaping from trying to keep the vehicle inverted

builds on #28316
thanks to @lthall

With GriffinPro in RealFlight
image
without this change:
image

@tridge
Copy link
Contributor Author

tridge commented Oct 6, 2024

@IamPete1 @priseborough @lthall I have a chat to Leonard about this, and he suggested we run this function all the time, not just when starting VTOL control.
I also hit an interesting issue where requesting a smaller angle actually led to a lot more altitude loss in recovery, which seemed counter intuitive to me. The reason seems to be that with a small angle passed to this function we end up pulling the nose down more during the recovery due to the demanded positive pitch rate in body frame when inverted. That leads to downward lift from the wings and a sharp drop in altitude. Example here:
http://uav.tridgell.net/tmp/att_recovery/
rec1.BIN has a small target angle, rec2.BIN a large target angle. rec1.BIN loses 29m, rec2.bin loses 14m
this makes me wonder if we should actually have a custom upset recovery function in the plane code which always targets zero pitch (or maybe max fixed wing pitch limit?) and runs its own controller based on VTOL angle P gains, driving both fixed wing and VTOL rate controllers with no shaping until we get back within the angle limits.

ensures we can recover from inverted flight quickly
when we start the VTOL motor stabilisation with an attitude beyond
normal attitude limits we will reset the thrust angle target to give
faster recovery
@tridge tridge force-pushed the pr-quadplane-inverted-recovery branch from e93be80 to 2ab01b4 Compare October 6, 2024 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants