Under Linux (or any other flavor of Unix), FlightGear will be invoked by
   runfgfs --option1 --option2...,
where the options will be described in Section 4.4 below.
   If something strange happens while using this shell script, if you want to do some
debugging (i.e. using ”strace”) or if you just feel nice to be ”keen”, then you can start
FlightGear directly by executing the ”fgfs” binary. In this case you should at least add
one variable to your environment, which is needed to locate the (mostly) shared library
built from the sources of the SimGear package. Please add the respective directory to
your LD_LIBRARY_PATH. You can do so with the following on Bourne shell
(compatibles):
                                                                     
                                                                     
   
| 
 LD_LIBRARY_PATH=/usr/local/FlightGear/lib:$LD_LIBRARY_PATH
 export LD_LIBRARY_PATH/
 | 
or on C shell (compatibles):
                                                                     
                                                                     
   
| 
 setenv LD_LIBRARY_PATH
 /usr/local/FlightGear/lib:$LD_LIBRARY_PATH
 | 
Besides this (used by the dynamic linker) ”fgfs” knows about the following environment
variable
   FG_ROOT: root directory for the FlightGear base package; this corresponds to the
--fg-root=path option as described in Sec. 4.4.1
   
Before starting the simulator, you may want to adapt the file webrun.bat situated in
the main FlightGear directory. Open the file with an editor
   In Windows explorer, change to the directory /FlightGear and double-click
runfgfs.bat.
                                                                     
                                                                     
   
Fig. 3: Ready for takeoff. Waiting at the default startup position at San Francisco Itl.,
KSFO.
   Alternatively, if for one or the other reason the batch file does not work or is missing,
you can open an MS-DOS shell, change to the directory where your binary resides
(typically something like c:/FlightGear/bin where you might have to substitute
c: in favor of your FlightGear directory), set the environment variable via (note the
backslashes!)
   SET FG_ROOT=c:\FlightGear\bin
and invoke FlightGear (within the same MS-DOS shell, as environment settings are only
valid locally within the same shell) via
   fgfs --option1 --option2....
   Of course, you can create your own runfgfs.bat with Windows Editor using
the two lines above.
   For getting maximum performance it is recommended to minimize (iconize) the text
output window while running FlightGear.
                                                                     
                                                                     
   
Say you downloaded the base package and binary to yout home directory. Then you can
open Terminal.app and execute the following sequence:
setenv FG_ROOT  /fgfs-base-X.X.X ./fgfs-X.X.X.-date
--option1 -- option 2 (one line)
or
./fgfs-X.X.X-version-date --fg-root= fgfs-base-X.X.X
fgfs-base-X.X.X
--option1 --option2. (one line)
   
Following is a list and short description of the numerous command line options available
for FlightGear. If you are running FlightGear under Windows you can include these into
runfgfs.bat.
   However, in case of options you want to re-use continually (like joystick settings)
it is recommended to include them into a file called .fgfsrc under Unix
systems and system.fgfsrc, resp. under Windows. This file has to be in
the top FlightGear directory (for instance /usr/local/Flightgear). As it depends
on your preferences, it is not delivered with FlightGear, but can be created
with any text editor (notepad, emacs, vi, if you like). Examples for such a file
(including a detailed description on the configuration of joysticks) can be found at
   http://rockfish.net/shell/aboutjoy.txt.
   
     
     - --help, -h: Gives a small help text, kind of a short version of this Section.
     
- --fg-root=path: Tells FlightGear where to look for its data files if you
     didn’t compile it with the default settings.
     
- --fg-scenery=path:  Allows  specification  of  a  path  to  the  scenery
     directorypath , in case scenery is not at the default position under
     
 /Flightgear/Scenery;  this  might  be  especially  useful  in  case  you
     have scenery on a CD-ROM.
- --disable-game-mode: Disables full screen display.
     
- --enable-game-mode: Enables full screen display.
     
- --disable-splash-screen: Turns off the rotating 3DFX logo when
     the accelerator board gets initialized (3DFX only).
     
