Command line options

From FlightGear wiki
(Redirected from Command Line Options)
Jump to navigation Jump to search

Command line options are a common way to tell applications what to do/how to act on startup. With FlightGear they are used for many things, from simple ones like selecting an aircraft up to complex stuff like network traffic and weather parameters.

The easiest way to handle those options for FlightGear is using a tool with a graphical user interface like the FlightGear Qt launcher. This way one doesn't have to bother about them at all.

However, there are users who don't want or are not able to run a GUI and therefore are interested in this. Those who need them or just want to learn more about FlightGear, but have no idea what we are talking about, may read the wiki page on the general usage of the command line.

A good place to store the personal options is a file called fgfsrc. This file is read by FlightGear on each startup.

The following lists show the options for FlightGear including a short description and sorted by categories. Please have in mind that keeping those lists up to date on the wiki is not an easy task. Also there are different versions of FlightGear out there which don't share exactly the same options. Therefore you better also check your versions ones with fgfs --help --verbose. If this command fails, you may add the option --fg-root=[path] as well, see below.

It is sad but true, not even this command is, at least in Git, up to date all the time. At the time of writing at least one option which is supported is not shown with fgfs --help --verbose. So if you have serious issues with an option, the source code is, as always, also the best source for info. In the file src/Main/options.cxx all the options are listed with their hard coded default setting and type.

The file $FG_ROOT/options.xml is used to generate the output for fgfs --help [--verbose]. That's the reason why --fg-root=[path] has to be added to this, if it is not set as environmental variable or as option in fgfsrc.

Note that some command line options are not listed. The complete list can be found by examining the sources


Usage: fgfs [OPTION [OPTION ...]]

General Options

--help, -h                   Show the most relevant command line options.
--verbose, -v                Show all command line options when combined with --help or -h.
--version                    Display the current FlightGear version.
--fg-root=path               Specify the root data path.
--fg-scenery=path[:path...]  Specify the base scenery path;
                              Defaults to $FG_ROOT/Scenery.
--fg-aircraft=path           Specify additional aircraft directory path(s)
                              (alternatively, you can use --aircraft-dir to
                              target a specific aircraft in a given
                              directory).
--addon=path                 Specify a path to addon;
                              multiple instances can be used.
--download-dir=path          Store aircraft and scenery downloaded via the simulator in path.
                             The TerraSync directory may be specifically set 
                              with the --terrasync-dir option.
--disable-terrasync          Disable automatic scenery downloads/updates
--enable-terrasync           Enable automatic scenery downloads/updates
--terrasync-dir=path         Specify the TerraSync scenery path;
                              Defaults to $FG_HOME/TerraSync.
