Skip to content
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(a380/mfd): position monitor page #9182

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c9b641a
feat(fms): add initial structure for mfd position monitor
BravoMike99 Oct 27, 2024
e8775b7
fix(mfd/pos): make mfd page update in real time
BravoMike99 Oct 27, 2024
f2ec1ec
fix mfd pos EPU width
BravoMike99 Oct 27, 2024
3f602d3
fix(mfd/pos): epu resolution display
BravoMike99 Oct 27, 2024
7efb30d
hookup mfd pos monitor page to fms accuracy
BravoMike99 Oct 27, 2024
31aa203
feat(mfd): allow navigation to pos monitor from perf page
BravoMike99 Oct 27, 2024
8c0c914
add initial table in mfd-position-monitor
BravoMike99 Oct 29, 2024
db36c1b
improve spacing of position lines
BravoMike99 Oct 29, 2024
f683c23
improve position monitor table layout & fill with all data
BravoMike99 Oct 29, 2024
c993649
fix position monitor navigation in perf page
BravoMike99 Oct 29, 2024
2f475f0
add bearing & distance fix function to mfd position
BravoMike99 Oct 30, 2024
4aab30c
improve position frozen button & text information
BravoMike99 Oct 30, 2024
e37e913
hide radio position & slightly change no position text
BravoMike99 Oct 31, 2024
4523a63
add onside & offside Labels. Store waypoint in mfd
BravoMike99 Nov 1, 2024
4e67aa9
update navigation interface
BravoMike99 Nov 1, 2024
e9f1515
improve some margins & positions with new ref
BravoMike99 Nov 1, 2024
b4d27ff
address api & mfd comments by tracer
BravoMike99 Nov 6, 2024
b598380
increase font size of labels. Use common css styles
BravoMike99 Nov 16, 2024
9bc07e0
position monitor accuracy, RNP & EPU improvements
BravoMike99 Nov 16, 2024
fa8a7ce
improve positon monitor width & start position
BravoMike99 Nov 17, 2024
17e4719
improve deviation positon in table & line width
BravoMike99 Nov 18, 2024
06989cd
Improve layout of position frozen data
BravoMike99 Nov 23, 2024
6a2c2b1
chore: change imports & styles to widgets
BravoMike99 Jan 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions fbw-a32nx/src/systems/fmgc/src/navigation/Navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,22 @@ export class Navigation implements NavigationProvider {
NearbyFacilities.getInstance().setPpos(this.ppos);
}

public setPilotRnp(rnp: number | null) {
if (rnp) {
this.requiredPerformance.setPilotRnp(rnp);
} else {
this.requiredPerformance.clearPilotRnp();
}
}

public isPilotRnp(): boolean {
return this.requiredPerformance.manualRnp;
}

public isAcurracyHigh(): boolean {
return this.accuracyHigh;
}

public getBaroCorrectedAltitude(): number | null {
return this.baroAltitude;
}
Expand All @@ -206,6 +222,10 @@ export class Navigation implements NavigationProvider {
return this.currentPerformance ?? Infinity;
}

public getActiveRnp(): number {
return this.requiredPerformance.activeRnp;
}

