DevNote Dec-18-2006

Where's the airport? what's the runways?

Dec. 18, 2006

I'm about to fly from Haneda, Tokyo International Airport, to take a snapshot of A6M2 around Mt. Fuji in the dawn. This aircraft is the most popular Japanese aircraft so I want to fly this in Japan. Thanks to Syd, who is developing this aircraft, one of my Christmas wishes comes true (See a post about wish-list on flightgear-users mailing list for this story). Although this aircraft is in its early phase of development process, it's simple and beautiful. Thanks Syd!!

Okay, FlightGeear finishes loading everything and I'm ready to take .... wait, something is wrong. I ain't got nothing but a dark brown-ish wall... What's going on? Changing a view tells me that it's already crashed! I know it sometimes happens, so I need to specify --runway option. By the way, do I have a runway list? none, of course. I didn't make it. I know I can see it at /Applications/FlightGear.app/Contents/Resources/data/Airports/meter.dat.gz but don't want to open that file every time. Since I don't even want to check the runway with that file, who else wants to read this file? Maybe a few... Moreover, I don't like the way to select an airport by its ICAO code... Did you know the ICAO code for your local airport? I didn't.

It's crappy from a usability perspective. I've got to do something for this. Open Interface builder and create a new tab, a tableview for a search result, a search text field, and runway pup-up button. Hmm, it's not that bad. What about the data? where do I get this? meter.dat.gz? yeah, but it's not enough. So I wrote a simple ruby script to fetch airport data from a ICAO airport database website. After half an hour of fetching all data, airport data dictionary is converted into airports.plist. At this moment, it contains airport names, locations, countries, IATA airport codes (such as SNA for Santa Ana, and HND for Haneda), and ICAO codes (such as KSNA, and RJTT).

After a few hours of programming, It's done. I left the airport pop-up button as it is since some users may want to keep it. Searching airport is now MUST item to me since it gives me a chance to fly from different airports. As a matter of fact, I'd never used an airport in France or Germany until this evening because I didn't know the code for these but I do now.

Anyway, I went back to Haneda with A6M2. This time it was not crashed and is on the runway that I specified (04). But wait, I don't want to go that way! I want to go to Mt. Fuji! It's in opposite direction. According to flightgear server online map, it should be 22, but there's no 22 in meter.dat.gz. It seems that just adding 18 to every runway is enough so I added this to a ruby script. Finally I was able to fly to Mt. Fuji with my favorite aircraft. Here's the screenshot that I took.

fgfs-zero-fuji2.jpg SIZE:948x709(?KB)

One Response to “DevNote Dec-18-2006”

  1. djurkynmh iplz Says:
    auiyzvep ytafxou ryiaj gfkrnxedy wkmistze vkytm rxoc

Leave a comment

Please DO NOT post a crash log here. it's hard to read and is not worth reading for most of users. Email it to me directly with some additional information including exact FlightFear version, machine spec, and what was you doing when it went crash. Thank you.
Begin the comment with //pukiwiki if you want to write a comment in PukiWiki format.

You must be logged in to post a comment.