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

Fixed bug where region in facility list was lost #94

Merged
merged 2 commits into from
Dec 22, 2023

Conversation

AndreKlang
Copy link

According to the doc (https://docs.flightsimulator.com/html/Programming_Tools/SimConnect/API_Reference/Structures_And_Enumerations/SIMCONNECT_DATA_FACILITY_AIRPORT.htm) the list items have two leading strings, ident with 6 bytes and region with 3.

When reading with "9", the region was ignored. I assume it's because there is a null-terminator at the end of the ICAO. So the resulting "icao" was correct before, but no region.

Example:

  FacilityVOR {
    icao: 'HST',
    region: 'K7',
    latitude: 25.489980429410934,
    longitude: -80.37941381335258,
    altitude: 0.9140000343322754,
    magVar: 6,
    frequency: 108200000,
    flags: 8,
    localizer: 0,
    glideLat: 0,
    glideLon: 0,
    glideAlt: 0,
    glideSlipeAngle: 0
  }

(Sorry for not creating an issue first, just happened to catch this when testing other stuff)

@EvenAR EvenAR self-requested a review December 22, 2023 22:07
Copy link
Owner

@EvenAR EvenAR left a comment

Choose a reason for hiding this comment

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

Great catch! Thanks for the PR! 🙏

@EvenAR EvenAR merged commit faf9ed0 into EvenAR:master Dec 22, 2023
11 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.

None yet

2 participants