Skip to content

fix: add FXLegData to ProcedureLeg union #13

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

Merged
merged 3 commits into from
Mar 11, 2025

Conversation

MikeRomaa
Copy link
Contributor

@MikeRomaa MikeRomaa commented Feb 17, 2025

I'm currently writing an interface using your JS package and noticed that the type of ProcedureLeg does not include FXLegData.

At first I assumed that this was intentional, but I later faced issues when processing the DEGE3S.RW16 departure from LSZH, which includes an FA leg despite transitions having a legs type of ProcedureLeg[]. I've also noticed this with the GERS1H.RW34 departure, which contains an FD leg.

I also noticed that FC legs were missing from the FXLegData union, which came up on the L34RY.KAIHO approach into RJTT, and so were PI legs which came up on the L20.HRV approach into KMSY.

@MikeRomaa
Copy link
Contributor Author

MikeRomaa commented Feb 17, 2025

Also noticed that FC legs came up as procedure legs, and were completely missing from the type. I used the following queries to determine the types for FCLegData fields:

  • All distances are given in nautical miles:
    SELECT DISTINCT(route_distance_holding_distance_time)
    FROM tbl_pf_iaps
    WHERE path_termination = 'FC'
  • turn_direction is optional:
    SELECT DISTINCT(turn_direction)
    FROM tbl_pf_iaps
    WHERE path_termination = 'FC'
  • Altitude constraints may be of types other than +:
    SELECT DISTINCT(altitude_description)
    FROM tbl_pf_iaps
    WHERE path_termination = 'FC'
  • recommended_navaid, course, rho, and theta are mandatory:
    SELECT COUNT(*)
    FROM tbl_pf_iaps
    WHERE
        path_termination = 'FC' AND
        (
            recommended_navaid IS NULL OR
            course IS NULL OR
            rho IS NULL OR
            theta IS NULL
        )

Of course it's entirely possible that I've missed fields, so please let me know if this looks right.

Copy link
Contributor

@professoralex13 professoralex13 left a comment

Choose a reason for hiding this comment

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

Whoops I forgot those 😆
lgtm

@SkySails SkySails merged commit e323579 into Navigraph:v1 Mar 11, 2025
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants