Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into efb-panel-cfg-ove…
Browse files Browse the repository at this point in the history
…rhaul
  • Loading branch information
2hwk committed Apr 2, 2024
1 parent 272faa7 commit f748ac6
Show file tree
Hide file tree
Showing 58 changed files with 4,106 additions and 2,987 deletions.
4 changes: 3 additions & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@
1. [FLIGHTMODEL] Fixes some crosswind issues - @donstim (donbikes)
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
2. [FAC] Improve sideslip estimation - @lukecologne (luke)
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 @@ -1649,6 +1649,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 @@ -1673,6 +1677,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
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ model = "" ; model folder
panel = "" ; panel folder
sound = "" ; sound folder
texture = "" ; texture folder
kb_checklists = "Boeing747-400_check" ; Procedures/Checklist sibling file name
kb_reference = "Boeing747-400_ref" ; Reference information sibling file name
kb_checklists = "" ; Procedures/Checklist sibling file name
kb_reference = "" ; Reference information sibling file name
description = "TT:AIRCRAFT.DESCRIPTION" ; Variation description.
wip_indicator = 0 ; know if the variation is good to go or still WIP : -1=Disabled, 0=Rough, 1=1st Pass, 2=Finished
ui_manufacturer = "FlyByWire Simulations" ; e.g. Boeing, Cessna
Expand All @@ -86,11 +86,10 @@ ui_certified_ceiling = 39800 ; service ceiling / max certified operating altitud
ui_max_range = 3500 ; max distance the aircraft can fly between take-off and landing in (NM)
ui_autonomy = 7 ; max duration the aircraft can fly between take-off and landing in (Hrs)
ui_fuel_burn_rate = 5300 ; average fuel consumption per hour (lbs/hr) - reminder: fuel density is ~6.7lbs per US gallon
atc_id = "ASX320" ; tail number
atc_id_enable = 0 ; enable tail number
atc_airline = "" ; airline name
atc_flight_number = "1123" ; flight number
atc_heavy = 1 ; heavy?
atc_id = "FBW320" ; tail number
atc_airline = "Fly By Wire" ; airline name
atc_flight_number = "320" ; flight number
atc_heavy = 0 ;
atc_parking_types = "GATE,RAMP,CARGO" ; "ANY" / "RAMP" / "CARGO" / "MIL_CARGO" / "MIL_COMBAT" / "GATE" / "DOCK"
atc_parking_codes = "" ; Comma separated and may be as small as one character each
atc_id_color = "" ; color for the tail number : i.e. "#ffff00ff"
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4600,7 +4600,7 @@ class FMCMainDisplay extends BaseAirliners {
}

isPdFormat(s) {
const pd = s.match(/^([^\/]+)\/([0-9]{1,3}(\.[0-9])?)$/);
const pd = s.match(/^([^\/]+)\/([\-\+]?[0-9]{1,3}(\.[0-9])?)$/);
return pd !== null && this.isPlaceFormat(pd[1]);
}

Expand Down
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
5 changes: 5 additions & 0 deletions fbw-a32nx/src/wasm/fadec_a320/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ wasm-ld \
--export malloc \
--export free \
--export __wasm_call_ctors \
--export mallinfo \
--export mchunkit_begin \
--export mchunkit_next \
--export get_pages_state \
--export mark_decommit_pages \
--export-table \
--gc-sections \
-lc++ -lc++abi \
Expand Down
5 changes: 5 additions & 0 deletions fbw-a32nx/src/wasm/fbw_a320/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ wasm-ld \
--export malloc \
--export free \
--export __wasm_call_ctors \
--export mallinfo \
--export mchunkit_begin \
--export mchunkit_next \
--export get_pages_state \
--export mark_decommit_pages \
--export-table \
--gc-sections \
${WASMLD_ARGS} \
Expand Down
2 changes: 0 additions & 2 deletions fbw-a32nx/src/wasm/systems/a320_systems/src/hydraulic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4184,7 +4184,6 @@ impl A320AutobrakeController {
|| (self.left_brake_pedal_input > Ratio::new::<percent>(53.)
&& self.right_brake_pedal_input > Ratio::new::<percent>(53.))
}
_ => false,
}
}

