fix: Pounds - kilograms units conversion #5896
Merged
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.
Fixes #[issue_no]
Summary of Changes
Changes kilograms per pound units conversion in our utilities coding to better match what MSFS uses internally. This PR is intended to complement PR #5895 (although that PR is not necessary for this one to be merged).
Screenshots (if necessary)
The current conversion in the NX Utilities package is 2.20462 kg/lb. This PR changes it to 2.204625 lb/kg. Although that is not the exact conversion you will find in any online converters ( 2.2046226218 kg/lb), it is what is necessary to match MSFS weights. See the following screenshots with weights in pounds and then with kilograms:
I filled each loading station and fuel tank with the max allowed by the slider in order to maximize the weights and therefore the accuracy of this check.
Here is a screenshot of a spreadsheet I used to find a conversion, starting with the weight in pounds (which is what MSFS uses as its base) and converting it to kilograms. First, I tried different conversions to match the 198856 lbs fully loaded weight in kg. Starting with the current utils conversion factor of 2.20462, you can see that this would round off to 90200 kg, whereas the MSFS weight is 90199 kg. I then tried several conversions until finding the one that matched.
After that, I checked each loading station using that conversion (2.204625) and comparing it to the MSFS weight in kg to the same precision level as the MSFS weights are shown.) Lastly, as a final check on the original 2.20462 conversion, I compared it to the MSFS kg weight for the center and inner fuel tanks. With that conversion, the kg weights were not converted to the exact MSFS weights. (They are off by a whopping 0.01 kg! xD)
Anyway, in the interest of exact matching of MSFS weight conversions, I propose this PR.
References
Additional context
Discord username (if different from GitHub): donbikes#4084
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.