PDA

View Full Version : Makerunways.exe



PRB
November 21st, 2014, 14:49
At Peter Dowson's site, there is a program called Makerunways.exe. It extracts runway and airport data from the sim. It produces several files, all but one are xml, csv, or text files, which I can figure out how to read. The one file that is not a text file is the one I'm interested in. It's a binary file called airports.fsm. This file is, apparently, a database of airports. That's what I want. But how to read the file? What is it? How does one access it? I posted this question on the support forum over there and got "didn't you ****?" Which I did. The "FM" says "this is a binary airports database used by FS_Meteo, at present after re-naming to Runways.rws", which is of no help. Does anyone here know how to read this "fsm" file? Or, ok, after you rename it to "airports.rws", does anyone know how to read that one, lol?

henrystreet
November 21st, 2014, 15:44
Paul, When I ran it, I got some csv files that can def be opened with Excel or notepad. Maybe I don't have the current version? looks like "runways.csv" has got all the runways listed by airport ICAO

PRB
November 21st, 2014, 17:16
Yep, that's what I got too. Here's the “background story”. Somebody posted on Dowson's support forum a while ago that he was working on a program using FSUIPC, and needed some way to determine which airport the plane was parked at. Turns out you can't get that info from FSUIPC, or even from the sim. You can get LAT/LON, but there's no way to get the ICAO of the airport you're parked at. So, he was then trying to figure out how to get airport data out of FS itself, from the BGL files that contain that data, so he could make his own airport database. So then, Dowson himself posts in this thread saying “why go through all the trouble, when you can simply use the airports database that my program Makerunways.exe produces. It's free.” I thought, “Dang, that's a great idea”. So I downloaded Makerunways.exe. It does make an airports database. It's listed in the screen shot you posted. It's called airports.fsm. This file, presumably, contains just the airports and where they are located. This would be simpler than going through the runways.txt file, since there are a lot more runways than airports. Dowson's answer to this other guy's post implied, to me anyway, that one could make use of this airports.fsm file, but he didn't say how. You can't suck it into sql server, because it's not a sql server file. It's in some unknown binary format. I Googled for hours today looking an answer before posting over at Dowson's support forum, only to get told to "****". Now I'm cranky! :) It seemed like a simple question, at the time. At this point, I've given up on the mysterious airports.fsm file, and will either use a bgl decompiler to extract the airport data myself, or see if any of the text based files that come out of Makerunways are worth “parsing” in some way to end up with a list of airport ICAO values and their associated latitude and longitude, which is all I'm after, after all.

orionll
November 21st, 2014, 18:08
The SimConnect API has SimConnect_RequestFacilitesList, which is supposed to be "used to request a list of all the facilities of a given type currently held in the facilities cache." Perhaps the developer could use that in conjunction with SimConnect_RequestDataOnSimObject to find the user's position, and see which airport is nearest? That way you should be able to avoid any lookups (and not worry about the database needing to be changed if the user installs new scenery).

Edit: Don't do that. The API has a bug; confirmed multiple times (http://www.fsdeveloper.com/forum/threads/airports-missing-from-facilities-request.428998/).

PRB
November 22nd, 2014, 04:01
After sleeping on it, I'm thinking the list of runways in the .csv file is a better choice anyway. I can easily read that file into an sdf database file and then determine not only the airport, but which runway I'm sitting on.