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

fix(flaps): reverse-apply FPPU LUTs to compensate for non-linear behaviour #7302

Merged
merged 1 commit into from
Jun 19, 2022

Conversation

lukecologne
Copy link
Member

@lukecologne lukecologne commented Jun 18, 2022

Summary of Changes

This PR fixes a bug I introduced in #7221, regarding the impact of the flaps on the sim. Previously, the flaps systems assumed a linear flaps/slats surface angle vs. FPPU angle, and thus calculated the flaps/slat percentage as current FPPU angle / max FPPU angle. Now, in #7221, I changed the curve for flaps to a non linear one, which is realistic, as the way that the flaps are actuated creates a non-linear FPPU vs surface behaviour. This has now messed up the flaps angles in the sim, and thus the impact on the FM, since they are written to the sim as percentage. These percentages are now incorrect, due to the non-linear curve. To fix this situation, I have reverse-applied the LUTs, to linearize the flaps percentage. It is now again calculated correctly as current flaps angle / max flaps angle (not FPPU angle).

Screenshots (if necessary)

References

Additional context

Discord username (if different from GitHub):

Testing instructions

How to download the PR for QA

Every new commit to this PR will cause a new A32NX artifact to be created, built, and uploaded.

  1. Make sure you are signed in to GitHub
  2. Click on the Checks tab on the PR
  3. On the left side, click on the bottom PR tab
  4. Click on the A32NX download link at the bottom of the page

@lukecologne lukecologne changed the title fix(flaps): reverse-apply FPPU LUTs to compensate for non-linear beha… fix(flaps): reverse-apply FPPU LUTs to compensate for non-linear behaviour Jun 18, 2022
@2hwk 2hwk added this to the v0.9.0 milestone Jun 19, 2022
@2hwk 2hwk added the QA Tier 1 label Jun 19, 2022
@Benjozork Benjozork merged commit 6f70a36 into flybywiresim:master Jun 19, 2022
@lukecologne lukecologne deleted the flaps-fix branch June 19, 2022 18:08
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.

3 participants