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(a380x/vd): Vertical display basic implementation #9831

Open
wants to merge 50 commits into
base: master
Choose a base branch
from

Conversation

flogross89
Copy link
Contributor

@flogross89 flogross89 commented Feb 6, 2025

Fixes #8728
Fixes #9236

Summary of Changes

Adds an implementation of the vertical display which can be expanded by other contributors
Scope of this PR:

  • Transmit vertical path from FMS to VD
  • Set up instrument with canvas for drawing vertical map, altitude band, range markers etc.
  • Add range change message, "VD RANGE CHANGE"
  • Add constraints
  • Add plane symbol, orientation depending on pitch
  • Missed constraint symbology
  • Add AFS CP selected altitude including ALT SEL marker, different colors cyan/magenta/white
  • Vertical selected mode path
  • Fix distance along currently active leg
  • "End of VD" marker in ND
  • Grey area if path deviates more than 3° from current track
  • Update SimBridge: Altitude band, range, flight plan path
  • VD: TAWS failure messages
  • TERR on VD as long as TAWS is not INOP
  • Change MSFS -> SimBridge communication for TAWS parts from WASM to TS simbridge-client
  • Hook up TERR SYS on SURV page
  • TERR/GPWS failure via EFB

Out of scope (ideas for future PRs):

  • ECAM faults for TERR/GPWS
  • Level-off segments / dashed line when AFS CP altitude limiting climb or descend path
  • Radio altimeter altitude visualization
  • Safety altitudes
  • Manual AZIM mode
  • Different TAWS RNP values, using 1nm for now
  • Symbol for "not valid pitch attitude" (yellow dot, ATT marker)
  • Holding patterns
  • FLS beams

Screenshots (if necessary)

vd1_kl

References

Additional context

Discord username (if different from GitHub):

Testing instructions

You will need a special SimBridge build to test the terrain functionality of the VD: https://we.tl/t-zb8uCnKKPZ

Further test instructions coming soon.

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, flybywire-aircraft-a380-842 (4K) or flybywire-aircraft-a380-842 (8K) download link at the bottom of the page

@flogross89 flogross89 added QA A380 Only QA only for A380 required A380X Related to the A380X aircraft ND (Navigation Display) EFIS Issue is related to the EFIS labels Feb 6, 2025
@flogross89 flogross89 added this to the v0.13.0 milestone Feb 6, 2025
@flogross89 flogross89 marked this pull request as draft February 6, 2025 00:54
@flogross89 flogross89 force-pushed the feat-a380x-vd-basics branch from c7f6300 to c06aac1 Compare February 7, 2025 16:15
@alexr4339
Copy link

alexr4339 commented Feb 26, 2025

Gave it an initial test.

First initial impressions. Superb update and adds some serious value but needs some finetuning

Departed KFLL 10L with a GW of 400T. Right after departure VNAV/VD recaculated the profile way above the aircraft. I think the reason may be that the profile is drawn from the runway beginning but you do lift of at the end which will give a vertical diffeence
image
Another point I noticed is that the terrain map does not really update when flying many circles:
image
After turning off and on
image
And for some reason druing vectoring VD has drawn the runway but only temporarily, around half a minute later it disappeared
image
And in cases where you are behind the completed fplan VD draws a line straight down from present alt
image
And it seems as if the approach path doesnt quite match towards the runway
image

if (mode === VerticalMode.ALT_CST || mode === VerticalMode.ALT_CST_CPT || altCstr) {
return '#ff94ff';
} else if (
mode === VerticalMode.FINAL ||
Copy link
Contributor

Choose a reason for hiding this comment

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

There's no FINAL on the A380 although I guess it could replace APP-DES

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, but I didn't want to touch this enum here, should be done as part of a bigger FG PR. How about keeping it here to have a reminder on what to change if someone decides to implement F-GS and F-LOC (we don't have APP-DES in the a380)

# Conflicts:
#	fbw-a380x/src/systems/failures/src/a380.ts
#	fbw-a380x/src/systems/systems-host/index.ts
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.

The VD terr should go inop in polar regions.

});

