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/fms): Add (auto) step climbs; Allow CLB/DES constraint selection #9804

Merged
merged 29 commits into from
Feb 3, 2025

Conversation

flogross89
Copy link
Contributor

@flogross89 flogross89 commented Jan 26, 2025

Fixes #9486

Summary of Changes

Adds step climbs to A380X.

Changes:

  • STEP ALTs tab of VERT REV page implemented
  • Interface to flight plan correctly integrated
  • Allow selection of CLB/DES constraint for SPD and ALT constraints
  • Add "auto step climb" QoL function
  • Add "ABOVE MAX FL" / "STEP DELETED" messages

Out of scope (i.e. not implemented):

Changelog will be added shortly before merge.

Screenshots (if necessary)

image
image

References

Additional context

Discord username (if different from GitHub):

Testing instructions

  1. Load up cold&dark at airport, plan long enough flight (>3h) in Simbrief; Enable "Auto Step Climb" in EFB Realism Settings
  2. Fill in FMS as per normal procedures
  3. Insert step climbs or step descends (not too close to T/C or T/D, otherwise they'll get ignored)
  4. Delete step climbs or descends (clear altitude and/or waypoint field), see whether that works
  5. Enter step climb above max FL, should be ignored with "ABOVE MAX FL" message
  6. Start flight, take-off, fast forward to cruise (sim rate can be increased)
  7. When approaching S/C waypoint (at 20nm distance), the aircraft should display "STEP AHEAD" in the FMS message field. If Auto Step climb is enabled, the FCU alt should be automatically set to the new value, and CLB/DES should be engaged
  8. Verify that step climbs or descends work as intended, with or without Auto Step Climbs enabled

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 FMS QA A380 Only QA only for A380 required A380X Related to the A380X aircraft labels Jan 26, 2025
@flogross89 flogross89 added this to the v0.13.0 milestone Jan 26, 2025
@aadee9940
Copy link

Just a small question, does optimum step point take into account wind? Or just based on gross weight?
speaking of which wind import in the 380 would be nice :)

@flogross89
Copy link
Contributor Author

@aadee9940 In the real aircraft, winds are taken into account. However, the optimum step point calculation won't be implemented as part of this PR. Furthermore, wind import needs bigger adaptions to the FMS, so this will likely take some time.

@flogross89 flogross89 changed the title feat(a380x/fms): Add step climbs; Allow CLB/DES constraint selection feat(a380x/fms): Add (auto) step climbs; Allow CLB/DES constraint selection Jan 27, 2025
@flogross89 flogross89 marked this pull request as ready for review January 27, 2025 17:22
@BravoMike99
Copy link
Contributor

Could you also hook up the "STEP DELETED" MFD message? Should be as simple as listening to the A32NX_FM_VNAV_TRIGGER_STEP_DELETED var. It may not handle all the A380 specific cases but it handles the sequencing one at least.

@flogross89
Copy link
Contributor Author

Could you also hook up the "STEP DELETED" MFD message? Should be as simple as listening to the A32NX_FM_VNAV_TRIGGER_STEP_DELETED var. It may not handle all the A380 specific cases but it handles the sequencing one at least.

Good point, thanks! Just pushed the changes.

Copy link
Member

@BlueberryKing BlueberryKing left a comment

Choose a reason for hiding this comment

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

Good work 💯