Expand Down Expand Up @@ -4214,7 +4213,6 @@ impl A320AutobrakeController {
self.deceleration_governor.time_engaged().as_secs_f64(),
),
AutobrakeMode::MAX => Self::MAX_MODE_DECEL_TARGET_MS2,
_ => Self::OFF_MODE_DECEL_TARGET_MS2,
})
}

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
13 changes: 12 additions & 1 deletion fbw-a32nx/src/wasm/systems/a320_systems_wasm/src/reversers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,21 @@ use std::error::Error;
use msfs::sim_connect;
use msfs::{sim_connect::SimConnect, sim_connect::SIMCONNECT_OBJECT_ID_USER};

use systems_wasm::aspects::{MsfsAspectBuilder, ObjectWrite, VariablesToObject};
use systems_wasm::aspects::{ExecuteOn, MsfsAspectBuilder, ObjectWrite, VariablesToObject};
use systems_wasm::{set_data_on_sim_object, Variable};

pub(super) fn reversers(builder: &mut MsfsAspectBuilder) -> Result<(), Box<dyn Error>> {
// We recreate a long accel including the reverser accel that we pass to systems (else MSFS acceleration is not consistent with ingame acceleration when we modify plane velocity)
builder.map_many(
ExecuteOn::PreTick,
vec![
Variable::aircraft("ACCELERATION BODY Z", "Feet per second squared", 0),
Variable::aspect("REVERSER_DELTA_ACCEL"),
],
|values| values[0] + values[1],
Variable::aspect("ACCELERATION_BODY_Z_WITH_REVERSER"),
);

builder.variables_to_object(Box::new(ReverserThrust {
velocity_z: 0.,
angular_acc_y: 0.,
Expand Down
36 changes: 36 additions & 0 deletions fbw-a380x/docs/a380-simvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- [Auxiliary Power Unit ATA 49](#auxiliary-power-unit-ata-49)
- [Hydraulics](#hydraulics)
- [Sound Variables](#sound-variables)
- [Autobrakes](#autobrakes)

## Uncategorized

Expand Down Expand Up @@ -696,3 +697,38 @@
- A380X_SOUND_COCKPIT_WINDOW_RATIO
- Number
- Ratio between 0-1 of the cockpit windows being physically open

## Autobrakes

- A32NX_AUTOBRAKES_SELECTED_MODE
- Number
- Indicates position of the autobrake selection knob
- | State | Number |
|--------|--------|
| DISARM | 0 |
| BTV | 1 |
| LOW | 2 |
| L2 | 3 |
| L3 | 4 |
| HIGH | 5 |

- A32NX_AUTOBRAKES_ARMED_MODE
- Number
- Indicates actual armed mode of autobrake system
- | State | Number |
|--------|--------|
| DISARM | 0 |
| BTV | 1 |
| LOW | 2 |
| L2 | 3 |
| L3 | 4 |
| HIGH | 5 |
| RTO | 6 |

- A32NX_AUTOBRAKES_DISARM_KNOB_REQ
- Boolean
- True when autobrake knob solenoid resets knob position to DISARM

- A32NX_OVHD_AUTOBRK_RTO_ARM_IS_PRESSED
- Boolean
- RTO autobrake button is pressed
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ XMLVAR_KNOB_OVHD_CABINPRESS_LDGELEV=10.5
XMLVAR_RMP_L_On=1
XMLVAR_RMP_R_On=1
XMLVAR_SWITCH_OVHD_CABINPRESS_MANVSCTL=37.5
A32NX_AUTOBRAKES_ARMED_MODE=0

[Gauges.0]
KollsmanSetting=29.921342849731445313
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ minor =0
[VIEWS]
eyepoint = 44.2, -1.72, 4.15 ; (feet) longitudinal, lateral, vertical distance from reference datum

[CAMERA_RAY_NODE_COLLISION]
; EFB auto-unfocus
node.1 = ModelDefinition:Interior#Name:SCREEN_EFB

;===================== CAMERADEFINITION =====================

[CAMERADEFINITION.0]
Expand Down
Loading

0 comments on commit f748ac6

Please sign in to comment.