• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA From FSX Facility (e.g. airport ICAO) to .bgl file

  • Thread starter Thread starter KWB
  • Start date Start date

KWB

Messages
69
Country
germany
I read the FSX facilities by SimConnect "SimConnect_RequestFacilitesList". In order to get further details about the airports in range, somebody told me to read the corresponding .bgl file. :stirthepo Using tools like BGL2XML or BglAnalyzeX show me indeed, all the required information is there. :greenflag

But how would I find the corresponding .bgl file? When I search on my FSX directory (e.g. for EDDF), I do find some files in FlightSimulatorX\Aerosoft\AFD\Scenery. However, not everybody has this directory, because it is based on Aerosoft sceneries. So how would I find the original .bgl file containing this information (based on ICAO code EDDF)?

BTW, is there a (public available) C++ library for reading .bgl files (basically .bgl 2 some kind of in memory object). The above tools are nice, but it would be quite an overhead to convert all data to XML first and parse it back.

-- FINDINGS --

  1. Scenery.cfg somehow gives me the locations of all bgl files
  2. The directory "SceneryIndexes" contains files I am unable to interpret
  3. Directory "Facilities" with idx, unfortunately in binary files (no idea how to parse)
  4. Tools like FSC obviously create their own database from bgl files, but I'd prefer to read them on the fly (if feasible)
 
Last edited:
If you are looking for a list of all stock airports and the files they are located in then the airportList databases in ADE contain them. If you wish to use those you are welcome.

There are no open source decompilers for Bgl files as far as I know. All the decompilers I am aware of generate XML.
 
If you are looking for a list of all stock airports and the files they are located in then the airportList databases in ADE contain them.

Thanks for your offer.

So you are using the same approach as FSC (or vice versa :) ), read every .bgl file and generate a list out of it? Since FSX already displays all airports in order to select my (start) location, the data should be somewhere in memory - I wonder why the facility method gives me so little data and not all the runways etc. as well.
 
ADE creates data files for a lot of things. This includes all stock airport, stock navaids, stock objects and so on. Not all these are human readable but the airportList.dat file is a separated value file and you should be able to identify the fields ;) These are created by my development tools although I am thinking about adding the scanners back into ADE (they used to be there a long time ago).

I would guess that simconnect is only returning a sub set of the data.

FSX updates scenery indexes whenever the scenery is changed. I assume they are in memory somewhere when FSX is running. I do not use them.
 
Back
Top