Chocolate Software Forums

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Airport database  (Read 17848 times)

Dangerousdave26

  • Junior Member
  • **
  • Offline Offline
  • Posts: 28
    • Dangerousdave26 Sim-Outhouse.net
Airport database
« on: September 19, 2008, 11:10:44 AM »

I hate to come to forums to ask questions because in most cases if you search deep enough somebody has already asked the question and the answers are there. In this case I am hitting a brick wall. That is until I post this then my next google search will find it. I am asking the question here because FS Host already has part of what I want.

In the FS Host folder are three files that contain all of the airports ICAO and Latitude/Longitude corrordinates for FS2002, FS2004, and FSX. I would like to find a file (csv or txt) like this that includes ICAO, Latitude/Longitude corrordinates and elevation of the airport. No other information is needed. Is there a way to compile this information? I have been searching the net for someone who has done it or some method to do it with out success.

Any help is appreciated.
Logged
See you all at the Outhouse

www.sim-outhouse.net aka SOH FC

www.sim-outhouse.com aka SOH

FS Host server www.sim-outhouse.net:8181

Russell Gilbert

  • Administrator
  • Guru
  • *****
  • Offline Offline
  • Posts: 1473
    • FSHost
Re: Airport database
« Reply #1 on: September 21, 2008, 10:38:37 AM »

Hi,

Sure, I think I have mostly what you want.  I exported the airports for FS2002 and FS2004 using Traffic Tools.  I can't honestly remember where I got the airport list for FSX right now.  But anyway, I've modified them to create the lists you want, with just ICAO, lat, lon, and alt (in feet).  The only thing is that the lat/lon values are in different formats.  The FS2002/FS2004 files are the same format, and the FSX file is different.  Take a look at the top of one of the airports files that comes with FSHost to see an explanation of the different formats.  I'm hoping you can write a little program to do the conversions.  If you need help, let me know.  If you do write such a program, and would like to share the output, let me know and I'll post your converted file here so we have all three in the same format, in case someone else needs it later.

See the attachment below...

Russell
« Last Edit: September 21, 2008, 10:40:39 AM by Russell Gilbert »
Logged

Dangerousdave26

  • Junior Member
  • **
  • Offline Offline
  • Posts: 28
    • Dangerousdave26 Sim-Outhouse.net
Re: Airport database
« Reply #2 on: September 22, 2008, 05:38:35 PM »

Thats just what I wanted.

And i knew it would not be that hard. I have TTools.

oh well some times it is more of a matter of knowing where to get the information.

I will post the updated files once I get them converted to the same format.

Thanks Dave
Logged
See you all at the Outhouse

www.sim-outhouse.net aka SOH FC

www.sim-outhouse.com aka SOH

FS Host server www.sim-outhouse.net:8181

wheelie

  • Senior Member
  • ****
  • Offline Offline
  • Posts: 111
    • Flightservers.net
Re: Airport database
« Reply #3 on: September 22, 2008, 11:08:04 PM »

This is what I do to convert the FS9 longitude and latitude coordinates into the decimal (FSX) format. I do it in MS Excel which doesn't understand '-0' which creates a problem because some of the airports are close to longitude 0 and or latitude 0. That is why particular attention is paid to the '-'.

FS9ICAO="06AZ"
FS9Longitude="N35 47.50"
FS9Latitude="W110 25.40"

FS9Nhemisphere=LEFT(FS9Longitude,1)
FS9LongDegrees=MID(FS9Longitude,2,SEARCH(" ",FS9Longitude,1)-2)
FS9LongMinutes=MID(FS9Longitude,SEARCH(" ",FS9Longitude,1)+1,LEN(FS9Longitude)-SEARCH(" ",FS9Longitude,1))
FS9DecimalLongitude=ROUND(IF(FS9Nhemisphere="S","-"&FS9LongDegrees+(FS9LongMinutes/60),FS9LongDegrees+(FS9LongMinutes/60)),8)

FS9Ehemisphere=LEFT(FS9Latitude,1)
FS9LatDegrees=MID(FS9Latitude,2,SEARCH(" ",FS9Latitude,1)-2)
FS9LatMinutes=MID(FS9Latitude,SEARCH(" ",FS9Latitude,1)+1,LEN(FS9Latitude)-SEARCH(" ",FS9Latitude,1))
FS9DecimalLatitude=ROUND(IF(FS9Ehemisphere="W","-"&FS9LatDegrees+(FS9LatMinutes/60),FS9LatDegrees+(FS9LatMinutes/60)),8)

The result is that:
FS9DecimalLongitude=35.79166667
FS9DecimalLatitude=-110.42333333

I can't give you a converted list for all the airports because I only bothered to calculate the decimal coordinates for those FS9 ICAO codes that don't appear in the FSX list (1,104 of them). This was so that I could figure out what the new ICAO codes are in FSX or whether the airport has 'disappeared' from the face of the earth (126 of them have disappeared in FSX).
Logged

Dangerousdave26

  • Junior Member
  • **
  • Offline Offline
  • Posts: 28
    • Dangerousdave26 Sim-Outhouse.net
Re: Airport database
« Reply #4 on: October 08, 2008, 05:47:06 PM »

Thanks wheelie

This is the first time I have been able to check back in to the site. I converted FS2002 database using excel but not in the fashion you suggested. I did it the harder way  :D

I started off by stripping empty spaces there was one space in front of all of the coordinates.

I then stripped the left side by three characters in the latitude column. this removed the xx, -xx, and xxx but had problems and left one character for any -1xx and also did not like latitudes with x. All -1xx and x latitudes were changed manually.  :P

I then did the same thing and stripped three characters in one column and four characters in another. I manually made the corrections to the columns that were x or -1xx as this was still a problem in longitude.

Once they were all stripped I did the /60 calculation and arrived the decimal value for the Minutes / Decimal Minutes.

Now I only need to strip the right side of the original coordinates to get only the first characters. I then joined them as text to output them in the proper format.

I then copied all of the fields to a separate worksheet so I had a clean sheet with out all of the calculations just ICAO, Latitude / Longitude Corrordinates and elevation.

I then exported the data to a csv file that I will post after I finish 2004. I took me about 2 solid days of work to do this. FS2004 will take close to that but i have the process figured out so it will not take as long.

Dave
Logged
See you all at the Outhouse

www.sim-outhouse.net aka SOH FC

www.sim-outhouse.com aka SOH

FS Host server www.sim-outhouse.net:8181

wheelie

  • Senior Member
  • ****
  • Offline Offline
  • Posts: 111
    • Flightservers.net
Re: Airport database
« Reply #5 on: October 08, 2008, 08:12:00 PM »

It took 2 days  :o of manual editing? Oh wow man.

I just imported the FS2002 airport file into my excel spreadsheet and it took like 5 minutes to get all the coordinates converted to a decimal value. I did the same for FS9 - another 5 minutes.

Send me your email address (to wheelie @ skynet.be) and I'll send you the file - could save you a few days work  :)
Logged
Pages: [1]   Go Up
 

anything