- --enable-splash-screen: If you like advertising, set this!
     
- --disable-intro-music:  No  audio  sample  is  being  played  when
     FlightGear starts up. Suggested in case of trouble with playing the intro.
     
- --enable-intro-music: If your machine is powerful enough, enjoy
     this setting.
     
- --disable-mouse-pointer: Disables mouse interface.
     
- --enable-mouse-pointer:  Enables  mouse  interface.  Useful  in  full
     screen mode for old Voodoo/VoodooII based cards.
     
- --disable-freeze: This will put you into FlightGear with the engine
     running, ready for Take-Off.
     
- --enable-freeze: Starts FlightGear in frozen state.
     
- --disable-fuel-freeze: Fuel is consumed normally.
                                                                     
                                                                     
     
- --enable-fuel-freeze:   Fuel   tank   quantity   is   forced   to   remain
     constant.
     
- --disable-tod-freeze: Time of day advances normally.
     
- --enable-tod-freeze: Do not advance time of day.
     
- --control-mode:  Specify  your  control  device  (joystick,  keyboard,
     mouse) Defaults to joystick (yoke).
     
- --disable-auto-coordination:     Switches     auto     coordination
     between aileron/rudder off (default).
     
- --enable-auto-coordination: Switches auto coordination between
     aileron/rudder on (recommended without pedals).
     
- --browser-app=/path/to/app:   specify   location   of   your   web
     browser. Example: --browser-app=
     
 ''C:\Programme\Internet Explorer\iexplore.exe'' (Note
     the ” ” because of the broken word Internet Explorer!).
- --prop:name=value: set property name to value
     
 Example: --prop:/engines/engine0/running=true for starting
     with running engines. Another example:
 --aircraft=c172
 --prop:/consumables/fuels/tank[0]/level-gal=10
 --prop:/consumables/fuels/tank[1]/level-gal=10
 filles the Cessna for a short flight.
- --config=path: Load additional properties from the given path.
     Example: runfgfs --config=./Aircraft/X15-set.xml
     
- --units-feed: Use feet for distances.
                                                                     
                                                                     
     
- --units-meters: Use meters for distances.
     - --disable-hud: Switches off the HUD (Head Up Display).
     
- --enable-hud: Turns the HUD on.
     
- --enable-anti-aliased-hud:  Turns  on  anti-aliaseded  HUD  lines
     for better quality, if hardware supports this.
     
- --disable-anti-aliased-hud: Turns off anti-aliaseded HUD lines.
     
- --enable-panel: Turns the instrument panel on (default).
     
- --disable-panel: Turns the instrument panel off.
     
- --disable-sound: Self explaining.
     
- --enable-sound: See above.
     - --aircraft=name                                    of                                    aircraft
     definition file Example: --aircraft=c310. For possible choices check
     the  directory  /FlightGear/Aircraft.  Do  not  include  the  extension
     ''-set.xml'' into the aircraft name but use the remaining beginning of
     the  respective  file  names  for  choosing  an  aircraft.  This  way  flight  model,
     panel etc. are all loaded in a consistent way.
     
- --fdm=abcd Select the core flight model. Options are jsb, larcsim,
                                                                     
                                                                     
     yasim, magic, balloon, external, ada,
     null. Default value is jsb (JSBSim). larcsim is the flight model which
     FlightGear inherited from the LaRCSim simulator. yasim is Any Ross’ Yet
     Another Flight Dynamics Simulator. Magic is a slew mode. Balloon is a hot
     air balloon. External refers to remote control of the simulator. Null selects no
     flight dynamics model at all. The UIUC flight model is not chosen this way
     but via the next option! For further information on flight models cf. Section
     1.4 and below.
     
- --aero=abcd Specifies the aircraft model to load. Default is a Cessna c172.
     Alternatives available depend on the flight model chosen.
     
- --model-hz=n Run the Flight Dynamics Model with this rate (iterations
     per second).
     
- --speed=n  Run  the  Flight  Dynamics  Model  this  much  faster  than  real
     time.
     