public getPpos(): Coordinates | null {
// TODO return null when fms pos invalid
return this.ppos;
Expand All @@ -227,6 +247,10 @@ export class Navigation implements NavigationProvider {
return this.navaidTuner;
}

public getRequiredPerformance(): RequiredPerformance {
return this.requiredPerformance;
}

private resetSelectedNavaid(i: number): void {
const selected = this.selectedNavaids[i];
selected.type = SelectedNavaidType.None;
Expand Down
28 changes: 26 additions & 2 deletions fbw-a32nx/src/systems/fmgc/src/navigation/NavigationProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export interface NavigationProvider {
getBaroCorrectedAltitude(): number | null;

/**
* Gets the current estimated position error
* @returns epe, or Infinity if no position
* Gets the estimated position error.
* @returns Estimated position error in nautical miles, or Infinity if no position.
*/
getEpe(): number;

Expand Down Expand Up @@ -50,4 +50,28 @@ export interface NavigationProvider {
* @param cdu The CDU to get navaids for, defaults to 1.
*/
getSelectedNavaids(cdu?: 1 | 2): SelectedNavaid[];

/**
* Gets the active RNP considering priority order.
* @returns RNP in nautical miles, or undefined if none.
*/
getActiveRnp(): number | undefined;

/**
* Gets if the FMS position accuracy is high
* @returns true if the position accuracy is high or false if low
*/
isAcurracyHigh(): boolean;

/**
* Updates the required navigation performance of the FMS
* @param rnp number The RNP value to set or null to clear a previous pilot input
*/
setPilotRnp(rnp: number | null);

/**
* Gets if a pilot RNP entry was performed
* @returns true if a pilot RNP entry was performed or false if not
*/
isPilotRnp(): boolean;
}
8 changes: 7 additions & 1 deletion fbw-a380x/src/systems/instruments/src/MFD/MFD.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
Subscribable,
VNode,
} from '@microsoft/msfs-sdk';
import { DatabaseItem, Waypoint } from '@flybywiresim/fbw-sdk';
import { DatabaseItem, Fix, Waypoint } from '@flybywiresim/fbw-sdk';

import { MouseCursor } from 'instruments/src/MsfsAvionicsCommon/UiWidgets/MouseCursor';

Expand Down Expand Up @@ -59,6 +59,10 @@ export interface MfdDisplayInterface {
interactionMode: Subscribable<InteractionMode>;

openMessageList(): void;

get positionMonitorFix(): Fix | null;

set positionMonitorFix(fix: Fix | null);
Comment on lines +63 to +65
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
get positionMonitorFix(): Fix | null;
set positionMonitorFix(fix: Fix | null);
positionMonitorFix: Fix | null;

}

export class MfdComponent extends DisplayComponent<MfdComponentProps> implements DisplayInterface, MfdDisplayInterface {
Expand All @@ -70,6 +74,8 @@ export class MfdComponent extends DisplayComponent<MfdComponentProps> implements
return this.#uiService;
}

public positionMonitorFix: Fix | null = null;

public readonly hEventConsumer = this.props.bus.getSubscriber<InternalKccuKeyEvent>().on('kccuKeyEvent');

public readonly interactionMode = Subject.create<InteractionMode>(InteractionMode.Touchscreen);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { MfdDisplayInterface } from 'instruments/src/MFD/MFD';
import { MfdUiService } from 'instruments/src/MFD/pages/common/MfdUiService';
import { MfdFmsDataDebug } from 'instruments/src/MFD/pages/FMS/DATA/MfdFmsDataDebug';
import { MfdSurvControls } from 'instruments/src/MFD/pages/SURV/MfdSurvControls';
import { MfdFmsPositionMonitor } from './pages/FMS/POSITION/MfdFmsPositionMonitor';
import { MfdSurvStatusSwitching } from 'instruments/src/MFD/pages/SURV/MfdSurvStatusSwitching';
import { MfdFmsDataAirport } from 'instruments/src/MFD/pages/FMS/DATA/MfdFmsDataAirport';

Expand Down Expand Up @@ -87,6 +88,8 @@ export function pageForUrl(
case 'fms/sec2/f-pln-hold':
case 'fms/sec3/f-pln-hold':
return <MfdFmsFplnHold pageTitle="F-PLN/HOLD" bus={bus} mfd={mfd} fmcService={fmcService} />;
case 'fms/position/monitor':
return <MfdFmsPositionMonitor pageTitle="MONITOR" bus={bus} mfd={mfd} fmcService={fmcService} />;
case 'fms/position/irs':
return <MfdFmsPositionIrs pageTitle="IRS" bus={bus} mfd={mfd} fmcService={fmcService} />;
case 'fms/position/navaids':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2808,7 +2808,10 @@ export class MfdFmsPerf extends FmsPage<MfdFmsPerfProps> {
/>
</div>
<div>
<Button label="POS MONITOR" onClick={() => console.log('POS MONITOR')} />
<Button
label="POS MONITOR"
onClick={() => this.props.mfd.uiService.navigateTo('fms/position/monitor')}
/>
</div>
<div style="flex: 1" />
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@import "../../../../MsfsAvionicsCommon/definitions";


.mfd-pos-top-row {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-left: 82px;
}

.mfd-pos-monitor-table {
border: 2px outset $display-light-grey;
width: 99%;
margin-left: 1px;
margin-top: 45px;
padding: 10px 0px 10px 0px;
}

.mfd-pos-monitor-table-line {
margin-top: 2px;
margin-left: 30px;
border: 1px outset $display-light-grey;
width: 699px;
height: 1px;
}
Loading
Loading