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: tailsitter: use true hover throttle for VTOL transition and report in VFR_HUD #15811

Merged
merged 3 commits into from
Nov 18, 2020

Conversation

IamPete1
Copy link
Member

@IamPete1 IamPete1 commented Nov 14, 2020

Fixes #15798

This changes to calculate the true hover throttle in back transition, the current behavior is to directly apply the hover percentage. This percentage is only the valid hover throttle when the copter expo, spin and pwm min and max are applied. To allow this AP_Motors function thrust_to_actuator() is moved to public.

This is a example transition on master. Transitions to mid stick Qstab should be the hover throttle. Showing the left and right throttle output PWM

THrottle hover before

The small step is direct application of hover throttle percentage. The large step is the change to the true hover throttle in Qstab.

Now with this patch.

THrottle hover after

The throttle jumps directly to the true hover throttle for the transition, there is then a small step due to the throttle position in Qstab.

This also fixes the throttle value sent back over VFR_HUD, current master does not update the throttle value during transition, your just left with the last valve from a VTOL mode.

Master (the square dip):
VFR-hud before

This patch:
VFR-hud after

The big jump is due to the above patch, were reporting as the true throttle output because its not going via AP_Motors, once AP_Motors is active the throttle drops again.

Copy link
Contributor

@kd0aij kd0aij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, LGTM

@IamPete1
Copy link
Member Author

rebased

@tridge
Copy link
Contributor

tridge commented Nov 18, 2020

merge when passes CI

@tridge tridge merged commit 0e50023 into ArduPilot:master Nov 18, 2020
@IamPete1 IamPete1 deleted the VFR_HUD_throttle branch November 18, 2020 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VFR_HUD.throttle incorrect during tailsitter transitions
3 participants