Jump to content
Sign in to follow this  
RocketDuck

Extracting airports from FSX

Recommended Posts

Hi guys.

 

I have run in to a challenge with the program I'm developing using SimConnect and C#. As part of my application I need to periodically extract a list of all the airports and their info (lat / lon and so on). Therefore I can not use any of the awesome 3rd party softwares out there for it. I've looked at the Facility Request sample but the API reference in that one only gives me a radius of 200 km from which I can get airport data.

 

I have gone through the entire documentation and I just can't find anything, so maybe this can not be done through SimConnect?? If not does anyone have som great ideas on how to do it?

 

I really hope someone out there can help:

 

Cheers.

Share this post


Link to post
Share on other sites

Yep, all 20.000 airports :-)

I know it is a lot of data, but I need them to be available also when FSX isn't running.

Any ideas?

Share this post


Link to post
Share on other sites

ADE9X lists all the stock airports in a file called airportList.dat This contains ICAO ID, name, country, region(?), lat, and lon.

Share this post


Link to post
Share on other sites

Hi,

 

There is a utility program named MakeRunways that extract from FS different types of files containing data about airports and runways.

You can find it the site http://www.schiratti.com/dowson.html

 

So, you just have to read the file inside your C# program.

 

Regards.

Patrick.

Share this post


Link to post
Share on other sites

I've tried both utilities, and they are awesome. However I need my application to be independant from 3rd party software, so I need to extract the information myself. I was hoping someone knew how to get these informtions through a SimConnect connection? I've seen a lot of topics of people extracting the information from the .bgl files, but I have no idea how to get started with that. I should probably take it up over on the fsdeveloper forum.

 

But thanks for all the help guys. This is just a superb forum :-)

Share this post


Link to post
Share on other sites

Then I'm afraid you'll have to write your own code. Experience shows that it will take several minutes to extract all airports each time you call it.

 

Why can't you use the files created by other applications?

Share this post


Link to post
Share on other sites

The main reason is probably because I love the challenge of doing it myself. The other reason is what happens if i decide to deploy my application to the public. Then I might run in to som licensing issues when using 3rd party software...

Share this post


Link to post
Share on other sites

Hi,

 

You will have to decompile the bgl file (and if you love challenges, you are going to have a great time !). You can find some information about the file format here :

http://www.fsdeveloper.com/wiki/index.php?title=BGL_file_format_%28FSX_airport%29

 

Personnaly, in a similar situation, I provided the airfield file (not the third party software) with my software.

 

Patrick.

Share this post


Link to post
Share on other sites

The main reason is probably because I love the challenge of doing it myself. The other reason is what happens if i decide to deploy my application to the public. Then I might run in to som licensing issues when using 3rd party software...

 

The structure of .bgl files is also given in the PDF file that comes with NewbglAnalyse, which is the library here.

 

NewADE9X and MakeRunway are both freeware. All you need to is include advice in your instructions how to download them and how to use them to avoid licencing problems..

Share this post


Link to post
Share on other sites

As long as I don't run into any license issues, I would be more than happy to use some of the great tools out there. That would also save me a lot developing time.

Thanks for all your input, it's been a great help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...