plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

ericmarciano avatar image
ericmarciano asked ericmarciano commented

Read gate lat/long

Gates information is available in the airport information, but I don't understand how this information is formalized.

  • The values for latitude and longitude are strange, not like the lat/long coordinates usually found for airports or waypoints. In the example shown here (gates in Paris Le Bourget LFPB), the latitude is expressed in thousands and the longitude is always integer, strange... I guess there is a way to calculate the exact lat/long position for each gate.
  • The name is strange (always 1 in my example), again the full name can probably be computed from the name, number and suffix.

Any help is greatly welcome.
Thanks.

1674506954998.png

gauges
1674506954998.png (131.7 KiB)
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

1 Answer

·
tracernz avatar image
tracernz answered ericmarciano commented

The gate lat/lon are offsets in metres from the airport lat/lon.

I was doing this for gate ident... but I ignore some of the data as you can see...

edit: also see the asobo-vcockpits-instruments\html_ui\Pages\VCockpit\Instruments\Shared\FlightElements\Waypoint.js code.

private static letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';

... snip ...

// values less than 12 are gate types, which we don't care for... 12 or greater are alphabetical chars which we do care for
const prefix = msGate.name >= 12 && msGate.name < 38 ? MsfsMapping.letters[msGate.name - 12] : '';
const suffix = msGate.suffix >= 12 && msGate.suffix < 38 ? MsfsMapping.letters[msGate.suffix - 12] : '';
const ident = `${prefix}${msGate.number.toString()}${suffix}`;
1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

ericmarciano avatar image ericmarciano commented ·
Thanks for your help, it works perfectly :)
1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.