For launching \FlightGear{} from Windows explorer, change to the directory \texttt{/FlightGear} and double-click the file \texttt{runfgfs.bat}. You can also pass command line options from Sec. \ref{takeoff} to the batch file (if running it form a Command shell). However, you have to enclose them in double quotes in this case as follows:
\item{\texttt{-$$-help}}: Shows the most relevant command line options only.
\item{\texttt{-$$-help}\texttt{-verbose}}: Shows all command line options.
\item{\texttt{-$$-fg-root={\it path}}}: Tells \FlightGear{} where to look for its root data
files if you didn't compile it with the \Index{default settings}.
\item{\texttt{-$$-fg-scenery={\it path}}}: Allows specification of a path to the base scenery path \index{scenery directory!path}, in case scenery is not at the default position under\\
\texttt{\$FG\underline{~}ROOT/Scenery}; this might be especially useful in case you
\item{\texttt{-$$-enable-game-mode}}: Enables full screen display.
\item{\texttt{-$$-disable-splash-screen}}: Turns off the rotating 3DFX logo
when the accelerator board gets initialized (3DFX only).
\item{\texttt{-$$-enable-splash-screen}}: If you like advertising, set this!
\item{\texttt{-$$-disable-intro-music}}: No audio sample is being played when
\FlightGear{} starts up. Suggested in case of trouble with playing the intro.
\item{\texttt{-$$-enable-intro-music}}: If your machine is powerful enough, enjoy
this setting.
\item{\texttt{-$$-disable-mouse-pointer}}: Disables extra \Index{mouse pointer}.
\item{\texttt{-$$-enable-mouse-pointer}}: Enables extra \Index{mouse pointer}. Useful in
full screen mode for old Voodoo based cards.
\item{\texttt{-$$-enable-random-objects}}: Include random scenery objects (buildings/trees). This is the default.
\item{\texttt{-$$-disable-random-objects}}: Exclude random scenery objects (buildings/trees).
\item{\texttt{-$$-disable-freeze}}: This will put you into \FlightGear{} with the
engine running, ready for Take-Off.
\item{\texttt{-$$-enable-freeze}}: Starts \FlightGear{} in \Index{frozen state}.
\item{\texttt{-$$-disable-fuel-freeze}}: Fuel is consumed normally.
\item{\texttt{-$$-enable-fuel-freeze}}: Fuel tank quantity is forced to remain constant.
\item{\texttt{-$$-disable-clock-freeze}}: Time of day advances normally.
\item{\texttt{-$$-enable-clock-freeze}}: Do not advance time of day.
\item{\texttt{-$$-control-mode}}: Specify your \Index{control device} (\Index{joystick},
keyboard, mouse) Defaults to \Index{joystick} (\Index{yoke}).
\item{\texttt{-$$-disable-auto-coordination}}: Switches \Index{auto coordination} between
aileron/rudder off (default).
\item{\texttt{-$$-enable-auto-coordination}}: Switches auto coordination between
aileron/rudder on (recommended without pedals).
\item{\texttt{-$$-browser-app=/path/to/app}}: specify location of your web browser. Example:
\texttt{-$$-browser-app=}\\\texttt{''C:$\backslash$Programme$\backslash$Internet~Explorer$\backslash$iexplore.exe''} (Note the '' '' because of the broken word Internet Explorer!).
\item{\texttt{-$$-prop:name=value:}} set property \texttt{name} to \texttt{value}\\Example:
\texttt{-$$-prop:/engines/engine0/running=true} for starting with running engines. Another example:\\
\item{\texttt{-$$-aircraft={\it name of aircraft definition file}}} Example: \texttt{-$$-aircraft=c310}. For possible choices check the directory \texttt{/FlightGear/Aircraft}. Do not include the extension \texttt{''-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. For a full list, see Sec. \ref{hangar} below.
\item{\texttt{-$$-show-aircraft}}: Print a list of the currently available aircraft types.
\item{\texttt{-$$-fdm={\it abcd}}} Select the core \Index{flight model}.
Options are \texttt{jsb, larcsim, yasim, magic, balloon, external, ada, null}. Default value is
\texttt{jsb} (\JSBSim)\index{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 (which drives the UFO aircraft). Balloon is a hot air balloon. External refers to remote control of the simulator. Null selects no flight dynamics model at all. The \Index{UIUC flight model} is not chosen this way but via the next option! For further information on flight models cf. Section \ref{flight models} and below.
\item{\texttt{-$$-aero={\it abcd}}} Specifies the \Index{aircraft model} to load. Default is a Cessna c172. Alternatives available depend on the flight model chosen.
\item{\texttt{-$$-model-hz={\it n}}} Run the Flight Dynamics Model with this rate
(iterations per second).
\item{\texttt{-$$-speed={\it n}}} Run the Flight Dynamics Model this much faster than real
time.
\item{\texttt{-$$-notrim}} Do NOT attempt to trim the model when initializing JSBSim.
\item{\texttt{-$$-on-ground}}: Start up at ground level (default).
\item{\texttt{-$$-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.
\item{\texttt{-$$-wind={\it DIR@SPEED}}}: Specify wind coming from the direction DIR (in
degrees) at speed SPEED (knots). Values may be specified as a range by using a clon separator; e.g. 180:220@10:15
\item{\texttt{-$$-random-wind}}: Adds random wind to make flying more incentive
Does your computer see your joystick? One way to answer this question under Linux is to reboot your system and immediately enter on the command line
\medskip
\texttt{dmesg | grep Joystick}
\medskip
\noindent
which pipes the boot message to grep which then prints every line in the
boot message that contains the string ''Joystick''. When you do this with a
Saitek joystick attached, you will see a line similar to this one:
\medskip
\begin{ttfamily}
\noindent
input0: USB HID v1.00 Joystick [SAITEK CYBORG 3D USB] on usb2:3.0
\end{ttfamily}
\medskip
\noindent
This line tells us that a joystick has identified itself as SAITEK CYBORG 3D USB to the operating system. It does not tell us that the joystick driver sees your joystick. If you are working under Windows, the method above does not work, but you can still go on with the next paragraph.
\FlightGear{} ships with a utility called js\underline{~}demo. It will report the number of joysticks attached to a system, their respective ''names'', and their capabilities. Under Linux, you can run js\underline{~}demo from the folder \texttt{/FlightGear/bin} as follows:
\medskip
\noindent
\texttt{\$ cd /usr/local/FlightGear/bin}\\
\texttt{\$ ./js\underline{~}demo}
\medskip
\noindent
Under Windows, open a command shell (Start$\left|\right.$All Programs$\left|\right.$Accessories), go to the \FlightGear{} binary folder and start the program as follows (given \FlightGear{} is installed under \texttt{c:$\backslash$Flightgear})
First note that js\underline{~}demo reports which number is assigned to each joystick recognized by the driver. Also, note that the ''name'' each joystick reports is also included between quotes. We will need the names for each bindings file when we begin writing the binding xml files for each joystick.
Axis and button numbers can be identified using js\underline{~}demo as follows. By observing the output of js\underline{~}demo while working your joystick axes and buttons you can determine what axis and button numbers are assigned to each joystick axis and button. It should be noted that numbering generally starts with zero.
The buttons are handled internally as a binary number in which bit 0 (the least significant bit) represents button 0, bit 1 represents button 1, etc., but this number is displayed on the screen in hexadecimal notation, so:
\medskip
\noindent
0001 $\Rightarrow$ button 0 pressed\\
0002 $\Rightarrow$ button 1 pressed\\
0004 $\Rightarrow$ button 2 pressed\\
0008 $\Rightarrow$ button 3 pressed\\
0010 $\Rightarrow$ button 4 pressed\\
0020 $\Rightarrow$ button 5 pressed\\
0040 $\Rightarrow$ button 6 pressed\\
... etc. up to ...\\
8000 $\Rightarrow$ button 15 pressed\\
... and ...\\
0014 $\Rightarrow$ buttons 2 and 4 pressed simultaneously\\
... etc.
\medskip
For Linux users, there is another option for identifying the ''name'' and the numbers assigned to each axis and button. Most Linux distributions include a very handy program, ''jstest''. With a CH Product Yoke plugged into the system, the following output lines are displayed by jstest:
\medskip
\begin{ttfamily}
\tiny
\noindent
jstest /dev/js3\\
Joystick (CH PRODUCTS CH FLIGHT SIM YOKE USB) has 7 axes and 12 buttons. Driver version is 2.1.0\\
Note the ''name'' between parentheses. This is the name the system associates with your joystick.
When you move any control, the numbers change after the axis number corresponding to that moving control and when you depress any button, the ''off'' after the button number corresponding to the button pressed changes to ''on''. In this way, you can quickly write down the axes numbers and button numbers for each function without messing with binary.
At this point, you have confirmed that the operating system and the joystick driver both recognize your joystick(s). You also know of several ways to identify the joystick ''name'' your joystick reports to the driver and operating system. You will need a written list of what control functions you wish to have assigned to which axis and button and the corresponding numbers.
Make the following table from what you learned from js\underline{~}demo or jstest above (pencil and paper is fine). Here we assume there are 5 axes including 2 axes associated with the hat.
\medskip
\begin{tabular}{c|c}
Axis & Button\\\hline
elevator = 0 & view cycle = 0\\
rudder = 1 & all brakes = 1\\
aileron = 2 & up trim = 2\\
throttle = 3 & down trim = 3\\
leftright hat = 4& extend flaps = 4\\
foreaft hat = 5 & retract flaps = 5\\
& decrease RPM = 6\\
& increase RPM = 7
\end{tabular}
\medskip
We will assume that our hypothetical joystick supplies the ''name'' QUICK STICK 3D USB to the system and driver. With all the examples included with \FlightGear{}, the easiest way to get a so far unsupported joystick to be auto detected, is to edit an existing binding xml file. Look at the xml files in the sub-folders of \texttt{/FlightGear/Input/Joysticks/}. After evaluating at several of the xml binding files supplied with \FlightGear{}, we decide to edit the file
This file has all the axes functions above assigned to axes and all the button functions above assigned to buttons. This makes our editing almost trivial.
Before we begin to edit, we need to choose a name for our bindings xml file, create the folder for the QS joysticks, and copy the original xml file into this directory with this name.
Here, we obviously have supposed a Linux/UNIX system with \FlightGear{} being installed under \texttt{/usr/local/FlightGear}. For a similar procedure under Windows with \FlightGear{} being installed under \texttt{c:\FlightGear}, open a command shell and type
\medskip
\begin{ttfamily}
\noindent
c:\\
cd /FlightGear/Input/Joysticks\\
mkdir QS\\
cd QS\\
copy /FlightGear/Input/Joysticks/Saitek/\\
Cyborg-Gold-3d-USB.xml QuickStick.xml
\end{ttfamily}
\medskip
\noindent
Next, open \texttt{QuickStick.xml} with your favorite editor. Before we forget to change the joystick name, search for the line containing $<$name$>$. You should find the line
\medskip
\texttt{<name>SAITEK CYBORG 3D USB$<$/name$>$}
\medskip
\noindent
and change it to
\medskip
\texttt{$<$name$>$QUICK STICK 3D USB$<$/name$>$}.
\medskip
\noindent
This line illustrates a key feature of xml statements. They begin with a $<$tag$>$ and end with a $<$/tag$>$.
You can now compare your table to the comment table at the top of your file copy. Note that the comments tell us that the Saitek elevator was assigned to axis 1. Search for the string
\medskip
\texttt{$<$axis n="1"$>$}
\medskip
\noindent
and change this to
\medskip
\texttt{$<$axis n="0"$>$.}
\medskip
Next, note that the Saitek rudder was assigned to axis 2. Search for the string
\medskip
\texttt{$<$axis n="2"$>$}
\texttt{$<$axis n="1"$>$.}
\medskip
\noindent
Continue comparing your table with the comment table for the Saitek and changing the axis numbers and button numbers accordingly. Since QUICKSTICK USB and the Saitek have the same number of axes but different number of buttons, you must delete the buttons left over. Just remember to double check that you have a closing tag for each opening tag or you will get an error using the file.
Finally, be good to yourself (and others when you submit your new binding file to a \FlightGear{} developers or users archive!), take the time to change the comment table in the edited file to match your changed axis and button assignments. The new comments should match the table you made from the js\underline{~}demo output. Save your edits.
Before \FlightGear{} can use your new xml file, you need to edit the file
\noindent
\texttt{/FlightGear/joysticks.xml},
\noindent
adding a line that will include your new file if the ''name'' you entered between the name tags matches the name supplied to the driver by your joystick. Add the following line to \texttt{joysticks.xml}.
Basically, the procedures described above should work for Windows as well. If your joystick/yoke/pedals work out of the box or if you get it to work using the methods above, fine. Unfortunately there may be a few problems.
The first one concerns users of non-US Windows versions. As stated above, you can get the name of the joystick from the program js\underline{~}demo. If you have a non-US version of Windows and the joystick .xml files named above do not contain that special name, just add it on top of the appropriate file in the style of
No new entry in the base \texttt{joysticks.xml} file is required.
Unfortunately, there is one more loophole with Windows joystick support. In
case you have two USB devices attached (for instance a yoke plus pedals),
there may be cases, where the same driver name is reported twice. In this
case, you can get at least the yoke to work by assigning it number 0 (out of
0 and 1). For this purpose, rotate the yoke (aileron control) and observe
the output of js\underline{~}demo. If figures in the first group of colons
(for device 0) change, assignment is correct. If figures in the second group
of colons (for device 1) change, you have to make the yoke the preferred
device first. For doing so, enter the
Windows ''Control panel'', open ''Game controllers'' and select the
''Advanced'' button. Here you can select the yoke as the ''Preferred''
device. Afterward you can check that assignment by running
js\underline{~}demo again. The yoke should now control the first group of
figures.
Unfortunately, we did not find a way to get the pedals to work, too, that way. Thus, in cases like this one (and others) you may want to try an alternative method of assigning joystick controls.
Fortunately, there is a tool available now, which takes most of the burden from the average user who, maybe, is not that experienced with XML, the language which these files are written in.
For configuring your joystick using this approach, open a command shell (command prompt under windows, to be found under Start|All programs|Accessories). Change to the directory \texttt{/FlightGear/bin} via e.g. (modify to your path)
on a Windows machine. The program will tell you which joysticks, if any, were 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 and switches, the directory above will hold a file called \texttt{fgfsrc.js}. If the \FlightGear{} base directory \texttt{FlightGear} does not already contain an options file \texttt{.fgfsrc} (under UNIX)/\texttt{system.fgfsrc} (under Windows) mentioned above, just copy
\medskip
\noindent
\texttt{fgfsrc.js} into \texttt{.fgfsrc} (UNIX)/\texttt{system.fgfsrc} (Windows)
\medskip
\noindent
and place it into the directory \FlightGear{} base directory \texttt{FlightGear}. In case you already wrote an options file, just open it as well as \texttt{fgfsrc.js} with an editor and copy the entries from \texttt{fgfsrc.js} into \texttt{.fgfsrc}/\texttt{system.fgfsrc}. One hint: The output of \texttt{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 (and oldie but goldie in this respect is PFE, just make a web search for it). My favorite freeware file editor for that purpose, although somewhat dated, is still \Index{PFE}, to be obtained from
\web{http://www.lancs.ac.uk/people/cpaap/pfe/}.
The the axis/button assignment of \texttt{fgjs} should, at least, get the axis assignments right, its output may need some tweaking. There may be axes moving the opposite way they should, the dead zones may be too small etc. For instance, I had to change
\textit{dead-band}&=& range, within which signals are discarded;\\
&& useful to avoid jittering for minor yoke movements\\
\textit{offset}&=& specifies, if device not centered in its neutral position\\
\textit{factor}&=& controls sensitivity of that axis; defaults to +1,\\
&&with a value of -1 reversing the behavior
\end{tabular}
\medskip
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\index{Check, John} has written a very useful README being included in the base package to be found under \texttt{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.
The following is a Table 1 of all the aircraft presently available for use with \FlightGear{}. In the first column, you will find the name of the aircraft, the second one tells the start option, the third one names the FDM (flight dynamics management model, see Sec. \ref{flight models}), and the last column includes some remarks. Here, ''no exterior model'' means, that there is no aircraft specific external model provided with the base package. As a result, you will see the default blue-yellow glider, when you change to the external view. However, you can download external views for these models from Wolfram Kuss' site at
\web{http://home.t-online.de/home/Wolfram.Kuss/}.
Moreover, this list is complete insofar as it covers all aircraft available via the \texttt{-$$-aircraft=} option.
\eject
\noindent
Tab.\,1: \textit{Presently available aircraft in \FlightGear{}}.
\medskip
\noindent
{\scriptsize
\input{tab1.tex}
}
%% Revision 0.02 1998/09/29 bernhard
%% revision 0.10 1998/10/01 michael
%% final proofreading for release
%% revision 0.11 1998/11/01 michael
%% Added pic from Arizona takeoff
%% revision 0.20 1999/06/04 michael
%% added new options
%% revision 0.3 2000/04/20 michael
%% added numerous new options (number rapidly growing...)
%% revision 0.4 2001/05/12 michael
%% description of .fgfsrc/system.fgfsrc
%% again many new options
%% joystick section added based on John Check's joystick howto
%% updated arizona pic
%% revision 0.4 2001/07/01 martin
%% comments on debug options under Unix
%% revision 0.5 2002/01/01 michael/martin
%% added more options, notably the --aircraft option
%% tweaks in the introductory section
%% revised joystick section based on fgjs
%% New KFSO picture
%% Paragraphs on UIUC + tweaks by Martin
%% Added Section on IIO options
%% revision 0.6 2002/09/05 michael
%% Corrected win shell call in 4.2
%% added/corrected/deleted several comman line options
%% Added large section on built-in joystick support by Dave Perry
%% Added section/table with complete list of aircraft