- --notrim Do NOT attempt to trim the model when initializing JSBSim.
     
- --on-ground: Start up at ground level (default).
     
- --in-air:  Start  up  in  the  air.  Naturally,  you  have  to  specify  an  initial
     altitude as below for this to make sense. This is a must for the X15.
     
- --wind=DIR@SPEED: Specify wind coming from the direction DIR (in
     degrees) at speed SPEED (knots).
     - --aircraft-dir=path:  Aircraft  directory  relative  to  the  root-path,
     defined via $FG_ROOT or --fg-root.
Remark: The difference in the handling of UIUC models has historic reasons. These
                                                                     
                                                                     
models use the LaRCsim FDM. As this FDM isn’t the default FDM any more you have
to specify it manually. Also the airplane description needs manual interaction as you
have to specify the directory by hand where the specific aircraft data resides. So you have
to use the following for flying the ’TwinOtter’:
fgfs --fdm=larcsim --aero=uiuc
--aircraft-dir=Aircraft-uiuc/TwinOtter
Fortunately work has been done to simplificate this. At least those airplanes can be
flown easily by using an appropriate ’--aircraft’-string. These are the following:
--aircraft=747-uiuc, --aircraft=beech99-uiuc,
--aircraft=c172-uiuc, --aircraft=c310-uiuc
   If time permits the remaining aircrafts will be adjusted soon. Please have a
look at $FG_ROOT/Aircraft-uiuc for the avaliable aircrafts provided
by the UIUC model collection. Also please read the notes in Section 1.4 on
UIUC.
   
     
     - --airport-id=ABCD: If you want to start directly at an airport, enter its
     international code, i.e. KJFK for JFK airport in New York etc. A long/short
     list of the IDs of the airports being implemented can be found in /Flight
     Gear/Airports. You only have to unpack one of the files with gunzip.
     Keep in mind, you need the terrain data for the relevant region, though!
     
- --offset-distance=nm:   Here   you   can   specify   the   distance   to
     threshold in nm.
     
- --offset-azimuth=deg: Here you can specify the heading to threshold
     in degrees.
     
- --lon=degrees: This is the startup longitude in degrees (west = -).
     
- --lat=degrees: This is the startup latitude in degrees (south = -).
     
- --altitude=feet:  This  is  useful  if  you  want  to  start  in  free  flight  in
     connection with --in-air. Altitude specified in feet unless you choose
     --units-meters.
     
- --heading=degrees: Sets the initial heading (yaw angle) in degrees.
     
- --roll=degrees: Sets the startup roll angle (roll angle) in degrees.
     
- --pitch=degrees: Sets the startup pitch angle (pitch angle) in degrees.
     
- --uBody=feet per second: Speed along the body X axis in feet per second,
     unless you choose --units-meters.
     
- --vBody=feet per second: Speed along the body Y axis in feet per second,
     unless you choose --units-meters.
     
- --wBody=feet per second: Speed along the body Z axis in feet per second,
     unless you choose --units-meters.
     
- --vc=knots:  Allows  specifying  the  initial  airspeed  in  knots  (only  in
     connection with --fdm=jsb).
     
- --mach=num: Allows specifying the initial airspeed as Mach number (only
     in connection with --fdm=jsb).
     - --bpp=depth: Specify the bits per pixel.
     
- --fog-disable: To cut down the rendering efforts, distant regions are
     vanishing in fog by default. If you disable fogging, you’ll see farther but your
     frame rates will drop.
                                                                     
                                                                     
     
- --fog-fastest: The scenery will not look very nice but frame rate will
     increase.
     
- --fog-nicest: This option will give you a fairly realistic view of flying
     on a hazy day.
     
- --enable-clouds: Enable cloud layer (default).
     
- --disable-clouds: Disable cloud layer.
     
- --clouds-asl=xxx: Specify altitude of cloud layer above sea level.
     
- --fov=xx.x: Sets the field of view in degrees. Default is 55.0.
     
- --disable-fullscreen: Disable full screen mode (default).
     
