Skip to content

Commit

Permalink
fix: Revert "feat(pfd): Add vertical deviation indicator, ROW/ROP/OAN…
Browse files Browse the repository at this point in the history
…S warnings (#8605)" (#8680)

Revert "feat(pfd): Add vertical deviation indicator, ROW/ROP/OANS warnings (#8605)"

This reverts commit 4bedac5.
  • Loading branch information
BlueberryKing committed Jun 16, 2024
1 parent 4bedac5 commit 99b7564
Show file tree
Hide file tree
Showing 43 changed files with 178 additions and 1,808 deletions.
1 change: 0 additions & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
1. [EFCS] Fix ground spoiler retraction after increasing TLA slightly above 0 - @lukecologne (luke)
1. [FWC] Improved LDG LT memo to take into account light position - @BravoMike99 (bruno_pt99)
1. [PRESS] Add pressurization system failures - @mjuhe (Miquel Juhe)
1. [PFD] Implement alerts within artificial horizon (ROP, ROW, OANS, stall, windshear) @flogross89 (Flo)

## 0.11.0

Expand Down
58 changes: 0 additions & 58 deletions fbw-a32nx/docs/a320-simvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
- [Landing Gear (ATA 32)](#landing-gear-ata-32)
- [ATC (ATA 34)](#atc-ata-34)
- [Radio Altimeter (ATA 34)](#radio-altimeter-ata-34)
- [GPWS / TAWS (ATA 34)](#gpws--taws-ata-34)
- [ROW / ROP / OANS (ATA 34)](#row--rop--oans-ata-34)
- [Electronic Flight Bag (ATA 46)](#electronic-flight-bag-ata-46)

## Uncategorized
Expand Down Expand Up @@ -3915,62 +3913,6 @@ In the variables below, {number} should be replaced with one item in the set: {
- 1
- 2

## GPWS / TAWS (ATA 34)
- `A32NX_EGPWS_ALERT_{1 | 2}_DISCRETE_WORD_1`
- Data word for GPWS alerts. Used for displaying alerts on the PFD (on the A380) and triggering aural warnings
- Arinc429<Discrete>
- | Bit | Description |
|:---:|:----------------------:|
| 11 | SINKRATE |
| 12 | PULL UP |
| 13 | TERRAIN |
| 14 | DON'T SINK |
| 15 | TOO LOW GEAR |
| 16 | TOO LOW FLAPS |
| 17 | TOO LOW TERRAIN |
| 18 | GLIDESLOPE |
| 20 | TERRAIN PULL UP |
| 22 | TERRAIN AHEAD PULL UP |
| 27 | TERRAIN AHEAD |

- `A32NX_EGPWS_ALERT_{1 | 2}_DISCRETE_WORD_2`
- Data word for GPWS alerts. Used for displaying alerts on the PFD (on the A380) or on the GPWS visual indicators on the A320
- Arinc429<Discrete>
- | Bit | Description |
|:---:|:----------------------------:|
| 11 | G/S CANCEL |
| 12 | GPWS ALERT |
| 13 | GPWS WARNING |
| 14 | GPWS INOP |
| 15 | W/S WARNING |
| 16 | AUDIO ON |
| 22 | TERRAIN AWARENESS WARNING |
| 23 | TERRAIN AWARENESS CAUTION |
| 24 | TERRAIN AWARENESS INOP |
| 25 | EXTERNAL FAULT |
| 26 | TERRAIN AWARENESS NOT AVAIL. |

## ROW / ROP / OANS (ATA 34)

- A32NX_ROW_ROP_WORD_1
- Data word for ROW and ROP functions. Used for displaying alerts on the PFD.
- Arinc429<Discrete>
- | Bit | Description |
|:---:|:---------------------------------:|
| 11 | ROW/ROP operative |
| 12 | ROP: Active with autobrake |
| 13 | ROP: Active with manual braking |
| 14 | ROW Wet: Runway too short |
| 15 | ROW Dry: Runway too short |

- A32NX_OANS_WORD_1
- Data word for OANS functions. Used for displaying alerts on the PFD.
- Arinc429<Discrete>
- | Bit | Description |
|:---:|:---------------------------------:|
| 11 | OANS: Runway ahead |


## Electronic Flight Bag (ATA 46)

- A32NX_PUSHBACK_SYSTEM_ENABLED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2306,50 +2306,15 @@
</Requires>
</Sound>

<!-- Stall warning =====================================================================-->
<Sound WwiseEvent="aural_stall_new" WwiseData="true" NodeName="PEDALS_LEFT" LocalVar="A32NX_AUDIO_STALL_WARNING" Continuous="true">
<Range LowerBound="1"/>
<Requires SimVar="ELECTRICAL MAIN BUS VOLTAGE" Units="VOLTS" Index="1">
<Range LowerBound="28" />
</Requires>
</Sound>

<!-- ROP/ROW warnings =====================================================================-->
<Sound WwiseEvent="brake_max_braking" WwiseData="true" NodeName="Wiper_Base_l" LocalVar="A32NX_AUDIO_ROP_MAX_BRAKING" Continuous="true">
<Range LowerBound="1"/>
<Requires SimVar="ELECTRICAL MAIN BUS VOLTAGE" Units="VOLTS" Index="1">
<Range LowerBound="28" />
</Requires>
</Sound>

<Sound WwiseEvent="set_max_reverse" WwiseData="true" NodeName="Wiper_Base_l" LocalVar="A32NX_AUDIO_ROW_SET_MAX_REVERSE" Continuous="true">
<Range LowerBound="1"/>
<Requires SimVar="ELECTRICAL MAIN BUS VOLTAGE" Units="VOLTS" Index="1">
<Range LowerBound="28" />
</Requires>
</Sound>

<Sound WwiseEvent="keep_max_reverse" WwiseData="true" NodeName="Wiper_Base_l" LocalVar="A32NX_AUDIO_ROP_KEEP_MAX_REVERSE" Continuous="false">
<Range LowerBound="1"/>
<Requires SimVar="ELECTRICAL MAIN BUS VOLTAGE" Units="VOLTS" Index="1">
<Range LowerBound="28" />
</Requires>
</Sound>

<Sound WwiseEvent="runway_too_short" WwiseData="true" NodeName="Wiper_Base_l" LocalVar="A32NX_AUDIO_ROW_RWY_TOO_SHORT" Continuous="true">
<Range LowerBound="1"/>
<Requires SimVar="ELECTRICAL MAIN BUS VOLTAGE" Units="VOLTS" Index="1">
<Range LowerBound="28" />
</Requires>
</Sound>

</SimVarSounds>

<!-- AvionicSounds ========================================================================================== -->

<AvionicSounds>
<Sound WwiseData="true" WwiseEvent="cchordshort" Continuous="false" NodeName="PEDALS_LEFT" ViewPoint="Inside"/>
<Sound WwiseData="true" WwiseEvent="cchordloop" Continuous="true" NodeName="PEDALS_LEFT" ViewPoint="Inside"/>
<Sound WwiseData="true" WwiseEvent="aural_stall" />
<Sound WwiseData="true" WwiseEvent="aural_stall_new" NodeName="PEDALS_LEFT" ViewPoint="Inside" />
<Sound WwiseData="true" WwiseEvent="aural_pull_up" />
<Sound WwiseData="true" WwiseEvent="aural_pullup_new" Continuous="false" NodeName="PEDALS_LEFT" ViewPoint="Inside"/>
<Sound WwiseData="true" WwiseEvent="aural_overspeed" />
Expand Down Expand Up @@ -2423,6 +2388,13 @@
<Sound WwiseData="true" WwiseEvent="traffic_traffic" NodeName="Wiper_Base_l" />
<Sound WwiseData="true" WwiseEvent="TCAS_sys_test_OK" NodeName="Wiper_Base_l" />

<!-- ROPS callouts ==================================================================================== -->

<Sound WwiseData="true" WwiseEvent="brake_max_braking" NodeName="Wiper_Base_l" />
<Sound WwiseData="true" WwiseEvent="keep_max_reverse" NodeName="Wiper_Base_l" />
<Sound WwiseData="true" WwiseEvent="runway_too_short" NodeName="Wiper_Base_l" />
<Sound WwiseData="true" WwiseEvent="set_max_reverse" NodeName="Wiper_Base_l" />

</AvionicSounds>

<!-- AnimationSounds ========================================================================================== -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class A32NX_GPWS {
{},
],
onChange: (current, _) => {
this.setGlideSlopeWarning(current >= 1);
SimVar.SetSimVarValue("L:A32NX_GPWS_GS_Warning_Active", "Bool", current >= 1);
}
}
];
Expand All @@ -109,53 +109,15 @@ class A32NX_GPWS {
this.AltCallState.setState("ground");
this.RetardState = A32NX_Util.createMachine(RetardStateMachine);
this.RetardState.setState("landed");

this.egpwsAlertDiscreteWord1 = Arinc429Word.empty();
this.egpwsAlertDiscreteWord2 = Arinc429Word.empty();
}

gpwsUpdateDiscreteWords() {
this.egpwsAlertDiscreteWord1.ssm = Arinc429SignStatusMatrix.NormalOperation;
this.egpwsAlertDiscreteWord1.setBitValue(11, this.modes[0].current === 1);
this.egpwsAlertDiscreteWord1.setBitValue(12, this.modes[0].current === 2);
this.egpwsAlertDiscreteWord1.setBitValue(13, this.modes[1].current === 1);
this.egpwsAlertDiscreteWord1.setBitValue(12, this.modes[1].current === 2);
this.egpwsAlertDiscreteWord1.setBitValue(14, this.modes[2].current === 1);
this.egpwsAlertDiscreteWord1.setBitValue(15, this.modes[3].current === 1);
this.egpwsAlertDiscreteWord1.setBitValue(16, this.modes[3].current === 2);
this.egpwsAlertDiscreteWord1.setBitValue(17, this.modes[3].current === 3);
this.egpwsAlertDiscreteWord1.setBitValue(18, this.modes[4].current === 1);
Arinc429Word.toSimVarValue('L:A32NX_EGPWS_ALERT_1_DISCRETE_WORD_1', this.egpwsAlertDiscreteWord1.value, this.egpwsAlertDiscreteWord1.ssm);
Arinc429Word.toSimVarValue('L:A32NX_EGPWS_ALERT_2_DISCRETE_WORD_1', this.egpwsAlertDiscreteWord1.value, this.egpwsAlertDiscreteWord1.ssm);

this.egpwsAlertDiscreteWord2.ssm = Arinc429SignStatusMatrix.NormalOperation;
this.egpwsAlertDiscreteWord2.setBitValue(14, false);
Arinc429Word.toSimVarValue('L:A32NX_EGPWS_ALERT_1_DISCRETE_WORD_2', this.egpwsAlertDiscreteWord2.value, this.egpwsAlertDiscreteWord2.ssm);
Arinc429Word.toSimVarValue('L:A32NX_EGPWS_ALERT_2_DISCRETE_WORD_2', this.egpwsAlertDiscreteWord2.value, this.egpwsAlertDiscreteWord2.ssm);
}

setGlideSlopeWarning(state) {
SimVar.SetSimVarValue('L:A32NX_GPWS_GS_Warning_Active', 'Bool', state ? 1 : 0); // Still need this for XML
this.egpwsAlertDiscreteWord2.setBitValue(11, state);
Arinc429Word.toSimVarValue('L:A32NX_EGPWS_ALERT_1_DISCRETE_WORD_2', this.egpwsAlertDiscreteWord2.value, this.egpwsAlertDiscreteWord2.ssm);
Arinc429Word.toSimVarValue('L:A32NX_EGPWS_ALERT_2_DISCRETE_WORD_2', this.egpwsAlertDiscreteWord2.value, this.egpwsAlertDiscreteWord2.ssm);
}

setGpwsWarning(state) {
SimVar.SetSimVarValue('L:A32NX_GPWS_Warning_Active', 'Bool', state ? 1 : 0); // Still need this for XML
this.egpwsAlertDiscreteWord2.setBitValue(12, state);
this.egpwsAlertDiscreteWord2.setBitValue(13, state);
Arinc429Word.toSimVarValue('L:A32NX_EGPWS_ALERT_1_DISCRETE_WORD_2', this.egpwsAlertDiscreteWord2.value, this.egpwsAlertDiscreteWord2.ssm);
Arinc429Word.toSimVarValue('L:A32NX_EGPWS_ALERT_2_DISCRETE_WORD_2', this.egpwsAlertDiscreteWord2.value, this.egpwsAlertDiscreteWord2.ssm);
}

init() {
console.log('A32NX_GPWS init');

this.radnav.init(NavMode.FOUR_SLOTS);

this.setGlideSlopeWarning(false);
this.setGpwsWarning(false);
SimVar.SetSimVarValue("L:A32NX_GPWS_GS_Warning_Active", "Bool", 0);
SimVar.SetSimVarValue("L:A32NX_GPWS_Warning_Active", "Bool", 0);

NXDataStore.getAndSubscribe('CONFIG_A32NX_FWC_RADIO_AUTO_CALL_OUT_PINS', (k, v) => k === 'CONFIG_A32NX_FWC_RADIO_AUTO_CALL_OUT_PINS' && (this.autoCallOutPins = v), DEFAULT_RADIO_AUTO_CALL_OUTS);
}
Expand Down Expand Up @@ -209,12 +171,11 @@ class A32NX_GPWS {
this.Mode4MaxRAAlt = NaN;
}

this.setGlideSlopeWarning(false);
this.setGpwsWarning(false);
SimVar.SetSimVarValue("L:A32NX_GPWS_GS_Warning_Active", "Bool", 0);
SimVar.SetSimVarValue("L:A32NX_GPWS_Warning_Active", "Bool", 0);
}

this.GPWSComputeLightsAndCallouts();
this.egpwsAlertDiscreteWord1();

if ((mda !== 0 || (dh !== -1 && dh !== -2) && phase === FmgcFlightPhases.APPROACH)) {
let minimumsDA; //MDA or DH
Expand Down Expand Up @@ -315,7 +276,7 @@ class A32NX_GPWS {
}

const illuminateGpwsLight = activeTypes.some((type) => type.gpwsLight);
this.setGpwsWarning(illuminateGpwsLight);
SimVar.SetSimVarValue("L:A32NX_GPWS_Warning_Active", "Bool", illuminateGpwsLight);
}

/**
Expand Down
Loading

0 comments on commit 99b7564

Please sign in to comment.