if (revWptIdx && this.props.fmcService.master?.revisedWaypointIndex.get() !== undefined) {
this.selectedWaypointIndex.set(revWptIdx - activeLegIndex - 1);
const revWptIdx = this.props.fmcService.master?.revisedWaypointLegIndex.get();
if (revWptIdx !== null && revWptIdx !== undefined) {
Copy link
Member

Choose a reason for hiding this comment

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

When would revWptIdx be null or undefined? In this case, we should probably also set selectedLegIndex to null or undefined. Otherwise we may get into a bit of an awkward state where revWptIdx is falsy but selectedLegIndex is not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, selectedLegIndex should also be changed.
revisedLegIndex can be undefined if there's no FMC present or not yet initialized (i.e. this.props.fmcService.master resolves to undefined), and null if no leg is currently being revised

this.props.fmcService.master.flightPlanService.setPilotEnteredSpeedConstraintAt(
this.selectedLegIndex,
this.spdConstraintTypeRadioSelected.get() === 1,
newSpeed ?? 250,
Copy link
Member

Choose a reason for hiding this comment

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

What is the reason for this default value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No reason, I somehow thought that setPilotEnteredSpeedConstraintAt always expects a speed constraint but this makes it impossible to delete them. Removed the default value.

}
}

private tryDeleteCruiseStep(lineIndex: number, dropdownIndex: number, altitude: 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.

Why do we need altitude here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If either the waypoint field or the altitude field is un-set, the cruise step shall be deleted (that's how I think it works). But it's better to do this check in the input field which calls the method, not here. So I moved it.

document.getElementById(`${this.props.idPrefix}_label_${idx}`)?.classList.remove('white');

document.getElementById(`${this.props.idPrefix}_label_${idx}`)?.classList.add(v);
document
Copy link
Member

Choose a reason for hiding this comment

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

Can we store a ref to the element rather than fetching it with getElementById?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great idea! Changed the whole class to refs instead of getElementById


private tmpyInsertButtonDiv = FSComponent.createRef<HTMLDivElement>();
set selectedLegIndex(legIndex: 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.

This is something I don't understand about the avionics framework. You have a lot of derived state in this component. For example selectedLegIndex can be derived immediately from dropdownMenuSelectedWaypointIndex and availableWaypointsToLegIndex. This means you have quite a bit of code to keep these state variables in-sync. Would it make more sense to derive e.g selectedLegIndex at render time or is this the proper way to do it with the framework?

Copy link
Member

@tracernz tracernz Jan 30, 2025

Choose a reason for hiding this comment

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

Usually you would used MappedSubjects for that. You don't invalidate an entire component and rebuild the whole DOM for it like react because that's incredibly expensive, and why react instruments cause stutter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We talked on Discord about that. Ideally you would also use MappedSubjects for e.g. selectedLegIndex, but in this case the dependencies are kind of convoluted and not fully subject-ified (for example the flight plan data), so I think it's better to stick with the function approach for now. But I'm having another look over it right now, maybe that might change.

@flogross89 flogross89 force-pushed the feat-a380x-fms-step-climb branch from 42b3fe0 to 6cbb0b4 Compare January 31, 2025 01:31
@utkrishtm
Copy link

Quick question @flogross89. Is there a way to fully automate the auto-step climb like the PMDG? The FMS already calculates the OPT FL and can predict when it should climb. Just a thought.

@flogross89
Copy link
Contributor Author

Quick question @flogross89. Is there a way to fully automate the auto-step climb like the PMDG? The FMS already calculates the OPT FL and can predict when it should climb. Just a thought.

In principle that's possible, we would need optimum step climb calculation for that though, which is out of scope of this PR. But can be added in the future.

@utkrishtm
Copy link

Quality Assurance Trainee Report

Discord Username : utkrishtm
Object of testing : #9804
Aircraft : A380X
Tier of Testing : 1
Date : 31/01/2025

Testing Process:

  • Flight from KSEA to PHNL 2363NM.
  • Initial climb to FL 340. OPT FL 380 shown in the FMS. Climbed initially to FL 340 by point HQM
  • Added Step climbs
    SEDAR FL 360 (137 NM from HQM)
    43N131W FL 380 (238 NM from SEDAR)
    40N136W FL 400 (288 NM from 43N131W)
    37N140W FL 380 (260 NM from 40N136W)
    HELOP FL 360 (165 NM from 37N140W)

Route: HAROB6 HQM DCT SEDAR DCT 43N131W 40N136W 37N140W DCT HELOP A332 AUNTI R463 APACK MAGGI3

Testing Results:
Not Passed

Negatives:

  • After the second step climb occurred, the S/D point disappeared from the FLPN page. Including removing the step climb from the STEPALTs page as well. I could not again program the step descent. 37N140W was programmed to be a S/D to FL 380. However, it was automatically edited to be FL 400. Once I changed the FL to 360 manually the other S/D at HELOP came back with the wrong altitude. When I tried to change HELOP to FL 360, it automatically added a S/C with the wrong altitude (Video Attached).

9804a
9804a_AutoSCEdit
9804a_ExtraSC

After the third step climb, it successfully reached FL 400; however, it removed the next point at 37N140W, which was a S/D to FL 380.

I tried to edit the point; however, when I tried to change HELOP to 37N140W, it wouldn't let me (see the Video Attached). I had to delete the entire point and then add 37N140W again. I'm not sure if that behavior is intended.
https://github.com/user-attachments/assets/fee4d3e6-9323-436a-8024-be2da32d7d5a

  • I wanted to re-program to add HELOP as a S/D but couldnt do. It kept changing automatically to HALLI (Video Attached).
    9804a_Can'tAddHELOP

  • After 37N140W which descended to FL 360, the HELOP point came back even though it was not on the list.
    9804a_OneSDPoint
    9804a_HELOPAutoBack

Conclusions:

  • The first step climb worked as intended. 20NM before the S/C point, the message was displayed. It climbed to FL 360 and did not remove any other step climbs that were programmed in the FMS. The FLPN page automatically added the next S/C point.

  • The second step climb worked as intended. 20NM before the S/C point, the message was displayed. It climbed to FL 380 but it removed the other step descent that was programmed in the FMS. The FLPN page automatically added the next S/C point.

  • The third step climb worked as intended. 20NM before the S/C point, the message was displayed. It climbed to FL 400.

  • The fourth step which was a S/D worked as intended after which there were no more Step Climbs or Descents.

Media:

Original Programming of Step Climbs
9804a_SCPointsFLPN

Step Climb 1:
9804a_StepClimb1

Step Climb 2:
9804a_StepClimb2

Step Climb 3:
9804a_StepClimb3

Please do let me know if anything is confusing here. Sorry if I dumped everything here.

@utkrishtm
Copy link

Quality Assurance Trainee Report

Discord Username : utkrishtm
Object of testing : #9804
Aircraft : A380X
Tier of Testing : 1
Date : 01/02/2025

Testing Process:

  • Testing UI only
  • Flight from KSEA to PHNL 2363NM.
  • Initial climb to FL 340. OPT FL 380 shown in the FMS. Climbed initially to FL 340 by point HQM
  • Added Step climbs
    SEDAR FL 360 (137 NM from HQM)
    43N131W FL 380 (238 NM from SEDAR)
    40N136W FL 400 (288 NM from 43N131W)
    37N140W FL 380 (260 NM from 40N136W)
    HELOP FL 360 (165 NM from 37N140W)

Route: HAROB6 HQM DCT SEDAR DCT 43N131W 40N136W 37N140W DCT HELOP A332 AUNTI R463 APACK MAGGI3

Testing Results:
Not Passed

Negatives:

  • I added all the above-mentioned points to the STEP ALTs page. After that, I cleared the entire list. However, it wasn't cleared out completely. After which, if I try to add the same point, it won't come up, but if I click on it again, it is displayed. Please see the video attached.

Media:
https://www.swisstransfer.com/d/c9173a82-0f27-44e9-a04b-d48c54a327a1

@ApostaL777rus
Copy link

Hi to all!
How i can install this?

@flogross89
Copy link
Contributor Author

Hi to all! How i can install this?

It's currently being tested, however you will be able to install it via the installer (when choosing development version) after this has merged.

@flogross89
Copy link
Contributor Author

Quality Assurance Report

Discord Username : floridude
Object of testing : #9804
Aircraft : A380X
Tier of Testing : 2
Date : 03/02/2025

Testing Process:

  • Set up flight from EDDM to EDDH with CRZ FL 240. Start at gate, set up FMS including two step climbs to FL260 (at ANELA) and FL280 (at LASGA). Auto Step Climb was enabled in the EFB.
  • Take-off, climb to FL240, don't touch aircraft. Both step climbs were performed automatically successfully.
  • Turn around, program a few waypoints, program step descend to FL260 --> also performed successfully + automatically

Testing Results:
Passed

Media:
image

@flogross89 flogross89 merged commit 0e1ed4f into flybywiresim:master Feb 3, 2025
8 checks passed
@cheddar22
Copy link

Fixes #9486

Summary of Changes

Adds step climbs to A380X.

Changes:

  • STEP ALTs tab of VERT REV page implemented
  • Interface to flight plan correctly integrated
  • Allow selection of CLB/DES constraint for SPD and ALT constraints
  • Add "auto step climb" QoL function
  • Add "ABOVE MAX FL" / "STEP DELETED" messages

Out of scope (i.e. not implemented):

Changelog will be added shortly before merge.

Screenshots (if necessary)

image image

References

Additional context

Discord username (if different from GitHub):

Testing instructions

  1. Load up cold&dark at airport, plan long enough flight (>3h) in Simbrief; Enable "Auto Step Climb" in EFB Realism Settings
  2. Fill in FMS as per normal procedures
  3. Insert step climbs or step descends (not too close to T/C or T/D, otherwise they'll get ignored)
  4. Delete step climbs or descends (clear altitude and/or waypoint field), see whether that works
  5. Enter step climb above max FL, should be ignored with "ABOVE MAX FL" message
  6. Start flight, take-off, fast forward to cruise (sim rate can be increased)
  7. When approaching S/C waypoint (at 20nm distance), the aircraft should display "STEP AHEAD" in the FMS message field. If Auto Step climb is enabled, the FCU alt should be automatically set to the new value, and CLB/DES should be engaged
  8. Verify that step climbs or descends work as intended, with or without Auto Step Climbs enabled

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

hi there, i am in no means a IT guy but wanted to try this one out but it bugs out with navigraph charts, therefore i cant connect due to "insufficient .env file

@aadee9940
Copy link

@cheddar22 this has already been merged, use the installer as per normal.

@ApostaL777rus
Copy link

Hi to all! How i can install this?

It's currently being tested, however you will be able to install it via the installer (when choosing development version) after this has merged.

now i use develop version, bit step climb not avail...

@flogross89
Copy link
Contributor Author

Hi to all! How i can install this?

It's currently being tested, however you will be able to install it via the installer (when choosing development version) after this has merged.

now i use develop version, bit step climb not avail...

Did you update the version via the installer? Could take a few hours to refresh

@flogross89 flogross89 deleted the feat-a380x-fms-step-climb branch February 4, 2025 14:55
@utkrishtm
Copy link

utkrishtm commented Feb 4, 2025

  1. Enable "Auto Step Climb" in EFB Realism Settings

Also, did you Enable "Auto Step Climb" in EFB Realism Settings?

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 FMS QA A380 Only QA only for A380 required QA Passed
Projects
Status: ✔️ Done
Development

Successfully merging this pull request may close these issues.

[A380X] Implement step climbs (VERT REV page)
8 participants