- --enable-fullscreen: Enable full screen mode.
     
- --shading-flat: This is the fastest mode but the terrain will look ugly!
     This option might help if your video processor is really slow.
     
- --shading-smooth:  This  is  the  recommended  (and  default)  setting  -
     things will look really nice.
     
- --disable-skyblend: No fogging or haze, sky will be displayed using
     just one color. Fast but ugly!
     
- --enable-skyblend:  Fogging/haze  is  enabled,  sky  and  terrain  look
     realistic. This is the default and recommended setting.
     
- --disable-textures: Terrain details will be disabled. Looks ugly, but
     might help if your video board is slow.
                                                                     
                                                                     
     
- --enable-textures: Default and recommended.
     
- --enable-wireframe:   If   you   want   to   know   how   the   world   of
     FlightGear looks like internally, try this!
     
- --disable-wireframe: No wireframe. Default.
     
- --geometry=WWWxHHH:  Defines  the  size  of  the  window  used,  i.e.
     WWWxHHH can be 640x480, 800x600, or 1024x768.
     
- --view-offset=xxx: Allows setting the default forward view direction
     as  an  offset  from  straight  ahead.  Possible  values  are  LEFT, RIGHT,
     CENTER, or a specific number of degrees. Useful for multi-window display.
     
- --visibility=meters:  You  can  specify  the  initial  visibility  in  meters
     here.
     
- --visibility-miles=miles:  You  can  specify  the  initial  visibility  in
     miles here.
     - --hud-tris: HUD displays the number of triangles rendered.
     
- --hud-culled: HUD displays percentage of triangles culled.
     - --time-offset=[+-]hh:mm:ss: Offset local time by this amount.
     
- --time-match-real: Synchronize real-world and FlightGear time.
                                                                     
                                                                     
     
- --time-match-local:  Synchronize  local  real-world  and  FlightGear
     time.
     
- --start-date-gmt=yyyy:mm:dd:hh:mm:ss: Specify a starting time and
     date. Uses your system time.
     
- --start-date-gmt=yyyy:mm:dd:hh:mm:ss: Specify a starting time and
     date. Time is Greenwich Mean Time.
     
- --start-date-lat=yyyy:mm:dd:hh:mm:ss: Specify a starting time and
     date. Uses local aircraft time.
     - --httpd=port Enable http server on the specified port.
     
- --enable-network-olk: Enables Oliver Delises’s Multipilot mode.
     
- --enable-network-olk:  Disables  Oliver  Delises’s  Multipilot  mode
     (default).
     
- --net-hud: HUD displays network info.
     
- --net-id=name: Specify your own callsign
     - --wp=ID[@alt]: Allows specifying a waypoint for the GC autopilot; it is
     possible to specify multiple waypoints (i.e. a route) via multiple instances of
     this command.
                                                                     
                                                                     
     
- --flight-plan=[file]:  This  is  more  comfortable  if  you  have  several
     waypoints. You can specify a file to read them from.
These options are rather geared to the advanced user who knows what he is
doing.
   
     
     - --gamin=params: Open connection using the Garmin GPS protocol.
     
- --joyclient=params: Open connection to an Agwagon joystick.
     
- --native-ctrls=params:   Open   connection   using   the   FG   native
     Controls protocol.
     
- --native-fdm=params:  Open  connection  using  the  FG  Native  FDM
     protocol.
     
- --native=params: Open connection using the FG Native protocol.
     
- --nmea=params: Open connection using the NMEA protocol.
     
- --opengc=params: Open connection using the OpenGC protocol.
     
- --props=params:   Open   connection   using   the   interactive   property
     manager.
     
- --pve=params: Open connection using the PVE protocol.
     
- --ray=params: Open connection using the RayWoodworth motion chair
     protocol.
     
- --rul=params: Open connection using the RUL protocol.
                                                                     
                                                                     
     
- --atc610x: Enable atc610x interface.
     - --trace-read=params:   Trace   the   reads   for   a   property;   multiple
     instances are allowed.
     