const data: ElevationSamplePathDto = {
pathWidth: 1,
Copy link
Member

@tracernz tracernz Feb 28, 2025

Choose a reason for hiding this comment

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

Not implemented? Should be 1 NM in takeoff and terminal, 2 NM in enroute, and <= 0.5 NM on approach.
-e- You could add a FIXME for later ofc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, listed it in the "out of scope" list as "Different TAWS RNP values, using 1nm for now". I'll add a FIXME, needs more verification in SimBridge.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

.. And the logic is a lot more complicated, depends on EPU, FMS RNP, predicted RNP, standard TAWS RNP, depending on what we're sampling


interface AdiruBusBaseEvents {
/** Raw Arinc 429 word. */
a32nx_adiru_true_track: number;
Copy link
Member

@tracernz tracernz Feb 28, 2025

Choose a reason for hiding this comment

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

Suggested change
a32nx_adiru_true_track: number;
a32nx_ir_true_track: number;

IR and ADR have separate bus outputs, and further they are actually separate computers that talk to each other over ARINC429. The publishers should be arranged around output busses. Thew JSDoc should also specify what data is contained within.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I renamed the file to IrBusPublisher.ts and changed everything accordingly. Didn't all of the IR outputs though, only the one I need for now. The PR is massive as it is right now...

type IndexedTopics = 'a32nx_adiru_true_track';

type AdiruBusIndexedEvents = {
[P in keyof Pick<AdiruBusBaseEvents, IndexedTopics> as IndexedEventType<P>]: AdiruBusBaseEvents[P];
Copy link
Member

@tracernz tracernz Feb 28, 2025

Choose a reason for hiding this comment

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

The ADR and IR bus publishers should use a more restrained type that retricts the indices to 1 | 2 | 3. The ADR bus publisher in https://github.com/flybywiresim/aircraft/pull/9659/files#diff-a52ba40e0f76f9fd77751641600f0b1b599c203bc4c018fa4c2515db0065a3ef might be a good reference.

For the topic definitions I largely copy-pasted the a320-simvars.md content and used multi-cursor mode in VSCode to edit it into the desired format.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added as well

@@ -44,6 +45,13 @@ export interface DebugPointPathVector {

export type PathVector = LinePathVector | ArcPathVector | DebugPointPathVector;

export interface VerticalPathCheckpoint {
Copy link
Member

Choose a reason for hiding this comment

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

Should this really be in this file? Is this related to path vectors?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't belong to the a32nx specific defs (hence I'll remove it here), but I think it should be present in fbw-common's PathVector. It's relevant for the vertical path transmission, IMO PathVector.ts could also cover vertical aspects, not only lateral. What's your proposal?

Copy link
Member

Choose a reason for hiding this comment

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

In my branch, I had made the vertical path sending completely separate. And enables via an FMS config option

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think there are a lot of nice synergies when combining the lateral and vertical path transmission. Maybe in the future it makes sense to de-couple this, when we want to improve the prediction of vertical paths for selected modes, amongst other necessary improvements.

@flogross89
Copy link
Contributor Author

The VD terr should go inop in polar regions.

Ah yeah totally, also made that check in the VD for displaying the flag, but it should be at the place where the failure conditions are checked, which is EfisTawsBridge. Moved it there.

@flogross89
Copy link
Contributor Author

@alexr4339 About "behind FPLN line straight down": Couldn't reproduce it
image

But I'm very sure that we are going to have problems with matching our position to existing trajctories, it's a very tricky problem doing this right. We might have to keep improvements on that for later.

@flogross89 flogross89 force-pushed the feat-a380x-vd-basics branch from 3c04129 to 6982c8b Compare March 1, 2025 05:45
@alexr4339
Copy link

alexr4339 commented Mar 1, 2025

Test run 2 using 6982c8b:

Issues:
Colors still seem too bright
I would suggest HEX: 626272 for now. Should be much closer to the following ref:
image

Grey area incorrectly drawn:
image
In this case there should be no grey area, as fplan and track match up.
Interesting was, that this issue only happened on the capt side, FO side displayed grey area correctly
image

Another note: See that simbridge has still drawn TERR on ND, even though I just recently turned TERR off

VD didnt match VNAV
image
See that VD started a descent from PPOS, while VNAV predicted the decent later on. Would expect VD to draw a horizontal line and start the descent at the point displayed by the arrow.

The VD grey zone should darker the TERR as well, which it currently doesnt
image

What did I do?
Fplan:
CYOW/14 N0477F380 DCT TUKIR IMEBA9 CYYZ/33R
Did a pretty much routine flight, departed, went direct TUKIR, climbed to my cruise alt of FL200, initiated the descent at TOD marker and flew a standard ILS and select a DTO towards the waypoint before the FAF in cruise

@flogross89
Copy link
Contributor Author

@alexr4339 Why are you saying it's "still" too dark? I thought it was too bright before? In your ref image the exposure was pretty low due to a lot of ambient light. In other refs the area looks way brighter. Let's go with #4e4e61 for now, and re-evaluate after merging or when we have more data points.

About the grey area: I might have to debug that further.

TERR still on ND even if TERR is off: Most likely also a SimBridge cycle refresh issue, can't/won't fix that in this PR.

VD didn't match VNAV: Seems like the T/D pseudo waypoint didn't get considered, I'll see whether I'm missing something.

@flogross89
Copy link
Contributor Author

@flogross89 Just updated the SimBridge build with the new colors

@alexr4339
Copy link

@flogross89 apologies, meant too bright for sure. I'll re-evaluate once with the new simbridge build!

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 EFIS Issue is related to the EFIS ND (Navigation Display) QA A380 Only QA only for A380 required QA Ready to Test
Projects
Status: 🟡 Code Review: Ready for Review
Development

Successfully merging this pull request may close these issues.

pink block/missing data on VD [A380X] Implement VD
8 participants