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

Conversation

BravoMike99
Copy link
Contributor

@BravoMike99 BravoMike99 commented Oct 29, 2024

Fixes #[issue_no]

Summary of Changes

Screenshots (if necessary)

References

Additional context

Discord username (if different from GitHub):
bruno_pt99

Testing instructions

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.

  1. Make sure you are signed in to GitHub
  2. Click on the Checks tab on the PR
  3. On the left side, find and click on the PR Build tab
  4. Click on either flybywire-aircraft-a320-neo or flybywire-aircraft-a380-842 download link at the bottom of the page

@flogross89
Copy link
Contributor

Wohoo, Bruno's been cooking again

@becas22 becas22 changed the title feat(a380/mfd): position montior page feat(a380/mfd): position monitor page Oct 30, 2024
@BravoMike99 BravoMike99 force-pushed the 380-mfd-pos-monitor branch 2 times, most recently from 7d0e01e to a6caf23 Compare October 30, 2024 23:57
Copy link
Member

@tracernz tracernz left a comment

Choose a reason for hiding this comment

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

Some early suggestions.

@@ -198,14 +198,34 @@ export class Navigation implements NavigationProvider {
NearbyFacilities.getInstance().setPpos(this.ppos);
}

public updateRnp(rnp: number | null) {
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
public updateRnp(rnp: number | null) {
public setPilotRnp(rnp: number | null) {

Don't want confusion around this, hence the original naming.

return this.currentPerformance ?? Infinity;
}

public getRnp(): NauticalMiles {
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
public getRnp(): NauticalMiles {
/**
* Gets the active RNP considering priority order.
* @returns RNP in nautical miles, or undefined if none.
*/
public getActiveRnp(): number | undefined {

public getBaroCorrectedAltitude(): number | null {
return this.baroAltitude;
}

public getEpe(): number {
public getEpe(): NauticalMiles {
Copy link
Member

@tracernz tracernz Nov 2, 2024

Choose a reason for hiding this comment

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

These types that are just = number are legacy. Better to document the API properly.

Suggested change
public getEpe(): NauticalMiles {
/**
* Gets the estimated position error.
* @returns Estimated position error in nautical miles, or Infinity if no position.
*/
public getEpe(): number {

/**
* Get if a manual RNP entry was performed
*/
isRnpManual(): boolean;
Copy link
Member

Choose a reason for hiding this comment

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

Update the interface per above suggestions.

Comment on lines +59 to +65
get positionMonitorFix(): Fix | null;

set positionMonitorFix(fix: Fix | null);
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;

Comment on lines 131 to 137
get positionMonitorFix(): Fix | null {
return this.posMonitorFix;
}

set positionMonitorFix(fix: Fix | null) {
this.posMonitorFix = fix;
}
Copy link
Member

Choose a reason for hiding this comment

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

Trivial getter/setter doesn't do anything except harm perf.

@BravoMike99 BravoMike99 added the A380X Related to the A380X aircraft label Nov 16, 2024
@BravoMike99 BravoMike99 force-pushed the 380-mfd-pos-monitor branch 2 times, most recently from d251402 to 1d8df34 Compare November 23, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A380X Related to the A380X aircraft
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants