flybywiresim / aircraft

The A32NX & A380X Project are community driven open source projects to create free Airbus aircraft in Microsoft Flight Simulator that are as close to reality as possible.
https://flybywiresim.com
GNU General Public License v3.0
5.15k stars 1.12k forks source link

fix(a380x/air cond): wasm crash during rapid decompression #9543

Closed mjuhe closed 1 day ago

mjuhe commented 1 week ago

Fixes #9215

Summary of Changes

Fixes an issue with the cabin air flow demand calculation that was causing a wasm crash during rapid decompression.

Screenshots (if necessary)

References

Additional context

The main issue was with the way the pack demand flow and the cabin fan extraction flow was calculated (some values went negative, which drove other values to infinity). I've also added a couple of small fixes that should help in case of adirs failures in flight.

Discord username (if different from GitHub): Commander Ga

Testing instructions

  1. Climb to FL400
  2. Trigger the "Rapid Decompression" faliure on the EFB
  3. Validate that the cabin altitude gets to ~40000ft and that the cabin temperatures stay in a reasonable range (20-30 deg)
  4. Fly for a few minutes, validate the wasm doesn't crash (the PFD continues to operate) and the cabin vertical speed stays within a reasonable range (+/- 100fpm)

How to download the PR for QA

Every new commit to this PR will cause new A32NX and A380X artifacts 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, find and click on the PR Build tab
  4. Click on either flybywire-aircraft-a320-neo, flybywire-aircraft-a380-842 (4K) or flybywire-aircraft-a380-842 (8K) download link at the bottom of the page
alexr4339 commented 1 week ago

Quality Assurance Tester

Discord Username : alexdnzdmb Object of testing : #9543 Aircraft :A380X Tier of Testing : 1 Date : 17/11/2024

Testing Process: Climb to FL400 - check Trigger the "Rapid Decompression" faliure on the EFB - check Validate that the cabin altitude gets to ~40000ft and that the cabin temperatures stay in a reasonable range (20-30 deg) - check, increased with around 6400 (seems as if 6400fpm is max indicated value) cabin fpm until probably 40k. However value only showed cab alt of 30k feet but cab alt still increased from 30k onwards until it probably reached around 40k, delta PSI indicates 0 as well image image

Fly for a few minutes, validate the wasm doesn't crash (the PFD continues to operate) and the cabin vertical speed stays within a reasonable range (+/- 100fpm) - check

Testing Results: Not passed (as indicated values are incorrect), passed if that is not scope of PR

Negatives:
CAB alt only shows values up to 30k feet amd doesnt match the cab alt clock instrument indication

Conclusions:

Media:

mjuhe commented 1 week ago

Thanks for the test @alexr4339 !! Sorry I forgot to mention that the indications only go to +/- 6400fpm (on the vertical speed) and 30,000ft (on the cabin altitude). This is a feature, not a bug 😄as that's how the ARINC data gets transmitted. You can see the real value of the cabin altitude checking the A32NX_PRESS_MAN_CABIN_ALTITUDE LVar in Behaviours.

Although if you experienced no unexpected jumps in VS or in cabin temperature, and most importantly no wasm crashes, I don't think this needs to be tested again.

flogross89 commented 3 days ago

can we merge this?

mjuhe commented 1 day ago

can we merge this?

All good from my side, will merge.