- --trace-write=params:  Trace  the  writes  for  a  property;  multiple
     instances are allowed.
Could you imagine a pilot in his or her Cessna controlling
the machine with a keyboard alone? For getting the proper feeling of flight you will
need a joystick/yoke plus rudder pedals, right? However, the combination of
numerous types of joysticks, flightsticks, yokes, pedals etc. on the market with the
several target operating systems, makes joystick support a nontrivial task in
FlightGear.All of FlightGear’s joystick (as well as keyboard) properties are written in plain ASCII
files, thus anyone can adapt them, if necessary. Fortunately, there is a tool available
now, which takes most of the burden form the average user who, maybe, is
not that experienced with XML, the language which these files arwe written
in.
   For configuring your joystick, open a command shell (command prompt(DOS shell
under windows, to be found unter Start—All programs—Accessories). Change to the
directory /FlightGear/bin via e.g. (modify to your path)
cd c:\FlightGear\bin
   and invoke the tool fgjs via
fgjs
   on a UNIX/Linux machine, or via
fgjs.exe
   on a Windows machine. The program will tell you which joysticks, if any, where
detected. Now follow the commands given on screen, i.e. move the axis and press the
buttons as required. Be careful, a minor touch already ”counts” as a movement.
Check the reports on screen. If you feel something went wrong, just re-start the
program
   After you are done with all the axis/switches, the directory above will hold a file
called fgfsrc.js. If the FlightGear base directory FlighGear does not already
                                                                     
                                                                     
contain an options file .fgfsrc (under UNIX)/system.fgfsrc (under Windows)
mentioned above, just copy
fgfsrc.js into .fgfsrc (UNIX)/system.fgfsrc (Windows)
and place it into the directory FlightGear base directory FlighGear. In case you
already wrote an options file, just open it as well as fgfsrc.js with an editor and copy
the entries from fgfsrc.js into .fgfsrc/system.fgfsrc. One hint: The output
of fgjs is UNIX formatted. As a result, Windows Editor may not display it the proper
way. I suggest getting an editor being able to handle UNIX files as well. My favorite
freeware file editor for that purpose, although somewhat dated, is PFE still, to be
obtained from
   http://www.lancs.ac.uk/people/cpaap/pfe/.
   The the axis/button assignment of fgjs should, at least, get the axis assignments
right, its output may need some tweaking. There may be axis moving the opposite
way the should, the dead zones may be too small etc. For instance, I had to
change
   --prop:/input/joysticks/js[1]/axis[1]/binding/factor=-1.0
   into
   --prop:/input/joysticks/js[1]/axis[1]/binding/factor=1.0
   (USB CH Flightsim Yoke under Windows XP). Thus, here is a short introduction into
the assignments of joystick properties.
   Basically, all axes settings are specified via lines having the following structure:
--prop:/input/joysticks/js[n]/axis[m]
/binding/command=property-scale
--prop:/input/joysticks/js[n]/axis[m]
/binding/property=/controls/steering option
--prop:/input/joysticks/js[n]/axis[m]
/binding/dead-band=db --prop:/input/joysticks/js[n]/axis[m]
/binding/offset=os --prop:/input/joysticks/js[n]/axis[m]
/binding/factor=fa
where
                                                                     
                                                                     
   
| n | = | number of device (usually starting with 0) | 
| m | = | number of axis (usually starting with 0) | 
| steering option | = | elevator, aileron, rudder, throttle, mixture, pitch | 
| dead-band | = | range, within which signals are discarded; | 
|  |  | useful to avoid jittering for minor yoke movements | 
| offset | = | specifies, if device not centered in its neutral position | 
| factor | = | controls sensitivity of that axis; defaults to +1, | 
|  |  | with a value of -1 reversing the behavior | 
You should be able to at least get your joystick working along these lines. Concerning all
the finer points, for instance, getting the joystick buttons working, John Check has
written a very useful README being included in the base package to be found
under FlightGear/Docs/Readme/Joystick.html. In case of any
trouble with your input device, it is highly recommended to have a look into this
document.