Skip to content

Commit

Permalink
Merge branch 'master' into fix_reverser_accel
Browse files Browse the repository at this point in the history
  • Loading branch information
2hwk authored Apr 2, 2024
2 parents 99a8530 + bbdb7d2 commit 51426e2
Show file tree
Hide file tree
Showing 15 changed files with 1,124 additions and 328 deletions.
1 change: 1 addition & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
1. [LIGHTS] Movement of landing lights now requires power and position is output into LVAR - @Maximilian-Reuter
1. [CDU] Fix auto weight and balance import on INIT B during GSX boarding not using the target values - @Maximilian-Reuter
1. [FAC] Improve sideslip estimation - @lukecologne (luke)
1. [FWC] Implement overspeed VMO/MMO warning - @tracernz (Mike)
1. [MISC] Fixed wrong msfs plane acceleration during reverser use causing autobrake wrong brake inputs - @Crocket63 (crocket)

## 0.11.0
Expand Down
28 changes: 28 additions & 0 deletions fbw-a32nx/docs/a320-simvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -1640,6 +1640,10 @@ In the variables below, {number} should be replaced with one item in the set: {
- Arinc429Word<Knots>
- The computed airspeed (CAS).

- A32NX_ADIRS_ADR_{number}_MAX_AIRSPEED
- Arinc429Word<Knots>
- The max allowable airspeed (CAS), considering VMO and MMO.

- A32NX_ADIRS_ADR_{number}_MACH
- Arinc429Word<Mach>
- The Mach number (M).
Expand All @@ -1664,6 +1668,30 @@ In the variables below, {number} should be replaced with one item in the set: {
- Arinc429Word<Degrees>
- The angle of attack (α) of the aircraft

- A32NX_ADIRS_ADR_{number}_DISCRETE_WORD_1
- Arinc429Word<flags>
- Indicates state of the ADR
Bit | Meaning
--- | ---
0 | ICING_DETECTOR_HEAT (not yet implemented)
1 | PITOT_HEAT (not yet implemented)
2 | ADR_FAULT
3 | RIGHT_STATIC_HEAT (not yet implemented)
4 | LEFT_STATIC_HEAT (not yet implemented)
5 | TAT_HEAT (not yet implemented)
6 | AOA_SENSOR_1_FAULT (not yet implemented)
7 | AOA_SENSOR_2_FAULT (not yet implemented)
8 | OVERSPEED_WARNING
10 | AOA_UNIQUE (not yet implemented)
11 | VMO_MMO_1 (not yet implemented)
12 | VMO_MMO_2 (not yet implemented)
13 | VMO_MMO_3 (not yet implemented)
14 | VMO_MMO_4 (not yet implemented)
15 | ALTERNATE_SSEC_A (not yet implemented)
16 | ALTERNATE_SSEC_B (not yet implemented)
17 | BARO_PORT_A (not yet implemented)
18 | ZERO_MACH_IGNORE_SSEC (not yet implemented)

- A32NX_ADIRS_IR_{number}_PITCH
- Arinc429Word<Degrees>
- The pitch angle of the aircraft.
Expand Down

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions fbw-a32nx/src/systems/instruments/src/Common/EWDMessages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ const EWDMessages = {
'320019503': '\x1b<5m -GPWS SYS...........OFF',
'340014001': '\x1b<4m\x1b4mNAV\x1bm RA 1 FAULT',
'340015001': '\x1b<4m\x1b4mNAV\x1bm RA 2 FAULT',
'340017001': '\x1b<2m\x1b4mOVER SPEED\x1bm',
'340017002': '\x1b<2m -VMO/MMO........350/.82',
'340050001': '\x1b<4m\x1b4mNAV\x1bm TCAS FAULT',
'340050701': '\x1b<4m\x1b4mNAV\x1bm TCAS STBY',
'340021001': '\x1b<2m\x1b4mOVERSPEED\x1bm',
Expand Down
30 changes: 30 additions & 0 deletions fbw-a32nx/src/systems/instruments/src/EWD/PseudoFWC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,10 @@ export class PseudoFWC {

private readonly height2Failed = Subject.create(false);

private adr3OverspeedWarning = new NXLogicMemoryNode(false, false);

private readonly overspeedWarning = Subject.create(false);

private readonly flapsIndex = Subject.create(0);

/** ENGINE AND THROTTLE */
Expand Down Expand Up @@ -1049,6 +1053,21 @@ export class PseudoFWC {
const height2: Arinc429Word = Arinc429Word.fromSimVarValue('L:A32NX_RA_2_RADIO_ALTITUDE');
this.height1Failed.set(height1.isFailureWarning());
this.height2Failed.set(height2.isFailureWarning());
// overspeed
const adr3Cas = Arinc429Word.fromSimVarValue('L:A32NX_ADIRS_ADR_3_COMPUTED_AIRSPEED');
const adr3MaxCas = Arinc429Word.fromSimVarValue('L:A32NX_ADIRS_ADR_3_MAX_AIRSPEED');
let overspeedWarning = this.adr3OverspeedWarning.write(
adr3Cas.isNormalOperation() && adr3MaxCas.isNormalOperation() && adr3Cas.value > (adr3MaxCas.value + 8),
this.aircraftOnGround.get() || !(adr3Cas.isNormalOperation() && adr3MaxCas.isNormalOperation()) || adr3Cas.value < (adr3MaxCas.value + 4),
);
const adr1Discrete1 = Arinc429Word.fromSimVarValue('L:A32NX_ADIRS_ADR_1_DISCRETE_WORD_1');
const adr2Discrete1 = Arinc429Word.fromSimVarValue('L:A32NX_ADIRS_ADR_2_DISCRETE_WORD_1');
if (!(adr1Discrete1.isNormalOperation() || adr1Discrete1.isFunctionalTest()) || !(adr2Discrete1.isNormalOperation() || adr2Discrete1.isFunctionalTest())) {
const adr3Discrete1 = Arinc429Word.fromSimVarValue('L:A32NX_ADIRS_ADR_3_DISCRETE_WORD_1');
overspeedWarning ||= adr3Discrete1.getBitValueOr(9, false);
}
overspeedWarning ||= adr1Discrete1.getBitValueOr(9, false) || adr2Discrete1.getBitValueOr(9, false);
this.overspeedWarning.set(overspeedWarning);

/* LANDING GEAR AND LIGHTS */

Expand Down Expand Up @@ -1881,6 +1900,17 @@ export class PseudoFWC {
side: 'LEFT',
},
// 34 - NAVIGATION & SURVEILLANCE
3400170: { // OVER SPEED VMO/MMO
flightPhaseInhib: [2, 3, 4, 8, 9, 10],
simVarIsActive: this.overspeedWarning,
whichCodeToReturn: () => [0, 1],
codesToReturn: ['340017001', '340017002'],
memoInhibit: () => false,
failure: 3,
sysPage: -1,
side: 'LEFT',
cancel: false,
},
3400210: { // OVERSPEED FLAPS FULL
flightPhaseInhib: [2, 3, 4, 8, 9, 10],
simVarIsActive: MappedSubject
Expand Down
10 changes: 7 additions & 3 deletions fbw-a32nx/src/wasm/systems/a320_systems/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ use electrical::{
use hydraulic::{A320Hydraulic, A320HydraulicOverheadPanel};
use navigation::A320RadioAltimeters;
use power_consumption::A320PowerConsumption;
use systems::enhanced_gpwc::EnhancedGroundProximityWarningComputer;
use systems::simulation::InitContext;
use uom::si::{f64::Length, length::nautical_mile};
use systems::{enhanced_gpwc::EnhancedGroundProximityWarningComputer, shared::MachNumber};
use uom::si::{f64::Length, length::nautical_mile, quantities::Velocity, velocity::knot};

use systems::{
air_starter_unit::AirStarterUnit,
Expand Down Expand Up @@ -80,7 +80,11 @@ pub struct A320 {
impl A320 {
pub fn new(context: &mut InitContext) -> A320 {
A320 {
adirs: AirDataInertialReferenceSystem::new(context),
adirs: AirDataInertialReferenceSystem::new(
context,
Velocity::new::<knot>(350.),
MachNumber(0.82),
),
adirs_overhead: AirDataInertialReferenceSystemOverheadPanel::new(context),
air_conditioning: A320AirConditioning::new(context),
apu: AuxiliaryPowerUnitFactory::new_aps3200(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,45 @@
(L:A380X_EFIS_L_LS_BUTTON_IS_ON) (&gt;L:BTN_LS_1_FILTER_ACTIVE)
(L:A380X_EFIS_R_LS_BUTTON_IS_ON) (&gt;L:BTN_LS_2_FILTER_ACTIVE)

(L:A380X_EFIS_L_ACTIVE_FILTER) (&gt;L:A32NX_EFIS_L_OPTION)
(L:A380X_EFIS_R_ACTIVE_FILTER) (&gt;L:A32NX_EFIS_R_OPTION)
(L:A380X_EFIS_L_ACTIVE_FILTER) 0 == if{
3 (&gt;L:A32NX_EFIS_L_OPTION)
}

(L:A380X_EFIS_L_ACTIVE_FILTER) 1 == if{
2 (&gt;L:A32NX_EFIS_L_OPTION)
}

(L:A380X_EFIS_L_ACTIVE_FILTER) 2 == if{
4 (&gt;L:A32NX_EFIS_L_OPTION)
}

(L:A380X_EFIS_L_ARPT_BUTTON_IS_ON) 1 == if{
5 (&gt;L:A32NX_EFIS_L_OPTION)
}

(L:A380X_EFIS_L_CSTR_BUTTON_IS_ON) 1 == if{
1 (&gt;L:A32NX_EFIS_L_OPTION)
}

(L:A380X_EFIS_R_ACTIVE_FILTER) 0 == if{
3 (&gt;L:A32NX_EFIS_R_OPTION)
}

(L:A380X_EFIS_R_ACTIVE_FILTER) 1 == if{
2 (&gt;L:A32NX_EFIS_R_OPTION)
}

(L:A380X_EFIS_R_ACTIVE_FILTER) 2 == if{
4 (&gt;L:A32NX_EFIS_R_OPTION)
}

(L:A380X_EFIS_R_ARPT_BUTTON_IS_ON) 1 == if{
5 (&gt;L:A32NX_EFIS_R_OPTION)
}

(L:A380X_EFIS_R_CSTR_BUTTON_IS_ON) 1 == if{
1 (&gt;L:A32NX_EFIS_R_OPTION)
}

(O:PrevPot7Value) s0
(A:LIGHT POTENTIOMETER:7, Percent over 100) s1
Expand Down Expand Up @@ -2901,7 +2938,7 @@
<WWISE_EVENT_2>lswitch</WWISE_EVENT_2>
</UseTemplate>

<!-- LDG LT LEFT -->
<!-- LDG LT -->
<UseTemplate Name="FBW_Airbus_LIGHTING_Switch_Light_Landing_Template">
<NODE_ID>SWITCH_OVHD_EXTLT_LANDL</NODE_ID>
<ANIM_NAME>SWITCH_OVHD_EXTLT_LANDL</ANIM_NAME>
Expand All @@ -2914,41 +2951,6 @@
<TYPE>Retractable</TYPE>
</UseTemplate>

<!-- LDG LT LEFT DELAY -->
<!-- DELAY_TIME is different than RIGHT to add a small "groove"
to
their activiation, if both are triggered at the same time -->
<UseTemplate Name="FBW_LDGLT_Delay">
<DELAY_TIME>7.7</DELAY_TIME>
<DELAY_LT_INDEX>2</DELAY_LT_INDEX>
<DELAY_CIRCUIT>18</DELAY_CIRCUIT>
<DELAY_BUS>2</DELAY_BUS>
</UseTemplate>

<!-- LDG LT RIGHT -->
<UseTemplate Name="FBW_Airbus_LIGHTING_Switch_Light_Landing_Template">
<NODE_ID>SWITCH_OVHD_EXTLT_LANDR</NODE_ID>
<ANIM_NAME>SWITCH_OVHD_EXTLT_LANDR</ANIM_NAME>
<Part_ID>LANDING_Light_R</Part_ID>
<SIMVAR_INDEX>3</SIMVAR_INDEX>
<ID>2</ID>
<ANIMTIP_0>TT:COCKPIT.TOOLTIPS.LANDING_LIGHT_R_OFF</ANIMTIP_0>
<ANIMTIP_1>TT:COCKPIT.TOOLTIPS.LANDING_LIGHT_R_ON</ANIMTIP_1>
<ANIMTIP_2>TT:COCKPIT.TOOLTIPS.LANDING_LIGHT_R_RETRACT</ANIMTIP_2>
<TYPE>Retractable</TYPE>
</UseTemplate>

<!-- LDG LT RIGHT DELAY -->
<!-- DELAY_TIME is different than LEFT to add a small "groove"
to
their activiation, if both are triggered at the same time -->
<UseTemplate Name="FBW_LDGLT_Delay">
<DELAY_TIME>7.3</DELAY_TIME>
<DELAY_LT_INDEX>3</DELAY_LT_INDEX>
<DELAY_CIRCUIT>19</DELAY_CIRCUIT>
<DELAY_BUS>3</DELAY_BUS>
</UseTemplate>

<!-- WING -->
<UseTemplate Name="FBW_Airbus_LIGHTING_Switch_Light_Wing_Template">
<NODE_ID>SWITCH_OVHD_EXTLT_WING</NODE_ID>
Expand Down Expand Up @@ -2988,7 +2990,10 @@
(&gt;K:2:ELECTRICAL_BUS_TO_CIRCUIT_CONNECTION_TOGGLE) }
</Update>

<UseTemplate Name="ASOBO_LIGHTING_Switch_Light_Landing_Template">
<!-- EXT LT NOSE TAXI/TO -->
<UseTemplate Name="FBW_Anim_Interactions">
<ANIM_TYPE>SWITCH</ANIM_TYPE>
<ANIM_TEMPLATE>ASOBO_LIGHTING_Switch_Light_Landing_Template</ANIM_TEMPLATE>
<NODE_ID>SWITCH_OVHD_EXTLT_NOSE</NODE_ID>
<PART_ID>LIGHTING_Switch_Light_Double</PART_ID>
<ANIM_NAME>SWITCH_OVHD_EXTLT_NOSE</ANIM_NAME>
Expand All @@ -3000,7 +3005,8 @@
<ANIMTIP_1>TT:COCKPIT.TOOLTIPS.NOSE_LIGHT_SET_TAXI</ANIMTIP_1>
<ANIMTIP_2>TT:COCKPIT.TOOLTIPS.NOSE_LIGHT_SET_OFF</ANIMTIP_2>
<TYPE>TwoSimvars</TYPE>

<!-- Allow TAXI LT to be used with TO LT -->
<SET_SIMVAR_2>(L:LIGHTING_LANDING_1, Number) 0 == if{ ! } 1 r (&gt;K:2:TAXI_LIGHTS_SET)</SET_SIMVAR_2>
<WWISE_EVENT>lswitch</WWISE_EVENT>
</UseTemplate>

Expand Down Expand Up @@ -6657,7 +6663,7 @@

<Component ID="HOSE0815" Node="HOSE0815">
<UseTemplate Name="ASOBO_GT_Visibility_Code">
<VISIBILITY_CODE>(L:XMLVar_HOSE0815:VISIBILITY , bool) 0 ==</VISIBILITY_CODE>
<VISIBILITY_CODE>(L:XMLVar_HOSE0815:VISIBILITY , bool) 1 ==</VISIBILITY_CODE>
</UseTemplate>
</Component>

Expand All @@ -6669,6 +6675,20 @@
</UseTemplate>
</Component>

<Component ID="HOSE0816" Node="A380_CABIN">
<UseTemplate Name="ASOBO_GT_Visibility_Code">
<VISIBILITY_CODE>(L:XMLVar_HOSE0816:VISIBILITY , bool) 0 ==</VISIBILITY_CODE>
</UseTemplate>
</Component>

<Component ID="HAT03" Node="HAT03">
<UseTemplate Name="ASOBO_GT_MouseRect">
<CALLBACKCODE_DEFAULT_IM>(M:Event) 'LeftSingle' scmp 0 == if{ (L:XMLVar_HOSE0816:VISIBILITY , bool) ! (&gt;L:XMLVar_HOSE0816:VISIBILITY , bool) }</CALLBACKCODE_DEFAULT_IM>
<MOUSEFLAGS>LeftSingle</MOUSEFLAGS>
<CURSOR>Hand</CURSOR>
</UseTemplate>
</Component>

<Component ID="A380_ICING_INDICATOR">
<!-- ICING STATE -->
<UseTemplate Name="ASOBO_GT_Anim">
Expand Down
Loading

0 comments on commit 51426e2

Please sign in to comment.