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: Chartfox support #8519

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

BenJuan26
Copy link
Contributor

@BenJuan26 BenJuan26 commented Feb 23, 2024

Fixes #5768

Summary of Changes

Adds support for ChartFox charts.

Unlike Navigraph, a SimBridge connection is needed for most charts, since they're in PDF form. Charts that are images can still be viewed with no SimBridge connection.

Remaining items

  • API access
    • API key (official)
    • Official documentation (I've been making educated guesses)
    • CORS changes on their end
  • Login flow
    • FBW API changes (haven't opened PR because of ChartFox radio silence)
    • Auth wrapper in EFB
  • Caching
    • API responses
    • Images?
  • Chart data powered by ChartFox
  • Double-check we are complying with the terms
  • Implement bounding box when geo refs are available (scary matrix math 😨 )
  • SimBridge support for URL-based PDF conversion
  • PDF pagination tested and working for ChartFox and Local Files
  • Loading toasts
    • PDF
    • Image (not necessary?)
  • SimBridge disconnected warning
  • Figure out what's happening with phantom runway associations, e.g. CYYZ IKLEN THREE DEP IKLEN3 SID-10C (10C is not a runway)
    • This is just bad data from them. It looks the same way on their website. I reported the inaccurate data for this particular case.
  • Verify ALL tab is working for ChartFox (too many tabs)
  • Unify ChartFileType with the Local Files equivalent? (local files uses the string value, so not worth it)
  • Test SimBrief integration
  • Test pinned charts

Screenshots (if necessary)

References

Additional context

Discord username (if different from GitHub):

Testing instructions

  1. Disconnect SimBridge
  2. Go to the charts menu of the EFB and select the ChartFox tab
  3. Enter the ICAO of an airport with PNG charts, e.g. CYYZ
  4. Click some of the charts on different tabs and verify that they load correctly
  5. Enter the ICAO of an airport with PDF charts, e.g. KBOS
  6. Click on a chart and verify that an error message is shown because SimBridge is disconnected
  7. Connect SimBridge
  8. Click the retry button. The selected chart should load correctly
  9. Use Navigraph and Local Files charts and verify that they are working as expected

How to download the PR for QA

Every new commit to this PR will cause a new A32NX artifact 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, click on the bottom PR tab
  4. Click on the A32NX download link at the bottom of the page

Copy link
Member

@ZigTag ZigTag left a comment

Choose a reason for hiding this comment

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

I haven't done a full review but this is some awesome work, glad you got it to work as I've always had problems with the old API, also glad to see the new one is working properly!

@Benjozork
Copy link
Member

Could you get in touch with us on Discord in the #dev-support channel so we can coordinate regarding API keys?

@BenJuan26
Copy link
Contributor Author

BenJuan26 commented Mar 1, 2024

This is ready for early review. If you want to test in-sim, you'll need the sample data, which I can provide in Discord.

In particular I need opinions:

  • I've put in loading toasts for PDF charts, since they have to go through SimBridge. When loading is fast, they can be a little loud. 1) Should I leave them in? 2) Should I add them for image-based charts? They usually load pretty quickly.
  • If getting a PDF chart fails, the previously selected chart will still be loaded. Is that what we want to happen? I do think that it's confusing and the user might think the old chart is the current chart.

@FoxtrotSierra6829
Copy link
Member

  • Figure out what's happening with phantom runway associations, e.g. CYYZ IKLEN THREE DEP IKLEN3 SID-10C (10C is not a runway)
    • This is just bad data from them. It looks the same way on their website. I reported the inaccurate data for this particular case.

This is the chart index number, not bad data from them. In this case, CYYZ-SID-10C is the full index designator as issued by Nav Canada. For CYYZ, the SIDs are numbered 1A till 28D. The index number is used to quickly identify the correct chart for a given procedure. Jeppesen also numbers their charts, tho it has a slightly different system.
See below:
grafik

@BenJuan26
Copy link
Contributor Author

BenJuan26 commented Mar 2, 2024

Thanks for the detailed reply. I don't have a Navigraph subscription, so despite seeing chartIndex in the code, I didn't know what that data looked like. I could tell that in this case the 10C was an identifier and not a runway, which is why it confused me that it was listed as a runway in the data:

meta: [
    {
        type: 0,
        type_key: 'Runways',
        value: [
            '10C',
        ],
    },
],

That being said, this is just an API and is for machines to read, not humans, and it serves the purpose of grouping the charts. More importantly, it works the same way in my implementation as it does on their website, so no action is needed. I do think I'll review how the Navigraph implementation utilizes chart indices and see if I can do something similar here.

@FoxtrotSierra6829
Copy link
Member

Ah I see, yeah in that case their system must be misinterpreting the data indeed.

@BenJuan26
Copy link
Contributor Author

I'll be pulling back from this until we hear back from ChartFox. There are a number of problems that can't be solved until we hear from them.

@2hwk 2hwk added this to the Backlog milestone Apr 19, 2024
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.

Chartfox Support
5 participants