|
From: David M. <da...@me...> - 2001-06-18 21:57:24
|
[Does one of the FAQ maintainers want to snarf this for posterity?] I'm not (yet) a PPE guy, so I thought that I'd see how hard it was to add an object to FlightGear exactly where my house is without going through all the PPE hoops on Wolfram describes on his web site. Here's the result, after only five minutes' work (my real-world house doesn't look quite so tower-like, but I'll fix that another day): http://home.achilles.net/~meggins/flightsim/fgfs-object.png Here are the step-by-step instructions on doing the same thing for your house/office/airport (don't let my verbosity put you off; there are really only a few steps): 1. Read Curt's message from 2001-05-15 announcing this new feature in FlightGear: http://www.geocrawler.com/mail/msg.php3?msg_id=5762613&list=11853 In particular, read the disclaimers so that you know what is and isn't possible and why, and don't post spurious complaints or bug reports. 2. Get the latitude and longitude of your house. I don't like to send my exact coordinates to a public mailing list so I'll round mine off to latitude -75.73 and longitude 45.50 for the sake of this example. There are a couple of ways to get this information: a) Find a friend with a GPS. For anyone but a serious sailor, hiker, pilot, or search-and-rescue person, a GPS is purely a toy, and people *need* to show off their toys. Trust me -- if you have a friend drive 50km just to read your lat/lon on a GPS, you're doing the poor person a kindness. b) Look at a good map that prints latitude and longitude along the sides, and make your best estimate. You'll probably be close enough. 3. Figure out what FlightGear tile your house falls on and what the ground elevation is in FlightGear (it may not be exactly the same as in the real world). There are proper ways to calculate this, but the best approach is simply to let FlightGear do the work for you. You need to run FlightGear once with your position as input, and save all logging output to a file; in Linux, under the bash shell, I do it like this fgfs --lat=45.50 --lon=-75.73 2>&1 | tee fgfs.log Windows users will need to use a different approach, especially if they are not using the CygWin tools. IMPORTANT: write down your altitude before you quit FlightGear; you can read it from the altimeter on the control panel or from the HUD. 4. The altitude your wrote down was probably in feet. Convert it now to meters (divide by 3.28) and write down the result. 5. Quit FlightGear and search the output log file for the first occurrence of the string "Loading tile" (the first tile loaded is the one under the plane). In my case, I found this: Loading tile /usr/local/Scenery/w080n40/w076n45/1712601 Write this down, right below the longitude, latitude, and altitude that you've already recorded. 6. Copy a 3D model in a format that Plib understands (it knows a lot of them) to the same directory as the tile file. The FlightGear base package has some sample models under $FG_ROOT/Models/Geometry; for my example, I picked Towerax.ac: cp $FG_ROOT/Models/Geometry/Towerax.ac /usr/local/Scenery/w080n40/w076n45/ You could also use an airplane model to place a static aircraft or use a 3D modelling program to make a tiny 3D you -- go nuts! 7. Edit the text file consisting of the tile name with the extension .ind. The file will already exist if there is an airport on the tile; otherwise, you can create it from scratch. For me, the file name was /usr/local/Scenery/w080n40/w076n45/1712601.ind and it already existed, with the line OBJECT CYRO 8. At the end of the file, add a new entry for your object, consisting of the word "OBJECT_STATIC" followed by the longitude in degrees, the latitude in degrees, the altitude in meters, and the heading in degrees. For me, the line looked like this (I actually had a few more decimal places, but I'll keep those to myself): OBJECT_STATIC Towerax.ac -75.73 45.40 60 0 9. Save the ind file and start FlightGear again; when you fly over your spot, you should see the object. Congrats! As an interesting aside, if you start the plane at exactly the same co-ordinates as your object and the object has a large, flat top (like Towerax.ac), FlightGear will actually start your plane on top of the object. Have fun, David -- David Megginson da...@me... |