From e8b66d2d8dfcc7562bbd11f51d602b2958e8ce2f Mon Sep 17 00:00:00 2001 From: Florian Gross <63071941+flogross89@users.noreply.github.com> Date: Tue, 10 Dec 2024 02:16:31 +0200 Subject: [PATCH] fix S/F speeds --- .../instruments/src/MFD/FMC/FmcAircraftInterface.ts | 4 ++-- fbw-a380x/src/systems/instruments/src/MFD/FMC/fmgc.ts | 4 ++-- fbw-a380x/src/systems/shared/src/OperatingSpeeds.tsx | 7 +++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/fbw-a380x/src/systems/instruments/src/MFD/FMC/FmcAircraftInterface.ts b/fbw-a380x/src/systems/instruments/src/MFD/FMC/FmcAircraftInterface.ts index 6f803eaec6b..e2d1092e4d3 100644 --- a/fbw-a380x/src/systems/instruments/src/MFD/FMC/FmcAircraftInterface.ts +++ b/fbw-a380x/src/systems/instruments/src/MFD/FMC/FmcAircraftInterface.ts @@ -1116,7 +1116,7 @@ export class FmcAircraftInterface { const altActive = false; const landingWeight = this.fmgc.data.zeroFuelWeight.get() ?? - NaN + (altActive ? this.fmgc.getAltEFOB(true) : this.fmgc.getDestEFOB(true)); + NaN + (altActive ? this.fmgc.getAltEFOB(true) : this.fmgc.getDestEFOB(true)) * 1_000; return Number.isFinite(landingWeight) ? landingWeight : NaN; } @@ -1128,7 +1128,7 @@ export class FmcAircraftInterface { /** in kg */ const estLdgWeight = this.tryEstimateLandingWeight(); let ldgWeight = estLdgWeight; - const grossWeight = this.fmc.fmgc.getGrossWeightKg() ?? maxZfw + this.fmc.fmgc.getFOB(); + const grossWeight = this.fmc.fmgc.getGrossWeightKg() ?? maxZfw + this.fmc.fmgc.getFOB() * 1_000; const vnavPrediction = this.fmc.guidanceController?.vnavDriver?.getDestinationPrediction(); // Actual weight is used during approach phase (FCOM bulletin 46/2), and we also assume during go-around if (this.flightPhase.get() >= FmgcFlightPhase.Approach || !Number.isFinite(estLdgWeight)) { diff --git a/fbw-a380x/src/systems/instruments/src/MFD/FMC/fmgc.ts b/fbw-a380x/src/systems/instruments/src/MFD/FMC/fmgc.ts index 713250cdafe..9b7b741d070 100644 --- a/fbw-a380x/src/systems/instruments/src/MFD/FMC/fmgc.ts +++ b/fbw-a380x/src/systems/instruments/src/MFD/FMC/fmgc.ts @@ -564,7 +564,7 @@ export class FmgcDataService implements Fmgc { return this.data.approachTemperature.get() ?? 0; } - /** in kilograms */ + /** in tons */ getDestEFOB(useFob: boolean): number { // Metric tons const efob = this.guidanceController?.vnavDriver?.getDestinationPrediction()?.estimatedFuelOnBoard; // in Pounds @@ -574,7 +574,7 @@ export class FmgcDataService implements Fmgc { return 0; } - /** in kilograms */ + /** in tons */ getAltEFOB(useFOB = false): number { // TODO estimate alternate fuel if (this.getDestEFOB(useFOB) === 0) { diff --git a/fbw-a380x/src/systems/shared/src/OperatingSpeeds.tsx b/fbw-a380x/src/systems/shared/src/OperatingSpeeds.tsx index cae380edc15..f5fcd90d7c3 100644 --- a/fbw-a380x/src/systems/shared/src/OperatingSpeeds.tsx +++ b/fbw-a380x/src/systems/shared/src/OperatingSpeeds.tsx @@ -515,13 +515,12 @@ export class A380OperatingSpeeds { this.f2 = fmgcFlightPhase <= FmgcFlightPhase.Takeoff ? Math.max(1.18 * vs1gConf1F, Vmcl + 5) - : SpeedsLookupTables.F2_SPEED.get(altitude, m); + : SpeedsLookupTables.F2_SPEED.get(cg, m); this.f3 = fmgcFlightPhase <= FmgcFlightPhase.Takeoff ? Math.max(1.18 * vs1gConf1F, Vmcl + 5) - : SpeedsLookupTables.F3_SPEED.get(altitude, m); - this.s = - fmgcFlightPhase <= FmgcFlightPhase.Takeoff ? 1.21 * vs1gConf0 : SpeedsLookupTables.S_SPEED.get(altitude, m); + : SpeedsLookupTables.F3_SPEED.get(cg, m); + this.s = fmgcFlightPhase <= FmgcFlightPhase.Takeoff ? 1.21 * vs1gConf0 : SpeedsLookupTables.S_SPEED.get(m); } }