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

Aircraft-set.xml

From FlightGear wiki
Revision as of 09:36, 1 May 2015 by Hooray (Talk | contribs)

Jump to: navigation, search

See also: Aircraft Generation Wizard (stalled as of 12/2013)

An aircraft-set.xml file (or *-set.xml file) is the main file that is loaded by FlightGear to load an aircraft. It contains further information to describe the FDM, the 3D models involved, Nasal scripts used, cockpit panels, keyboard and joystick bindings, as well as lots of other important information. The aircraft-set XML file is a PropertyList XML File. Also see Catalog metadata. Regarding packaging, see Standard aircraft structure.

To help provide a more consistent experience for end users, please use Release:Aircraft Selection Criteria as a guide to prepare aircraft for inclusion in the base package, especially if you are hoping for your aircraft to become part of the default distribution, such as the c172p for example.

The -set.xml file

This is the most important file of a FlightGear aircraft. This is the only file that is read directly by FlightGear. Actually it can be compared with an airport hub (from where flights of a certain airline to all other airports departure and arrive). The -set.xml file leads FlightGear to all files that are needed to simulate the aircraft. The -set.xml file should be stored in the aircraft's root directory (eg. $FG_ROOT/Aircraft/747-400/)

The -set.xml file gives your aircraft its name

The name of the -set.xml file gives the aircraft its official name withing FlightGear--for instance, the name that is used to select that aircraft on the command line when FlightGear is started, and the name that is used to match an aircraft running on one computer with the corresponding multiplayer aircraft shown on a different computer on the multiplayer network.

For instance, if the filename is

  fkdr1-set.xml

Then the command line to start with that aircraft is something like:

  fgfs.exe --aircraft=fkdr1

This naming convention gives you the opportunity to create two (or more) aircraft within one directory--for instance, create versions of your aircraft using two different FDMS, but sharing many or most other features (and .xml files/models):

 fkdr1-yasim-set.xml
 fkdr1-uiuc-set.xml

The -set.xml file gives your aircraft its properties

Most XML files in FlightGear use the so called Property List format. Always begin the -set.xml file with:

<PropertyList>
 <sim>

and close the file with:

 </sim>
</PropertyList>

The following tags are to be placed between the <sim> and </sim> tags.

<description></description>

The text that is to be shown in the aircraft selection dialog of FGRun and other GUIs.

<aircraft-version></aircraft-version>

Commonly shows the latest update date.

<status></status>

The status of the development of your plane. This can for example be used in order to get a list of aircraft with a certain minimum development status by passing the --min-status= parameter to the fgfs executable.

See Formalizing Aircraft Status for guidelines.

<author></author>

Place your name(s) here. If multiple people worked on the same aircraft, you can place the specific development area for each person between ( ).

<flight-model></flight-model>

What FDM system is the aircraft using. Set to 'yasim' for YASim and to 'jsb' for JSBSim.

<aero></aero>

The filename of the FDM file, without .xml.

For instance, if your FDM file is sopwithCamel1F1.xml, the aero section would look like:

<aero>sopwithCamel1F1</aero>

You have created this file earlier on at: #The .xml file (FDM)

<splash-texture></splash-texture>

Place the location of an image you would like to show during loading of the aircraft. FlightGear will randomly pick one of the generic splashes in $FG ROOT/Textures/ when this line is not found in the -set.xml file.

<splash-title></splash-title>

Adds small text (above the splash texture) to the loading screen.

<model><path></path></model>

Where to find the model. Could be an .ac file (plain model format) or .xml if you want to have extras like animations etc.

<sound><path></path></sound>

The path to your aircraft's sound file, do not include if you don't have one. The pitch and volume of the sound is controlled by the xml file and throttle position. If for example you find a nice wav file of the jet engine you're using, you can fix it up with your favorite sound editor so it loops nicely and include that into your model (I've noticed a few models where it can get quite annoying when the loop length is so small you can really notice it) so make it smooth.

For additional information, you'll want to check out $FG ROOT/Docs/README.xmlsound

<panel><path></path></panel>

Where to find the (2D) panel. We prefer 3D cockpits, which are linked in the model .xml file.

<autopilot><path></path></autopilot>

Where to find the autopilot system.

More info here: http://wiki.flightgear.org/XML#3._Data

Checklists

Please see Aircraft Checklists

Variants (3.6+)

Aircraft developers can make use of a new tag in the Aircraft-set.xml file. Added to the <sim>, the <variant-of> tag states to the launcher the aircraft type that your aircraft is a variant of. For example, the BAe Sea Harrier FA2 is a variant of the BAe Sea Harrier, and the Cessna 172P - Canvas Demo is a variant of the C172P. Equally, this could be used for different startup situations too.

Note  At the moment, only the Mac Qt launcher (which comes with FlightGear for Mac v3.4+) will read this tag.

Syntax:

<sim>
    ...
    <variant-of>[aircraft]</variant-of>
    ...
</sim>

Example from Gitorious website (see commit):

<variant-of>777-200</variant-of>