Skip to content

Commit

Permalink
port TOS1
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjozork committed Mar 11, 2023
1 parent d5fc336 commit 9a6364f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -593,9 +593,6 @@ class FMCMainDisplay extends BaseAirliners {
this.perfTOTemp = NaN;
this.setTakeoffFlaps(null);
this.setTakeoffTrim(null);
this.v1Speed = undefined;
this.vRSpeed = undefined;
this.v2Speed = undefined;
this.unconfirmedV1Speed = undefined;
this.unconfirmedVRSpeed = undefined;
this.unconfirmedV2Speed = undefined;
Expand Down Expand Up @@ -3027,11 +3024,13 @@ class FMCMainDisplay extends BaseAirliners {
}

getToSpeedsTooLow() {
const activePlan = this.flightPlanService.active;

let departureElevation = null;
if (this.flightPlanManager.getOriginRunway()) {
departureElevation = this.flightPlanManager.getOriginRunway().thresholdElevation / 0.3048;
} else if (this.flightPlanManager.getOrigin()) {
departureElevation = this.flightPlanManager.getOrigin().infos.elevation;
if (activePlan.originRunway) {
departureElevation = activePlan.originRunway.thresholdLocation.alt;
} else if (activePlan.originAirport) {
departureElevation = activePlan.originAirport.location.alt;
}
const zp = departureElevation !== null ? this.getPressureAltAtElevation(departureElevation, this.getBaroCorrection1()) : this.getPressureAlt();
if (zp === null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,26 @@ class NavSystem extends BaseInstrument {
return this.flightPlanService.active.performanceData.v1.get();
}

set v1Speed(value) {
this.flightPlanService.active.performanceData.v1.set(value);
}

get vRSpeed() {
return this.flightPlanService.active.performanceData.vr.get();
}

set vRSpeed(value) {
this.flightPlanService.active.performanceData.vr.set(value);
}

get v2Speed() {
return this.flightPlanService.active.performanceData.v2.get();
}

set v2Speed(value) {
this.flightPlanService.active.performanceData.v2.set(value);
}

disconnectedCallback() {
super.disconnectedCallback();
}
Expand Down

0 comments on commit 9a6364f

Please sign in to comment.