--language=code              Select the language for this session.
--launcher                   Enable Qt launcher.
--load-tape={name|url}       Load recording of earlier flightgear session.
                              For <name>, if <name> ends with .fgdata it is
                              treated as the local path of the recording
                              file; otherwise we form the local path by
                              prepending <name> with the tape directory and
                              appending ".fgtape". For <url> (starting with
                              http:// or https://) we download the remote
                              recording (which must be a Continuous
                              recording) in the background to a url-dependent
                              filename while replaying it; if the
                              url-dependent filename already exists it is
                              assumed to be a truncated download and we only
                              download any remaining data.
--disable-splash-screen      Disable splash screen.
--enable-splash-screen       Enable splash screen.
--disable-mouse-pointer      Disable extra mouse pointer.
--enable-mouse-pointer       Enable extra mouse pointer
                              (i.e. for full screen Voodoo based cards).
--browser-app=path           Specify path to your web browser.
--prop:[type:]name=value     Set property <name> to <value>. <type> can be
                              one of string, double, float, long, int, or
                              bool.
--config=path                Load additional properties from path.
--no-default-config          Do not load any default configuration files 
                              (like .fgfsrc) unless explicitly specified 
                              with --config.
--units-feet                 Use feet for distances.
--units-meters               Use meters for distances.
--allow-nasal-read=path      Allow Nasal scripts to read files from directories
                              listed as path (separate multiple paths with a 
                              semicolon (Windows) or a colon (UNIX)). By default, 
                              for security reasons, Nasal scripts can only read 
                              data from certain directories, such as $FG_ROOT, 
                              $FG_HOME, etc.
--read-only                  Make $FG_HOME read-only.
--ignore-autosave            Ignore the autosave file, i.e. the settings saved 
                              in this file will not be loaded during startup, 
                              nor will the settings be saved to this file when 
                              closing the simulator.
--disable-save-on-exit       Don't save preferences upon program exit.
--enable-save-on-exit        Allow saving preferences at program exit.
--restore-defaults           Reset all user settings to their defaults
                               (rendering options etc.)
--disable-gui                Enable headless mode
--jsbsim-output-directive-file=file
                             Log JSBSim properties in a CSV file. An output
                              directives file contains an <output
                              type="CSV"></output> element, within which
                              should be specified the parameters or parameter
                              groups that should be logged.

Features

--composite-viewer={true|false}
                             Enable CompositeViewer (extra view windows).
--disable-panel              Disable instrument panel.
--enable-panel               Enable instrument panel.
--disable-freeze             Start in a running state.
--enable-freeze              Start in a frozen state.
--disable-fuel-freeze        Fuel is consumed normally.
--enable-fuel-freeze         Fuel tank quantity forced to remain constant.
--disable-clock-freeze       Clock advances normally.
--enable-clock-freeze        Do not advance clock.
--ai-scenario=scenario       Add and enable a new scenario. Multiple options
                             are allowed. Scenarios are in /$FG_ROOT/AI/.
--disable-ai-models          Disable the AI subsystem.
                              (This also disables showing the models of other
                              multiplayer aircraft)
--enable-ai-models           Enable the AI subsystem.
--disable-ai-traffic         Disable the autogenerated traffic subsystem.
--enable-ai-traffic          Enable the autogenerated traffic subsystem.
--disable-vr                 Disable the Virtual Reality.
--enable-vr                  Enable the Virtual Reality.
--restart-launcher           Open Launcher automatically when exiting the FlightGear.

Aircraft

--aircraft=name
--vehicle=name               Select an aircraft profile as defined by a top
                              level -set.xml.
--aircraft-dir=path          Specify the exact directory to use for the
                              aircraft (normally not required, but may be
                              useful). Interpreted relatively to the
                              current directory. Causes the <path-cache>
                              from autosave_X_Y.xml, as well as
                              --fg-aircraft options and the FG_AIRCRAFT
                              environment variable to be bypassed.
--show-aircraft              Print a list of the currently available
                              aircraft types.
--min-status={alpha|beta|early-production|production}
                             Allows you to define a minimum status level
                              (=development status) for all listed aircraft.
--enable-auto-coordination   Enable auto coordination - rudder and
                              ailerons will be controlled together.
--disable-auto-coordination  Disable auto coordination (default).
--livery=name                Select aircraft livery
--state=value                Specify the initial state of the aircraft 
                              to the given value.

Flight Model

--fdm=name                   Select the core flight dynamics model
                              Can be one of ada, acms, aisim, balloon, jsb, 
                              larcsim, magic, network, pipe, ufo, yasim, 
                              external or null.
--aero=name                  Select aircraft aerodynamics model to load.
--model-hz=n                 Run the FDM this rate (iterations per second).
--speed=n                    Run the FDM 'n' times faster than real time.
--notrim                     Do NOT attempt to trim the model
                              (only with fdm=jsbsim).
--on-ground                  Start at ground level (default).
--in-air                     Start in air (implied when using --altitude).

Initial Position and Orientation

--airport=ID                 Specify airport (e.g. KOAK).
--runway=rwy_no              Specify starting runway (must also specify an
                              airport).
--parking-id=NAME
--parkpos=NAME               Specify a gate at the airport (e.g. 747d11).
--carrier={name|ID}          Specify starting position on an AI carrier.
--carrier-position={abeam|FLOLS|name}
                             Specify a starting position relative to the
                               carrier where you can use the predefined abeam
                               (start on downwind abeam) or FLOLS (start on
                               final approach) values, or specify the name of
                               the carrier's parking position. Must also
                               specify a carrier.
--vor=ID                     Specify starting position relative to a VOR.
--vor-frequency=frequency    Specify the frequency of the VOR. Use with
                              --vor=ID.
--ndb=ID                     Specify starting position relative to an NDB.
--ndb-frequency=frequency    Specify the frequency of the NDB. Use with
                              --ndb=ID.
--fix=ID                     Specify starting position relative to a fix.
--offset-distance=nm         Specify distance to reference point (nautical
                              miles).
--offset-azimuth=degrees     Specify heading to reference point.
--lon=degrees                Starting longitude (west = -).
--lat=degrees                Starting latitude (south = -).
--altitude=value             Starting altitude
                              (in feet unless --units-meters specified).
--heading=degrees            Specify heading (yaw) angle (Psi).
--roll=degrees               Specify roll angle (Phi).
--pitch=degrees              Specify pitch angle (Theta).
--vc=knots                   Specify initial airspeed.
--mach=num                   Specify initial mach number.
--glideslope=degrees         Specify flight path angle (can be positive).
--roc=fpm                    Specify initial climb of rate (can be negative).
--uBody=units_per_sec        Specify velocity along the body X axis
                              (in feet unless --units-meters specified).
--vBody=units_per_sec        Specify velocity along the body Y axis
                              (in feet unless --units-meters specified).
--wBody=units_per_sec        Specify velocity along the body Z axis
                              (in feet unless --units-meters specified).
--vNorth=units_per_sec       Specify velocity along a South-North axis
                              (in feet unless --units-meters specified). 
--vEast=units_per_sec        Specify velocity along a West-East axis
                              (in feet unless --units-meters specified).
--vDown=units_per_sec        Specify velocity along a vertical axis
                              (in feet unless --units-meters specified).

Audio Options

--show-sound-devices         Show a list of available audio device.
--sound-device               Explicitly specify the audio device to use.
--disable-sound              Disable sound effects.
--enable-sound               Enable sound effects.

Rendering Options

--aspect-ratio-multiplier=factor
                             Specify a multiplier for the aspect ratio.
--bpp=depth                  Specify the bits per pixel.
--compositor=path            Specify the path to XML file for multi-pass rendering.
                              The path is relative to $FG_ROOT 
                              (defaults to Compositor/default.xml).
--enable-horizon-effect      Enable celestial body growth illusion near the
                              horizon.
--disable-horizon-effect     Disable celestial body growth illusion near the
                              horizon.
--enable-enhanced-lighting   Enable enhanced runway lighting.
--disable-enhanced-lighting  Disable enhanced runway lighting.
--enable-distance-attenuation
                             Enable runway light distance attenuation.
--disable-distance-attenuation
                             Disable runway light distance attenuation
--enable-specular-highlight  Enable specular reflections on textured objects.
--disable-specular-highlight
                             Disable specular reflections on textured
                              objects.
--enable-clouds              Enable 2D (flat) cloud layers.
--disable-clouds             Disable 2D (flat) cloud layers.
--enable-clouds3d            Enable 3D (volumetric) cloud layers.
--disable-clouds3d           Disable 3D (volumetric) cloud layers.
--enable-texture-cache       Enable texture cache (DDS).
--disable-texture-cache      Disable texture cache (DDS).
--texture-cache-dir=path     Set the DDS texture cache directory to be different
                              than the default location.
--enable-fullscreen          Enable fullscreen mode.
--disable-fullscreen         Disable fullscreen mode.
--enable-random-objects      Include random scenery objects
                              (buildings, etc.)
--disable-random-objects     Exclude random scenery objects
                              (buildings, etc.)
--enable-wireframe           Enable wireframe drawing mode.
--disable-wireframe          Disable wireframe drawing mode.
--fog-disable                Disable fog/haze.
--fog-fastest                Enable fastest fog/haze.
--fog-nicest                 Enable nicest fog/haze.
--fov=degrees                Specify field of view angle.
--geometry=WxH               Specify window geometry/resolution (640x480, etc).
--graphics-preset={minimal-quality|low-quality|medium-quality|high-quality|ultra-quality}
                             Specify a graphic preset.
--materials-file=file        Specify the materials file used to render the
                               scenery (default: Materials/regions/materials.xml).
--max-fps=Hz                 Maximum frame rate in Hz.
--shading-flat               Enable flat shading.
--shading-smooth             Enable smooth shading.
--texture-filtering=number   Specify anisotropic filtering of terrain textures. 
                              Valid values is 1, 2, 4, 8, 16. Default is 1.
--view-offset=value          Specify the default forward view direction as
                              an offset from straight ahead. Allowable values
                              are LEFT, RIGHT, CENTER, or a specific number
                              in degrees.
--terrain-engine={tilecache|pagedLOD}
                             Specify the terrain engine you want to use: tilecache
                              or pagedLOD.
--lod-levels=levels
                             Specify the detail levels, where levels are a space-separated 
                              numeric list of levels. The default is "1 3 5 7 9".
                              Use with --terrain-engine=pagedLOD.
--lod-res=resolution         Specify the resolution of the terrain grid. Defaults is 1.
                              Use with --terrain-engine=pagedLOD.
--lod-texturing={bluemarble|raster|debug}
                             Specify the method of texturing the terrain. 
                              The default is bluemarble.
                              Use with --terrain-engine=pagedLOD.
--lod-range-mult=multiplier
                             Specify the range multiplier (point from low to fine detail). 
                              Defaults is 2.
                              Use with --terrain-engine=pagedLOD.

Hud Options

--disable-hud                Disable Heads Up Display (HUD)
--enable-hud                 Enable Heads Up Display (HUD)
--disable-anti-alias-hud     Disable anti-aliased HUD
--enable-anti-alias-hud      Enable anti-aliased HUD
--disable-hud-3d             Disable 3D HUD
--enable-hud-3d              Enable 3D HUD
--hud-tris                   Hud displays number of triangles rendered
--hud-culled                 Hud displays percentage of triangles culled

Time Options

--timeofday={real|dawn|morning|noon|afternoon|dusk|evening|midnight}
                             Specify a time of day.
--time-offset=[+-]hh:mm:ss   Add this time offset to --time-match-real.
--time-match-real            Synchronize time with current time at chosen airport.
--time-match-local           Synchronize time with system time of computer.
--start-date-sys=yyyy:mm:dd:hh:mm:ss
                             Specify a starting date/time with respect to
                              system time.
--start-date-gmt=yyyy:mm:dd:hh:mm:ss
                             Specify a starting date/time with respect to
                              Greenwich Mean Time.
--start-date-lat=yyyy:mm:dd:hh:mm:ss
                             Specify a starting date/time with respect to
                              Local Aircraft Time.

Network Options

--httpd=port                 Enable http server on the specified port.
--telnet=port                Enable telnet server on the specified port.
--jpg-httpd=port             Enable screen shot http server on the specified
                              port (replaced by --httpd).
--allow-nasal-from-sockets   Remove security flag, which means that network 
                              connections will be allowed full access to the 
                              simulator including running arbitrary scripts. 
                              Ensure you have adequate security (such as a 
                              firewall which blocks external connections).
--disable-sentry             Disable crash and error reports from being sent
                              to the development team for analysis.
--enable-sentry              Enable crash and error reports to be sent to 
                              the development team for analysis.

MultiPlayer Options

--callsign=name              Assign a unique name to a player.
--multiplay={in|out},hz,address,port
                             Specify multipilot communication settings;
                              multiple instances can be used.
--enable-fgcom               Enable FGCom built-in.
--disable-fgcom              Disable FGCom built-in.
--disable-hold-short         Disable the move to hold short position for multiplayer.

Route/Way Point Options

--wp=ID[@alt]                Specify a waypoint for the GC autopilot;
                              multiple instances can be used.
--flight-plan=file           Read all waypoints from a file.

IO Options

--generic=params             Open connection using a predefined
                              communication interface and a preselected
                              communication protocol
--atlas=params               Open connection using the Atlas protocol
--atcsim=params              Open connection using the ATC sim protocol
                               (atc610x)
--AV400=params               Emit the Garmin AV400 protocol required to
                               drive a Garmin 196/296 series GPS
--AV400Sim=params            Emit the set of AV400 strings required to drive
                               a Garmin 400-series GPS from FlightGear
--AV400WSimA=params
--AV400WSimB=params          The Garmin WAAS GPS uses 2 serial channels to communicate with the
                               simulator. These 2 channels are represented by the FGAV400WSimA and
                               the FGAV400WSimB classes. The "A" channel is similar to the previous
                               AVSim400 protocol. The "B" channel is considered the "GPS" channel and
                               uses a different protocol than the "A" channel. The GPS unit expects
                               input on the "B" channel at two different frequencies (1hz and 5hz,
                               normally). The "B" channel also expects responses to certain output
                               messages.
--flarm=params               Open connection using the FLARM protocol, which
                               includes NMEA/GPS and traffic reporting
                               messages
--garmin=params              Open connection using the Garmin GPS protocol
--igc=params                 Open connection using the International Glider 
                               Commission (IGC) protocol
--joyclient=params           Open connection to an Agwagon joystick
--jsclient=params            Open connection to a remote joystick
--native=params              Open connection using the FG Native protocol
--native-ctrls=params        Open connection using the FG Native Controls
                             protocol
--native-fdm=params          Open connection using the FG Native FDM
                             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 (LEGACY/DEAD DO NOT USE same as --telnet)
--pve=params                 Open connection using the PVE protocol
--ray=params                 Open connection using the Ray Woodworth motion
                             chair protocol
--rul=params                 Open connection using the RUL protocol

Under Windows, you must use a special escape sequence if you need to specify a COM port higher than 9.

Example: --generic=\\.\COM10,out,1,/tmp/data.xml,myproto

This is per the Microsoft KB article here: http://msdn.microsoft.com/en-us/library/aa363858%28v=vs.85%29.aspx

Avionics Options

--com1=frequency             Set the COM1 radio frequency.
--com2=frequency             Set the COM2 radio frequency.
--nav1=[radial:]frequency    Set the NAV1 radio frequency, optionally
                              preceded by a radial.
--nav2=[radial:]frequency    Set the NAV2 radio frequency, optionally
                              preceded by a radial.
--adf1=[rotation:]frequency
                             Set the ADF1 frequency to frequency kHz. 
                              You can optionally specify the rotation angle 
                              of its compass card by prefixing the frequency 
                              with the angle and a colon. The --adf option is deprecated.
--adf2=[rotation:]frequency  Set the ADF2 frequency to frequency kHz. You can optionally
                              specify the rotation angle of its compass card by prefixing 
                              the frequency with the angle and a colon.
--dme={nav1|nav2|frequency}  Slave the ADF to one of the NAV radios, or set
                              its internal frequency.

Environment Options

--disable-real-weather-fetch Disable METAR based real weather fetching.
--enable-real-weather-fetch  Enable METAR based real weather fetching (this
                              requires an open internet connection.)
--disable-horizon-effect     Disable celestial body growth illusion near the
                              horizon.
--enable-horizon-effect      Enable celestial body growth illusion near the
                              horizon.
--enable-clouds              Enable 2D (flat) cloud layers.
--disable-clouds             Disable 2D (flat) cloud layers.
--enable-clouds3d            Enable 3D (volumetric) cloud layers.
--disable-clouds3d           Disable 3D (volumetric) cloud layers.
--visibility=meters          Specify initial visibility in meters.
--visibility-miles=miles     Specify initial visibility in statute miles.
--wind=DIR[:MAXDIR]@SPEED[:GUST]
                             Specify wind coming from DIR (degrees) at SPEED
                              (knots).
--turbulence=0.0 to 1.0      Specify turbulence from 0.0 (calm) to 1.0 (severe).
--ceiling=FT_ASL[:THICKNESS_FT]
                             Create an overcast ceiling, optionally with a
                              specific thickness (defaults to 2000 ft).
--random-wind                Set up random wind direction and speed.
--metar="metar string"       Starts with a certain METAR string. 
                              Only works if live weather is disabled.

Situation Options

--failure={pitot|static|vacuum|electrical}
                             Fail the pitot, static, vacuum, or electrical
                              system (repeat the option for multiple system
                              failures).

Debugging Options

--console                    Display console (Windows specific)
--developer                  Enable developer mode.
--enable-fpe                 Abort on encountering a floating point
                              exception;
--fgviewer                   Use a model viewer rather than load the entire
                              simulator.
--json-report                Print a report in JSON format on the standard output.
                              The report will give useful information for debugging 
                              purposes, such as the FlightGear version, 
                              the scenery/aircraft paths in use, the TerraSync and 
                              the data download directories and the paths to 
                              navigation data files.
--log-level={bulk|debug|info|warn|alert}
                             Set the logging level for this session.
                              0=verbose, 5=alerts only
                              See also Commonly used debugging tools#fgfs.log
--log-class={none|ai|aircraft|astro|atc|autopilot|clipper|cockpit|
   environment|event|flight|general|gl|gui|headless|input|instrumentation|
   io|math|nasal|navaid|network|osg|particles|sound|systems|terrain|
   terrasync|undefined|view|all}
                             Specify which logging class(es) to use.
--log-dir=dir                Save the logs in the directory dir. If dir is desktop,
                              the logs are saved on the Desktop. This option may be 
                              given several times, using a different directory each time. 
                              Inside the specified directory, the log file will be named 
                              FlightGear_YYYY-MM-DD_num.log, where YYYY-MM-DD is the 
                              current date and num is a progressive number starting at 0.
--trace-read=property        Trace the reads for a property;
                              multiple instances can be used
--trace-write=property       Trace the writes for a property;
                              multiple instances can be used
--uninstall                  Remove $FG_HOME directory. For Windows, it additionally 
                              removes TerraSync, Aircraft and TextureCache 
                              directories from download directory.

Related content

Wiki articles

Source files