Skip to content

Commit

Permalink
fix S/F speeds
Browse files Browse the repository at this point in the history
  • Loading branch information
flogross89 committed Dec 10, 2024
1 parent fb3b10f commit e8b66d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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)) {
Expand Down
4 changes: 2 additions & 2 deletions fbw-a380x/src/systems/instruments/src/MFD/FMC/fmgc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand Down
7 changes: 3 additions & 4 deletions fbw-a380x/src/systems/shared/src/OperatingSpeeds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit e8b66d2

Please sign in to comment.