Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

# Difference between revisions of "$FG AIRCRAFT" Jump to: navigation, search $FG_AIRCRAFT is referred to as the aircraft directory or directories of FlightGear. It is available since FlightGear 2.4.

It can be set on the first page of FGRun (before the default aircraft selection page). $FG_ROOT/Aircraft should never be added to $FG_AIRCRAFT, otherwise aircraft will be listed twice in FGRun.

See this forum post for a description of the algorithm used by FlightGear (as of the January 2016) to choose between the various directories listed in $FG_AIRCRAFT and$FG_ROOT/Aircraft, as well as in the arguments of --fg-aircraft options (for the fgfs command line).
Typically, directories listed in FG_AIRCRAFT or in the value for --fg-aircraft options are called Aircraft. Prime examples are the Aircraft top-level directories of $FG_ROOT and FGAddon. They will themselves contain subdirectories named for instance c172p, ufo, 707, etc. The differences between FG_AIRCRAFT and --fg-aircraft are: • FG_AIRCRAFT is an environment variable, and as such cannot be specified several times like a command-line option (the variable may be set or unset in FlightGear's environment, that's all). By the way, customarily, $FG_AIRCRAFT refers to the value of the FG_AIRCRAFT environment variable (this is the POSIX shell syntax used to expand an environment variable).
In contrast, --aircraft-dir, if specified, takes a single path as its argument. This should be a path to a directory (such as c172p or 707) directly containing one or more aircraft -set.xml files. Thus, --aircraft-dir (when specified) should point to directories located within the directories listed via FG_AIRCRAFT, --fg-aircraft, or $FG_ROOT/Aircraft. For example, one can run: fgfs --fg-aircraft=/path/to/Aircraft --fg-aircraft=/other/path/to/Aircraft --aircraft=707  where /path/to/Aircraft could contain subdirectories named c172p and 707, and for instance /other/path/to/Aircraft could contain subdirectories named CRJ700-family and ZLT-NT. On the other hand, using --aircraft-dir would be more like this: fgfs --fg-aircraft=/path/to/fgaddon/Aircraft --aircraft-dir=/path/to/fgaddon/Aircraft/ec130 --aircraft=ec130b4 ...  (It seems to work without the --fg-aircraft=/path/to/fgaddon/Aircraft, but I prefer to pass it in order to prevent potential permission issues). In this case, FlightGear would expect /path/to/fgaddon/Aircraft/ec130 to be a directory containing an ec130b4-set.xml file.  Note fgfs --fg-aircraft=/path/to/Aircraft --fg-aircraft=/other/path/to/Aircraft  is equivalent to the following command on Linux and on OS X: fgfs --fg-aircraft=/path/to/Aircraft:/other/path/to/Aircraft  On Windows, one would rather use something like this: fgfs --fg-aircraft=C:\path\to\Aircraft;C:\other\path\to\Aircraft  The differences are that: Windows uses a semicolon instead of a colon to separate the paths; the paths use backslashes instead of forward slashes, and; a drive letter is given. When specified, --aircraft-dir bypasses the order defined by --fg-aircraft, FG_AIRCRAFT and$FG_ROOT/Aircraft. This allows one to use an aircraft that would otherwise be shadowed by an aircraft with the same name placed earlier in the path list built from these three places (note that said order is only reliable when the <path-cache> in $FG_HOME/autosave_X_Y.xml is empty; “cached” entries have a higher priority than entries searched in directories from --fg-aircraft, $FG_AIRCRAFT and \$FG_ROOT/Aircraft, but --aircraft-dir always “wins” if specified, even in the presence of cached entries).