-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(380x/mfd): enter dest data message not clearing automatically #9896
base: master
Are you sure you want to change the base?
fix(380x/mfd): enter dest data message not clearing automatically #9896
Conversation
0d1897f
to
1d21406
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Just some nits for strict type safety.
const activePlan = this.currFlightPlanService.active; | ||
const destination = activePlan.destinationAirport; | ||
|
||
if (!destination || !destination.location || !isFinite(this.perfApprWindHeading)) { | ||
return { direction: 0, speed: 0 }; | ||
if (!destination || !destination.location || this.perfApprWindHeading == null || this.perfApprWindSpeed == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!destination || !destination.location || this.perfApprWindHeading == null || this.perfApprWindSpeed == null) { | |
if (!destination || !destination.location || this.perfApprWindHeading === null || this.perfApprWindSpeed === null) { |
@@ -4391,7 +4392,7 @@ export abstract class FMCMainDisplay implements FmsDataInterface, FmsDisplayInte | |||
} | |||
|
|||
public updateTowerHeadwind() { | |||
if (isFinite(this.perfApprWindSpeed) && isFinite(this.perfApprWindHeading)) { | |||
if (this.perfApprWindHeading != null && this.perfApprWindSpeed != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (this.perfApprWindHeading != null && this.perfApprWindSpeed != null) { | |
if (this.perfApprWindHeading !== null && this.perfApprWindSpeed !== null) { |
@@ -4040,7 +4041,7 @@ export abstract class FMCMainDisplay implements FmsDataInterface, FmsDisplayInte | |||
*/ | |||
private getVAppGsMini() { | |||
let vAppTarget = this.getVApp(); | |||
if (isFinite(this.perfApprWindSpeed) && isFinite(this.perfApprWindHeading)) { | |||
if (this.perfApprWindSpeed !== null && this.perfApprWindHeading != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (this.perfApprWindSpeed !== null && this.perfApprWindHeading != null) { | |
if (this.perfApprWindSpeed !== null && this.perfApprWindHeading !== null) { |
this.perfApprWindHeading != null && | ||
this.perfApprWindSpeed != null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.perfApprWindHeading != null && | |
this.perfApprWindSpeed != null | |
this.perfApprWindHeading !== null && | |
this.perfApprWindSpeed !== null |
@@ -1515,7 +1516,7 @@ export abstract class FMCMainDisplay implements FmsDataInterface, FmsDisplayInte | |||
weight = this.zeroFuelWeight + Math.max(0, (vnavPrediction.estimatedFuelOnBoard * 0.4535934) / 1000); | |||
} | |||
// if pilot has set approach wind in MCDU we use it, otherwise fall back to current measured wind | |||
if (isFinite(this.perfApprWindSpeed) && isFinite(this.perfApprWindHeading)) { | |||
if (this.perfApprWindSpeed != null && this.perfApprWindHeading != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (this.perfApprWindSpeed != null && this.perfApprWindHeading != null) { | |
if (this.perfApprWindSpeed !== null && this.perfApprWindHeading !== null) { |
magWindHeadingCell = ('' + mcdu.perfApprWindHeading.toFixed(0)).padStart(3, '0'); | ||
} | ||
let magWindSpeedCell = '[\xa0]'; | ||
if (isFinite(mcdu.perfApprWindSpeed)) { | ||
if (mcdu.perfApprWindSpeed != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (mcdu.perfApprWindSpeed != null) { | |
if (mcdu.perfApprWindSpeed !== null) { |
@@ -205,6 +205,15 @@ export class FlightManagementComputer implements FmcInterface { | |||
|
|||
private wasReset = false; | |||
|
|||
private readonly destDataEntered = MappedSubject.create( | |||
([qnh, temperature, wind]) => qnh !== null && temperature != null && wind !== null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
([qnh, temperature, wind]) => qnh !== null && temperature != null && wind !== null, | |
([qnh, temperature, wind]) => qnh !== null && temperature !== null && wind !== null, |
@@ -979,7 +979,7 @@ export class FmcAircraftInterface { | |||
let towerHeadwind = 0; | |||
const appWind = this.fmgc.data.approachWind.get(); | |||
const destRwy = this.fmgc.getDestinationRunway(); | |||
if (appWind && Number.isFinite(appWind.speed) && Number.isFinite(appWind.direction)) { | |||
if (appWind) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (appWind) { | |
if (appWind !== null) { |
@@ -1196,7 +1196,7 @@ export class FmcAircraftInterface { | |||
// if pilot has set approach wind in MCDU we use it, otherwise fall back to current measured wind | |||
const appWind = this.fmgc.data.approachWind.get(); | |||
let towerHeadwind = 0; | |||
if (appWind && Number.isFinite(appWind.speed) && Number.isFinite(appWind.direction)) { | |||
if (appWind) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (appWind) { | |
if (appWind !== null) { |
public readonly approachWindSpeed = Subject.create<number | null>(null); | ||
|
||
public readonly approachWind: MappedSubject<number[], FmcWindVector | null> = MappedSubject.create( | ||
([direction, speed]) => (direction != null && speed !== null ? { direction: direction, speed: speed } : null), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
([direction, speed]) => (direction != null && speed !== null ? { direction: direction, speed: speed } : null), | |
([direction, speed]) => (direction !== null && speed !== null ? { direction: direction, speed: speed } : null), |
15c6f59
to
97b75ff
Compare
Thanks, should be sorted now if I didn't miss any. |
Fixes #9836
Summary of Changes
Fixes destination data message not automatically clearing after the required data is inserted.
Screenshots (if necessary)
References
Additional context
Discord username (if different from GitHub):
bruno_pt99
Testing instructions
A380X:
Program a flight plan of your choice and be at less than 180NM from the destination in the cruise phase without any data entered on the PERF APPR page. Verify "ENTER DEST DATA" amber message appears.
Insert Wind, QNH & temperature on the PERF APPR page and verify the message automatically disappears after doing so.
A32NX (regression testing):
Verify you can update & clear the winds in the approach performance page and that the VAPP is updated accordingly.
Check that ENTER DEST DATA message works (same instructions as the a380x ones)
How to download the PR for QA
Every new commit to this PR will cause new A32NX and A380X artifacts to be created, built, and uploaded.