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 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 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 /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
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 fgfsrc.js. If the FlightGear base directory FlightGear 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 FlightGear. 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 (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 PFE, 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 axes moving the opposite
way they 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 (one line)
--prop:/input/joysticks/js[n]/axis[m]/binding
/property=/controls/steering option (one line)
--prop:/input/joysticks/js[n]/axis[m]/binding
/dead-band=db (one line)
--prop:/input/joysticks/js[n]/axis[m]/binding
/offset=os (one line)
--prop:/input/joysticks/js[n]/axis[m]/binding
/factor=fa (one line)
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.
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. 1.4),
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
http://home.t-online.de/home/Wolfram.Kuss/.
Moreover, this list is complete insofar as it covers all aircraft available via the
--aircraft= option.
Tab. 1: Presently available aircraft in FlightGear.
Aircraft type | Start option | FDM | Remarks |
|
|
|
|
Boeing 747 | --aircraft=747-yasim | YASim | |
BA A4 Hawk | --aircraft=a4-yasim | YASim | |
North American X-15 | --aircraft=X15 | JSBSim | experimental supersonic plane |
Airwave Xtreme 150 | --aircraft=airwaveXtreme150- | |
| v1-nl-uiuc | UIUC | hang glider! |
Beech 99 | --aircraft=beech99-v1-uiuc | UIUC | no exterior model |
Cessna 172 | --aircraft=c172-3d | JSBSim | sports a 3D cockpit |
Cessna 172 | --aircraft=c172-3d-yasim | YASim | sports a 3D cockpit |
Cessna 172 | --aircraft=c172-ifr | JSBSim | with IFR panel |
Cessna 172 | --aircraft=c172-larcsim | LaRCsim | |
Cessna 172 | --aircraft=c172 | JSBSim | default |
Cessna 172 | --aircraft=c172-yasim | YASim | |
Cessna 172p | --aircraft=c172p-3d | JSBSim | sports a 3D cockpit |
Cessna 172p | --aircraft=c172p | JSBSim | |
Cessna 172 | --aircraft=c172x | JSBSim | flight dynamics testbed |
Cessna 182 | --aircraft=c182 | JSBSim | |
Cessna 310 | --aircraft=c310 | JSBSim | |
Cessna 310 | --aircraft=c310-yasim | YASim | twin-prop machine |
Cessna 310U3A | --aircraft=c310u3a-3d | JSBSim | twin-prop machine, 3D cockpit |
Cessna 310U3A | --aircraft=c310u3a | JSBSim | twin-prop machine |
Douglas DC-3 | --aircraft=dc3-yasim | YASim | |
BA Harrier | --aircraft=harrier-yasim | YASim | no exterior model |
Piper Cub J3 Trainer | --aircraft=j3cub-yasim | YASim | |
Siai Marchetti S.211 | --aircraft=marchetti-v1-uiuc | UIUC | no exterior model |
Space Shuttle | --aircraft=shuttle | JSBSim | no exterior model |
UFO | --aircraft=ufo | JSBSim | ’White Project’ (UNESCO) |
1903 Wright Flyer | --aircraft=wrightFlyer1903- | | |
| v1-nl-uiuc | UIUC | historical model |
X-24B | --aircraft=x24b | JSBSim | USAF/NACA reentry testbed |
Cessna 172 | --aircraft=c172-610x | JSBSim | full screen, hi-res panel (IFR) |
UFO | --aircraft=ufo | Magic Carpet | UFO |
|