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
feat(fms): fms-v2 aircraft specific config / VNAV parameters #8493
base: fms-v2
Are you sure you want to change the base?
feat(fms): fms-v2 aircraft specific config / VNAV parameters #8493
Conversation
@@ -471,7 +471,7 @@ export class FlightPlan<P extends FlightPlanPerformanceData = FlightPlanPerforma | |||
* | |||
* The union type in the signature is to work around https://github.com/microsoft/TypeScript/issues/28662. | |||
*/ | |||
setPerformanceData<k extends(keyof (P & FlightPlanPerformanceDataProperties)) & string>(key: k, value: P[k], notify = true) { | |||
setPerformanceData<k extends(keyof (P & FlightPlanPerformanceDataProperties)) & string>(key: k, value: P[k] | null, notify = true) { |
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.
Why can value be null
? If anything, it should be undefined I think?
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.
I always prefer null, because it has to be explicit, and more importantly, it avoids bugs with the EventBus.
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.
I agree, but then the performance data properties should also be marked as nullable.
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.
I removed this part, and marked the values themselves as nullable.
@@ -6,25 +6,34 @@ | |||
import { MathUtils } from '@flybywiresim/fbw-sdk'; | |||
|
|||
export interface FlightPlanPerformanceData { | |||
/** in knots */ |
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.
For all of these properties, specify what value they take if not filled in.
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.
And also what they are, not just the unit.
@@ -87,7 +90,7 @@ export class Predictions { | |||
const theta2 = Common.getTheta2(theta, mach); | |||
const delta2 = Common.getDelta2(delta, mach); | |||
const correctedN1 = EngineModel.getCorrectedN1(commandedN1, theta2); | |||
const correctedThrust = EngineModel.tableInterpolation(EngineModel.table1506, correctedN1, mach) * 2 * EngineModel.maxThrust; | |||
const correctedThrust = EngineModel.tableInterpolation(EngineModel.table1506, correctedN1, mach) * 2 * config.engineModelParameters.maxThrust; |
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.
What do you intend to do with the tables in EngineModel
? They should also be aircraft-specific.
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.
I would want to wait for the A380 engine model to decide where to put these tables. Maybe we would have to use a completely different approach. Refactoring it later on should be easy.
@@ -79,7 +79,7 @@ export class Navigation implements NavigationProvider { | |||
facility: null, | |||
})); | |||
|
|||
constructor(private flightPlanService: FlightPlanService, private readonly facLoader: FacilityLoader) { | |||
constructor(private flightPlanService: FlightPlanService, private readonly facLoader?: FacilityLoader) { |
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.
Why can facLoader
be optional?
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.
As far as I can see, it's currently not used in this class?
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.
I see. In this case, we should probably just remove facLoader
as an argument.
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.
You're right. Just pushed that in the latest commit.
872645b
to
4c1acb2
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.
LGTM!
0077126
to
4923dcd
Compare
… code; revert change on PilotWaypoint
bea2f6b
to
4741730
Compare
08e840c
to
68f50ff
Compare
Will be impacted by the potential future merge freeze. #8466 will be required to be merged into this PR at some point. |
…-v2-aircraft-config-2 # Conflicts: # fbw-a32nx/src/systems/fmgc/src/guidance/GuidanceController.ts
…-v2-aircraft-config-2 # Conflicts: # fbw-a32nx/src/systems/fmgc/src/efis/EfisSymbols.ts # fbw-a32nx/src/systems/fmgc/src/flightplanning/new/FlightPlanService.ts # fbw-a32nx/src/systems/fmgc/src/flightplanning/new/WaypointEntryUtils.ts # fbw-a32nx/src/systems/fmgc/src/flightplanning/new/interface/DisplayInterface.ts # fbw-a32nx/src/systems/fmgc/src/flightplanning/new/plans/BaseFlightPlan.ts # fbw-a32nx/src/systems/fmgc/src/flightplanning/new/plans/FlightPlan.ts # fbw-a32nx/src/systems/fmgc/src/flightplanning/new/plans/performance/FlightPlanPerformanceData.ts # fbw-a32nx/src/systems/fmgc/src/guidance/GuidanceController.ts # fbw-a32nx/src/systems/fmgc/src/guidance/lnav/LnavDriver.ts # fbw-a32nx/src/systems/fmgc/src/guidance/vnav/CostIndex.ts # fbw-a32nx/src/systems/fmgc/src/guidance/vnav/CruiseToDescentCoordinator.ts # fbw-a32nx/src/systems/fmgc/src/guidance/vnav/EngineModel.ts # fbw-a32nx/src/systems/fmgc/src/guidance/vnav/FlightModel.ts # fbw-a32nx/src/systems/fmgc/src/guidance/vnav/Predictions.ts # fbw-a32nx/src/systems/fmgc/src/guidance/vnav/VerticalProfileManager.ts # fbw-a32nx/src/systems/fmgc/src/guidance/vnav/VnavDriver.ts # fbw-a32nx/src/systems/fmgc/src/guidance/vnav/climb/ClimbPathBuilder.ts # fbw-a32nx/src/systems/fmgc/src/guidance/vnav/climb/ClimbStrategy.ts # fbw-a32nx/src/systems/fmgc/src/guidance/vnav/cruise/CruisePathBuilder.ts # fbw-a32nx/src/systems/fmgc/src/guidance/vnav/descent/ApproachPathBuilder.ts # fbw-a32nx/src/systems/fmgc/src/guidance/vnav/descent/DescentPathBuilder.ts # fbw-a32nx/src/systems/fmgc/src/guidance/vnav/descent/DescentStrategy.ts # fbw-a32nx/src/systems/fmgc/src/guidance/vnav/descent/GeometricPathBuilder.ts # fbw-a32nx/src/systems/fmgc/src/guidance/vnav/descent/TacticalDescentPathBuilder.ts # fbw-a32nx/src/systems/fmgc/src/guidance/vnav/takeoff/TakeoffPathBuilder.ts # fbw-a32nx/src/systems/fmgc/src/index.ts # fbw-a32nx/src/systems/fmgc/src/navigation/Navigation.ts
lint-fixed |
Summary of Changes
Screenshots (if necessary)
n/a
References
Additional context
Discord username (if different from GitHub): floridude
Testing instructions
For A320: Should behave exactly as before, no change expected. Pay attention to VNAV predictions and vertical guidance, e.g. during approach
For A380: Testing being done separately
How to download the PR for QA
Every new commit to this PR will cause a new A32NX artifact to be created, built, and uploaded.