fix(flaps): reverse-apply FPPU LUTs to compensate for non-linear behaviour #7302
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.
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 ascurrent 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.