Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into air-cond-a380-tem…
Browse files Browse the repository at this point in the history
…perature-control
  • Loading branch information
mjuhe committed Oct 20, 2023
2 parents 8b5a5cb + 7393f1d commit ba86b3a
Show file tree
Hide file tree
Showing 111 changed files with 2,976 additions and 245 deletions.
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
1. [MCDU] Fixed the FMGC annunciator light not illuminating - @tracernz (Mike)
1. [COND] Add Air Conditioning systems failures - @mjuhe (Miquel Juhe)
1. [COND] Fixed Temp-Indication on CRZ page showing cockpit temperature for fwd and aft cabin - @cptnuss-ops (Lukas)
1. [FMS] Show ILS ident and frequency on ARRIVAL page - @tracernz (Mike)
1. [EFB/ATSU] Use MSFS METAR data rather than FSX cloud data from FBW API - @tracernz (Mike)
1. [APU] Added xfeed APU fuel capabilities - @Taz5150 (TazX [Z+1]#0405)

## 0.10.0

Expand Down
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 16 additions & 2 deletions fbw-a32nx/docs/a320-simvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -1949,7 +1949,7 @@ In the variables below, {number} should be replaced with one item in the set: {
- 1 - captain's side FMGC
- 2 - f/o's side FMGC

- A32NX_FM{number}_DECISION_HEIGHT
- A32NX_FM{number}_DECISION_HEIGHT
- ARINC429<number>
- The decision height for an approach in feet, as entered on the PERF page.
- Value | Meaning
Expand All @@ -1961,13 +1961,27 @@ In the variables below, {number} should be replaced with one item in the set: {
- 1 - captain's side FMGC
- 2 - f/o's side FMGC

- A32NX_FM{number}_MINIMUM_DESCENT_ALTITUDE
- A32NX_FM{number}_MINIMUM_DESCENT_ALTITUDE
- ARINC429<number>
- The minimum descent altitude for a non-precision approach in feet, as entered on the PERF page.
- {number}
- 1 - captain's side FMGC
- 2 - f/o's side FMGC

- A32NX_FM{number}_TRANS_ALT
- Arinc429<number>
- The transition altitude at the origin in feet
- {number}
- 1 - captain's side FMGC
- 2 - f/o's side FMGC

- A32NX_FM{number}_TRANS_LVL
- Arinc429<number>
- The transition level the destination as a flight level
- {number}
- 1 - captain's side FMGC
- 2 - f/o's side FMGC

- A32NX_FM_VNAV_TRIGGER_STEP_DELETED
- Bool
- Indicates whether to trigger a step deleted message on the MCDU
Expand Down
2 changes: 1 addition & 1 deletion fbw-a32nx/mach.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
],
instruments: [
msfsAvionicsInstrument('PFD'),
msfsAvionicsInstrument('ND', 'NDv2'),
msfsAvionicsInstrument('ND'),
msfsAvionicsInstrument('EWD'),
msfsAvionicsInstrument('Clock'),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ class CDUAvailableArrivalsPage {
runwayCourse = Utils.leadingZeros(Math.round(A32NX_Util.trueToMagnetic(runway.direction, magVar)), 3);
}
rows[2 * i] = [`{cyan}{${approach.name.padEnd(9)}{end}` + runwayLength.padStart(5) + "{small}" + NXUnits.userDistanceUnit().padEnd(2) + "{end}[color]cyan", "", ""];
rows[2 * i + 1] = ["{sp}{sp}{sp}" + runwayCourse + "[color]cyan"];
const hasIls = approach.approachType === ApproachType.APPROACH_TYPE_ILS && runway.primaryILSFrequency.freqMHz > 0;
const ilsText = hasIls ? `${WayPoint.formatIdentFromIcao(runway.primaryILSFrequency.icao).padStart(6)}/${runway.primaryILSFrequency.freqMHz.toFixed(2)}` : '';
rows[2 * i + 1] = [`{cyan}{sp}{sp}{sp}${runwayCourse}${ilsText}{end}`];
mcdu.onLeftInput[i + 2] = () => {
mcdu.setApproachIndex(approach.index, () => {
mcdu.flightPlanManager.setDestinationRunwayIndexFromApproach();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ class FMCMainDisplay extends BaseAirliners {
this.arincMissedThrustReductionAltitude = FmArinc429OutputWord.empty("MISSED_THR_RED_ALT");
this.arincMissedAccelerationAltitude = FmArinc429OutputWord.empty("MISSED_ACC_ALT");
this.arincMissedEoAccelerationAltitude = FmArinc429OutputWord.empty("MISSED_EO_ACC_ALT");
this.arincTransitionAltitude = FmArinc429OutputWord.empty("TRANS_ALT");
this.arincTransitionLevel = FmArinc429OutputWord.empty("TRANS_LVL");
/** contains fm messages (not yet implemented) and nodh bit */
this.arincEisWord2 = FmArinc429OutputWord.empty("EIS_DISCRETE_WORD_2");

Expand All @@ -204,6 +206,8 @@ class FMCMainDisplay extends BaseAirliners {
this.arincMissedThrustReductionAltitude,
this.arincMissedAccelerationAltitude,
this.arincMissedEoAccelerationAltitude,
this.arincTransitionAltitude,
this.arincTransitionLevel,
this.arincEisWord2,
];
}
Expand Down Expand Up @@ -598,6 +602,7 @@ class FMCMainDisplay extends BaseAirliners {
this.toSpeedsChecks();
this.thrustReductionAccelerationChecks();
this.updateThrustReductionAcceleration();
this.updateTransitionAltitudeLevel();
this.updateMinimums();
this.updateIlsCourse();
}
Expand Down Expand Up @@ -2926,6 +2931,7 @@ class FMCMainDisplay extends BaseAirliners {
if (s === FMCMainDisplay.clrValue) {
// TODO when possible fetch default from database
this.flightPlanManager.setOriginTransitionAltitude();
this.updateTransitionAltitudeLevel();
return true;
}

Expand All @@ -2942,6 +2948,7 @@ class FMCMainDisplay extends BaseAirliners {
}

this.flightPlanManager.setOriginTransitionAltitude(value);
this.updateTransitionAltitudeLevel();
return true;
}

Expand Down Expand Up @@ -3202,6 +3209,22 @@ class FMCMainDisplay extends BaseAirliners {
);
}

updateTransitionAltitudeLevel() {
const originTransitionAltitude = this.flightPlanManager.originTransitionAltitude;
this.arincTransitionAltitude.setBnrValue(
originTransitionAltitude !== undefined ? originTransitionAltitude : 0,
originTransitionAltitude !== undefined ? Arinc429Word.SignStatusMatrix.NormalOperation : Arinc429Word.SignStatusMatrix.NoComputedData,
17, 131072, 0,
)

const destinationTansitionLevel = this.flightPlanManager.destinationTransitionLevel;
this.arincTransitionLevel.setBnrValue(
destinationTansitionLevel !== undefined ? destinationTansitionLevel : 0,
destinationTansitionLevel !== undefined ? Arinc429Word.SignStatusMatrix.NormalOperation : Arinc429Word.SignStatusMatrix.NoComputedData,
9, 512, 0,
)
}

//Needs PR Merge #3082
//TODO: with FADEC no longer needed
setPerfTOFlexTemp(s) {
Expand Down Expand Up @@ -3830,6 +3853,7 @@ class FMCMainDisplay extends BaseAirliners {
setPerfApprTransAlt(s) {
if (s === FMCMainDisplay.clrValue) {
this.flightPlanManager.setDestinationTransitionLevel();
this.updateTransitionAltitudeLevel();
return true;
}

Expand All @@ -3844,6 +3868,7 @@ class FMCMainDisplay extends BaseAirliners {
}

this.flightPlanManager.setDestinationTransitionLevel(Math.round(value / 100));
this.updateTransitionAltitudeLevel();
return true;
}

Expand Down
34 changes: 0 additions & 34 deletions fbw-a32nx/src/systems/fmgc/src/components/EfisLabels.ts

This file was deleted.

2 changes: 0 additions & 2 deletions fbw-a32nx/src/systems/fmgc/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { FcuSync } from '@fmgc/components/FcuSync';
import { ReadySignal } from '@fmgc/components/ReadySignal';
import { FlightPlanManager } from '@fmgc/wtsdk';
import { EfisLabels } from './EfisLabels';
import { FmgcComponent } from './FmgcComponent';
import { FmsMessages } from './fms-messages';

const fmsMessages = new FmsMessages();

const components: FmgcComponent[] = [
fmsMessages,
new EfisLabels(),
new ReadySignal(),
new FcuSync(),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,7 @@ export class FlightPlanManager {
* The transition altitude for the origin in the *active* flight plan
*/
get originTransitionAltitude(): number | undefined {
return this.getOriginTransitionAltitude(0);
return this.getOriginTransitionAltitude(FlightPlans.Active);
}

public getOriginTransitionAltitudeIsFromDb(flightPlanIndex: number = 0): boolean {
Expand All @@ -1827,7 +1827,7 @@ export class FlightPlanManager {
* Is the transition altitude for the origin in the *active* flight plan from the database?
*/
get originTransitionAltitudeIsFromDb(): boolean {
return this.getOriginTransitionAltitudeIsFromDb(0);
return this.getOriginTransitionAltitudeIsFromDb(FlightPlans.Active);
}

/**
Expand Down Expand Up @@ -1855,7 +1855,7 @@ export class FlightPlanManager {
* The transition level for the destination in the *active* flight plan
*/
get destinationTransitionLevel(): FlightLevel | undefined {
return this.getDestinationTransitionLevel(0);
return this.getDestinationTransitionLevel(FlightPlans.Active);
}

public getDestinationTransitionLevelIsFromDb(flightPlanIndex: number = this._currentFlightPlanIndex): boolean {
Expand All @@ -1867,7 +1867,7 @@ export class FlightPlanManager {
* Is the transition level for the destination in the *active* flight plan from the database?
*/
get destinationTransitionLevelIsFromDb(): boolean {
return this.getDestinationTransitionLevelIsFromDb(0);
return this.getDestinationTransitionLevelIsFromDb(FlightPlans.Active);
}

/**
Expand Down
Loading

0 comments on commit ba86b3a

Please sign in to comment.