Skip to content

Commit

Permalink
feat(cond): air conditioning failures (#8178)
Browse files Browse the repository at this point in the history
* feat: cabin fans failures

* feat: hot air failure

* feat: trim valves and duct overheat failures

* feat: zone controller failures

* feat: introduce arinc discrete words

* chore: remove unused lvars after arinc

* feat: trim air high pressure failure

* feat: timers for overheat and taprv failure

* refactor: acsc split

* feat: acsc failures

* feat: valve travel and pack smoothness

* feat: changelog and final adjustments

* fix: type acsc line -> lane

* fix: rust review comments

* fix: correct buses to power acsc channels

* style: correct case in variable naming

* refactor: duct demand temperature vector

* fix: correct buses for acsc 2
  • Loading branch information
mjuhe authored Sep 22, 2023
1 parent a59f745 commit c31b180
Show file tree
Hide file tree
Showing 15 changed files with 2,192 additions and 474 deletions.
1 change: 1 addition & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
1. [SD] Connect SD BLEED page APU bleed pressure indication to correct ADRs - @BlueberryKing (BlueberryKing)
1. [FMS] Use station declination when appropriate for fix info and place/bearing radials - @tracernz (Mike)
1. [MCDU] Fixed the FMGC annunciator light not illuminating - @tracernz (Mike)
1. [COND] Add Air Conditioning systems failures - @mjuhe (Miquel Juhe)

## 0.10.0

Expand Down
68 changes: 53 additions & 15 deletions fbw-a32nx/docs/a320-simvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -2628,6 +2628,59 @@ In the variables below, {number} should be replaced with one item in the set: {

## Air Conditioning / Pressurisation / Ventilation

- A32NX_COND_ACSC_{number}_DISCRETE_WORD_1
- Number 1 or 2
- Discrete Data word 1 of the ACSC bus output (label 060)
- Arinc429<Discrete>
- | Bit | Description |
|:---:|:----------------------------------------------------:|
| 11 | Duct overheat F/D warning |
| 12 | Duct overheat FWD warning |
| 13 | Duct overheat AFT warning |
| 14 | Not used |
| 15 | Not used |
| 16 | Not used |
| 17 | Spare |
| 18 | Trim air pressure high |
| 19 | ACSC Lane 1 Active |
| 20 | TAPRV status - close |
| 21 | ACSC Lane 1 INOP |
| 22 | ACSC Lane 2 INOP |
| 23 | Hot air switch position on |
| 24 | G + T fan off/fault |
| 25 | Recirc fan LH fault/OVHT |
| 26 | Recirc fan RH fault/OVHT |
| 27 | TAPRV disagree |
| 28 | Trim air system fault |
| 29 | ACSC Installed |

- A32NX_COND_ACSC_{number}_DISCRETE_WORD_2
- Number 1 or 2
- Discrete Data word 2 of the ACSC bus output (label 061)
- Bits with * not yet implemented
- Arinc429<Discrete>
- | Bit | Description |
|:---:|:----------------------------------------------------:|
| 11 | Spare |
| 12 | *K1 half wing anti-ice on |
| 13 | *K2 full wing anti-ice on |
| 14 | *K3 nacelle anti-ice on |
| 15 | *K4 air cond with two packs on |
| 16 | *K5 air cond with one pack on |
| 17 | *K6 air cond with two packs and one engine on |
| 18 | Trim valve F/D inop |
| 19 | Trim valve FWD inop |
| 20 | Trim valve AFT inop |
| 21 | Not used |
| 22 | Not used |
| 23 | *FCV status (Both pakcs off) |
| 24 | *One pack operation |
| 25 | *FCV status (Both pakcs on) |
| 26 | Spare |
| 27 | *Nacelle anti-ice eng 2 open |
| 28 | *Nacelle anti-ice eng 1 open |
| 29 | Spare |

- A32NX_COND_{id}_TEMP
- Degree Celsius
- Temperature as measured in each of the cabin zones and cockpit
Expand Down Expand Up @@ -2660,14 +2713,6 @@ In the variables below, {number} should be replaced with one item in the set: {
- FWD
- AFT

- A32NX_HOT_AIR_VALVE_IS_ENABLED
- Bool
- True if the trim air system is enabled (pushbutton in auto and power supplied to system)

- A32NX_HOT_AIR_VALVE_IS_OPEN
- Bool
- True if the trim air system is enabled and the hot air valve is open

- A32NX_OVHD_COND_{id}_SELECTOR_KNOB
- Percentage
- Percent rotation of the overhead temperature selectors for each of the cabin zones
Expand Down Expand Up @@ -2759,13 +2804,6 @@ In the variables below, {number} should be replaced with one item in the set: {
- Bool
- True if CAB FANS pushbutton is in the on position (no white light)

- A32NX_PACKS_{number}_IS_SUPPLYING
- Bool
- True if the corresponding pack is on and supplying air to the cabin
- {number}
- 1
- 2

## Pneumatic

- A32NX_PNEU_ENG_{number}_IP_PRESSURE:
Expand Down
16 changes: 16 additions & 0 deletions fbw-a32nx/src/systems/failures/src/a320.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
// One can rightfully argue that this constant shouldn't be located in @flybywiresim/failures.
// Once we create an A320 specific package, such as @flybywiresim/a320, we can move it there.
export const A320Failure = Object.freeze({
Acsc1Lane1: 21000,
Acsc1Lane2: 21001,
Acsc2Lane1: 21002,
Acsc2Lane2: 21003,
HotAir: 21004,
TrimAirHighPressure: 21005,
CkptTrimAirFailure: 21006,
FwdTrimAirFailure: 21007,
AftTrimAirFailure: 21008,
CkptDuctOvht: 21009,
FwdDuctOvht: 21010,
AftDuctOvht: 21011,
CabinFan1Failure: 21012,
CabinFan2Failure: 21013,
LabGalleyFan: 21014,

Fac1Failure: 22000,
Fac2Failure: 22001,

Expand Down
41 changes: 41 additions & 0 deletions fbw-a32nx/src/systems/instruments/src/Common/EWDMessages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,49 @@ const EWDMessages = {
'213122114': '\x1b<5m MAX FL.....100/MEA-MORA',
'213122115': '\x1b<7m .IF CAB ALT>14000FT:',
'213122116': '\x1b<5m -PAX OXY MASKS...MAN ON',
'216120601': '\x1b<4m\x1b4mAIR\x1bm PACK 1+2 FAULT',
'216120602': '\x1b<5m -PACK 1.............OFF',
'216120603': '\x1b<5m -PACK 2.............OFF',
'216120604': '\x1b<5m -DES TO FL 100/MEA-MORA',
'216120605': '\x1b<7m .WHEN DIFF PR <1 PSI',
'216120606': '\x1b<7m AND FL BELOW 100:',
'216120607': '\x1b<5m -RAM AIR.............ON',
'216120608': '\x1b<5m MAX FL.....100/MEA-MORA',
'216120201': '\x1b<4m\x1b4mAIR\x1bm PACK 1 FAULT',
'216120202': '\x1b<5m -PACK 1.............OFF',
'216120301': '\x1b<4m\x1b4mAIR\x1bm PACK 2 FAULT',
'216120302': '\x1b<5m -PACK 2.............OFF',
'216120701': '\x1b<4m\x1b4mAIR\x1bm PACK 1 OFF',
'216120801': '\x1b<4m\x1b4mAIR\x1bm PACK 2 OFF',
'216129101': '\x1b<4m\x1b4mAIR\x1bm COND CTL 1-A FAULT',
'216129401': '\x1b<4m\x1b4mAIR\x1bm COND CTL 2-A FAULT',
'216129701': '\x1b<4m\x1b4mAIR\x1bm COND CTL 1-B FAULT',
'216129801': '\x1b<4m\x1b4mAIR\x1bm COND CTL 2-B FAULT',
'216321001': '\x1b<4m\x1b4mCOND\x1bm CKPT DUCT OVHT',
'216321002': '\x1b<7m .WHEN DUCT TEMP<70 DEG C:',
'216321003': '\x1b<7m .WHEN DUCT TEMP<158 DEG F:',
'216321004': '\x1b<5m -HOT AIR....OFF THEN ON',
'216321101': '\x1b<4m\x1b4mCOND\x1bm FWD CAB DUCT OVHT',
'216321102': '\x1b<7m .WHEN DUCT TEMP<70 DEG C:',
'216321103': '\x1b<7m .WHEN DUCT TEMP<158 DEG F:',
'216321104': '\x1b<5m -HOT AIR....OFF THEN ON',
'216321201': '\x1b<4m\x1b4mCOND\x1bm AFT CAB DUCT OVHT',
'216321202': '\x1b<7m .WHEN DUCT TEMP<70 DEG C:',
'216321203': '\x1b<7m .WHEN DUCT TEMP<158 DEG F:',
'216321204': '\x1b<5m -HOT AIR....OFF THEN ON',
'216321801': '\x1b<4m\x1b4mCOND\x1bm L+R CAB FAN FAULT',
'216321802': '\x1b<5m -PACK FLOW...........HI',
'216326001': '\x1b<4m\x1b4mCOND\x1bm LAV+GALLEY FAN FAULT',
'216329001': '\x1b<4m\x1b4mCOND\x1bm HOT AIR FAULT',
'216329002': '\x1b<5m -HOT AIR............OFF',
'216329003': '\x1b<7m .IF HOT AIR STILL OPEN:',
'216329004': '\x1b<5m -PACK 1.............OFF',
'216329005': '\x1b<5m -PACK 2.............OFF',
'216330501': '\x1b<4m\x1b4mCOND\x1bm TRIM AIR SYS FAULT',
'216330502': '\x1b<4m -CPKT TRIM VALVE',
'216330503': '\x1b<4m -FWD CAB TRIM VALVE',
'216330504': '\x1b<4m -AFT CAB TRIM VALVE',
'216330505': '\x1b<4m -TRIM AIR HI PR',
'221070001': '\x1b<4m\x1b4mT.O\x1bm SPEEDS TOO LOW',
'221070002': '\x1b<5m -TOW AND T.O DATA.CHECK',
'221071001': '\x1b<4m\x1b4mT.O\x1bm V1/VR/V2 DISAGREE',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ interface FailuresOrchestratorContext {
}

const createOrchestrator = () => new FailuresOrchestrator('A32NX', [
[21, A320Failure.Acsc1Lane1, 'ACSC 1 Lane 1'],
[21, A320Failure.Acsc1Lane2, 'ACSC 1 Lane 2'],
[21, A320Failure.Acsc2Lane1, 'ACSC 2 Lane 1'],
[21, A320Failure.Acsc2Lane2, 'ACSC 2 Lane 2'],
[21, A320Failure.HotAir, 'Trim Air Pressure Regulating Valve'],
[21, A320Failure.TrimAirHighPressure, 'Trim Air System High Pressure'],
[21, A320Failure.CkptTrimAirFailure, 'Cockpit Trim Air Valve'],
[21, A320Failure.FwdTrimAirFailure, 'Forward Zone Trim Air Valve'],
[21, A320Failure.AftTrimAirFailure, 'Aft Zone Trim Air Valve'],
[21, A320Failure.CkptDuctOvht, 'Cockpit Duct Overheat'],
[21, A320Failure.FwdDuctOvht, 'Forward Zone Duct Overheat'],
[21, A320Failure.AftDuctOvht, 'Aft Zone Duct Overheat'],
[21, A320Failure.CabinFan1Failure, 'Cabin Fan 1'],
[21, A320Failure.CabinFan2Failure, 'Cabin Fan 2'],
[21, A320Failure.LabGalleyFan, 'Extraction Fan of lavatory and galley'],

[22, A320Failure.Fac1Failure, 'FAC 1'],
[22, A320Failure.Fac2Failure, 'FAC 2'],

Expand Down
Loading

0 comments on commit c31b180

Please sign in to comment.