First flight
FlightGear has roughly a zillion command-line arguments, but all you need to do to start with the default settings is enter fgfs in a terminal. In a few seconds, you'll find yourself in a Cessna 172, with the engine running, at the start of runway 28R at San Francisco International Airport. Open the throttle, pull back on the stick as the Cessna gathers speed down the runway, and in no time at all you're flying, just like the Cessna you see in Figure 1. Don't be discouraged if you crash. It's the norm for newbies.
|
|
| Figure 1: Taking off at SFO | |
|
|
| Figure 2: Candlestick Park | |
|
|
| Figure 3: Golden Gate bridge | |
|
|
| Figure 4: A-10 Warthog | |
|
|
| Figure 5: Passenger jet | |
|
|
| Figure 6: Paraglider |
The default view is of the cockpit, and you really can't see too much of what's around you and beneath you in that view. Hit the V key and you can cycle through various other views available: from the side, from behind, from the tower, and so on.
Your default aircraft and airport are selected in the preferences.xml file in the FlightGear root directory. It's easy to change either one. I found that the Cessna 172R was easier to fly, so I edited my preferences file to start off in it, by changing this line:
<aircraft>c172p</aircraft>
To this:
<aircraft>c172r</aircraft>
If you're like me, though, you'll be trying so many different aircraft as you learn your way around the simulator that it just makes more sense to specify the plane you're going to fly at the command line instead in preferences.xml. If you're Jonesin' for a Gatling gun, for example, you could fly an A-10 Warthog instead of a Cessna by starting the simulator with fgfs --aircraft=A-10.
To see what aircraft are available to you to fly, start FlightGear with the --show-aircraft option. And if you don't find what you're looking for there, search the Website for additional aircraft and download to your heart's content. I grabbed an archive with 125 aircraft for FlightGear from here, but it may be gone before you grab it. If it is, you can still select the aircraft one at time from here.
After downloading, enter the FlightGear/Aircraft directory, use sudo unzip to decompress the downloaded file. Each plane will have its own subdirectory in the Aircraft directory, and once they do you can specify that craft from the command line. By the way, FlightGear includes parasails, balloons, Soar planes, and more.
Where to fly
The FlightGear Website suggests a few interesting places to fly other than San Francisco, including Death Valley, Idaho, the Dead Sea, and the Grand Canyon. To do so, you need to do two things: specify the airport desired and have the required scenery installed.
By default, the only scenery included with FlightGear is the San Francisco area. But the entire world is available, either through purchase on DVD or by download from the Internet in 10x10 degree (longitude and latitude) chunks. I've found the easiest way to grab the chunks I want is by using the graphical download facility. The chunks are more than 100MB, so it might be worthwhile to buy the DVD.
To add the chunks to FlightGear, enter the FlightGear/Scenery directory and enter tar xzf chunkfile.name. The data in the chunk you downloaded will be put in the Objects and Terrain sub-directories, but might still be compressed. That's fine. Leave them like that and FlightGear will take care of decompressing them as needed.
With the scenery in place, all you need to do is specify the airport's ICAO (International Civil Aviation Organization) code on the command line, very similarly to how you specify a plane: --airport=KTKI, or whatever the code may be. Some airfields may not be assigned an ICAO code, and FlightGear uses the 3-letter FAA LID (Location ID) code for them. If you're not sure of what the ICAO or FAA LID code is for an airfield, here's one way to find it.
Enter the FlightGear/Airports directory and enter gunzip apt.dat.gz. Then use grep to find the airport in the expanded apt.dat file. I wanted to fly along the north shore of Oahu in Hawaii, for example, so I searched for the Dillingham airfield like this:
grep Dillingham apt.dat 1 74 1 0 PDLG Dillingham 1 14 0 0 PHDH Dillingham
I learned PDLG was for an airfield in Alaska, not Hawaii, but PHDH was exactly the field I wanted, so I started FlightGear with fgfs --airport=PHDH and a few minutes later I was Haleiva dreaming and heading towards Waimea Bay.
But remember, FlightGear more than just US scenery, it has global scenery as well. My next airport selection was RPLB, Subic Bay International, in the Philippines. Once I had the right chunk downloaded and installed, I was flying out of Olongapo and up the coast to San Miguel, in Zambales.
Other features
We haven't even scratched the surface on FlightGear's capabilities, but it would take a book to cover them all. Multi-player flight, for example, is available for Linux users, so you can fly with your friends. Here is the command line I use to fly an A-10 in multiplay mode:
fgfs --multiplay=out,10,mpserver01.flightgear.org,5000 --multiplay=in,10,192.168.1.151,5000 --callsign=K1GPL --aircraft=A-10
I only had to type that once before I got tired of doing that, so I made an alias for it and saved it in .bashrc. Now I all have to enter is fly-a10.
The IP address in the --multiplay=in option is my desktop address on the LAN. Change it to your own IP address -- be sure and use the internal IP address if you're behind a router -- and change the callsign to whatever you like, and you're there.
You can verify your presence at this page, which shows all the current planes in multiplay mode. To learn more about multiplay mode, read this HOWTO.
FlightGear uses the actual time at whatever location you're starting from. You can have it use real weather data, too, if you like, by adding --enable-real-weather-fetch to the command line.
You can also use command-line options to "record" and "playback" your FlightGear sessions. Use --generic=file,out,20,flight.out,playback.xml to record a flight, and --generic=file,in,20,flight.out,playback.xml --fdm=external to play it back. During playback, you'll need to specify the same command-line options for aircraft, time, and location that you used when recording.
FlightGear has lots of new features in CVS that aren't in the stable version yet. Upcoming releases will bring things like "just-in-time" realtime scenery retrieval and display, a dynamic cockpit view which makes you feel as if you are inside an airplane rather than being the airplane, and more. Just take a look at the announcements section of the FlightGear Website for the past few weeks to see what I mean. As Olsen told me, he has trouble keeping up with everything that's going on, but it sure is fun.
Conclusion
It's been a long time since I've been as impressed with any open source project as I am with FlightGear. I started playing with it after reading a comment about it on a local LUG mailing list. Prior to that, I hadn't even been aware that it was available in Ubuntu Dapper.
I tried it then, at version 0.9.9, and liked it. Version 0.9.10-2, which comes with Ubuntu Edgy, has a lot of new features which make it even better. Now I can't wait to get the features I know are in CVS. If you've ever wanted a great flight simulator for your Linux box, you don't have to wait any longer. It's here and it's hot.
Note: Comments are owned by the poster. We are not responsible for their content.
Why are you such a spineless coward?
A small nit.
Posted by: Anonymous Coward on December 05, 2006 03:04 AM#