Aircraft-set.xml: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
No edit summary
(More comprehensive first section; Moved some content to a section with typical content; Proper heading levels; +rel; Still a lot to do...)
Line 1: Line 1:
''See also: [[Aircraft Generation Wizard]] (stalled as of 12/2013)''
''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]].  
The '''aircraft-set.xml''' file (or rather &lt;name-of-aircraft&gt;-set.xml) is the top level aircraft configuration file. The aircraft-set.xml file should be in the aircraft's root directory, for example <code>[[$FG_ROOT]]/Aircraft/747-400/747-400-set.xml</code>.


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.
When FlightGear loads an aircraft the aircraft-set.xml file is from where all the other aircraft specific configuration and other files are read in.  It also can contain the meta data that is used for example when packaging the aircraft before a release of FlightGear.


=== The -set.xml file ===
== Typical content ==
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. <tt>[[$FG_ROOT]]/Aircraft/747-400/</tt>)
The aircraft-set.xml file is a [[PropertyList XML files|PropertyList XML file]] that contain for example:


==== The -set.xml file gives your aircraft its name ====
* A header with a description and names of the authors
* [[Aircraft rating system|Aircraft ratings]] that can be used to select only the more well developed aircraft (or bad ones if you are looking for aircraft to improve)
* [[Howto:Reassign keyboard bindings|Keyboard bindings]]
* Paths to [[Nasal]] modules
* Paths to configuration files for the [[Flight Dynamics Model|flight dynamics model]], [[Howto:Animate models|3D models and their animations]], [[Autopilot configuration reference|autopilot]], [[Howto:Add sound effects to aircraft|sound]] etc.
 
To help provide a more consistent experience for end users, aircraft developers are encouraged to use [[Release:Aircraft Selection Criteria]] as a guide when preparing an aircraft for inclusion in the [[FGAddon]] aircraft repository, 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 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.
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.


Line 24: Line 32:
   fkdr1-uiuc-set.xml
   fkdr1-uiuc-set.xml


==== The -set.xml file gives your aircraft its properties ====
== The -set.xml file gives your aircraft its properties ==


Most XML files in FlightGear use the so called [[PropertyList XML File|Property List]] format.
Most XML files in FlightGear use the so called [[PropertyList XML File|Property List]] format.
Line 39: Line 47:
The following tags are to be placed between the <sim> and </sim> tags.
The following tags are to be placed between the <sim> and </sim> tags.


===== <description></description> =====
=== <description></description> ===
The text that is to be shown in the aircraft selection dialog of [[FGRun]] and other GUIs.
The text that is to be shown in the aircraft selection dialog of [[FGRun]] and other GUIs.


===== <aircraft-version></aircraft-version> =====
=== <aircraft-version></aircraft-version> ===
Commonly shows the latest update date.
Commonly shows the latest update date.


===== <status></status> =====
=== <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.
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.
See [[Formalizing Aircraft Status]] for guidelines.


===== <author></author> =====
=== <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 ( ).
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> =====
=== <flight-model></flight-model> ===
What FDM system is the aircraft using. Set to 'yasim' for [[YASim]] and to 'jsb' for [[JSBSim]].
What FDM system is the aircraft using. Set to 'yasim' for [[YASim]] and to 'jsb' for [[JSBSim]].


==== <aero></aero> ====
=== <aero></aero> ===
The filename of the FDM file, without .xml.  
The filename of the FDM file, without .xml.  


Line 65: Line 73:
You have created this file earlier on at: [[#The .xml file (FDM)]]
You have created this file earlier on at: [[#The .xml file (FDM)]]


==== <splash-texture></splash-texture> ====
=== <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 <tt>[[$FG ROOT]]/Textures/</tt> when this line is not found in the -set.xml file.
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 <tt>[[$FG ROOT]]/Textures/</tt> when this line is not found in the -set.xml file.


==== <splash-title></splash-title> ====
=== <splash-title></splash-title> ===
Adds small text (above the splash texture) to the loading screen.
Adds small text (above the splash texture) to the loading screen.


===== <model><path></path></model> =====
=== <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.
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> =====
=== <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.
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 <tt>[[$FG ROOT]]/Docs/README.xmlsound</tt>
For additional information, you'll want to check out <tt>[[$FG ROOT]]/Docs/README.xmlsound</tt>


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


===== <autopilot><path></path></autopilot> =====
=== <autopilot><path></path></autopilot> ===
Where to find the [[autopilot]] system.
Where to find the [[autopilot]] system.


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


==== Checklists ====
== Checklists ==
Please see [[Aircraft Checklists]]
Please see [[Aircraft Checklists]]


==== Variants (3.6+) ====
== Variants (3.6+) ==
Aircraft developers can make use of a new tag in the [[Aircraft-set.xml]] file.  Added to the <code><nowiki><sim></nowiki></code>, the <code><nowiki><variant-of></nowiki></code> tag states to the launcher the aircraft type that your aircraft is a variant of.  For example, the [[British Aerospace Sea Harrier|BAe Sea Harrier FA2]] is a variant of the BAe Sea Harrier, and the ''Cessna 172P - Canvas Demo'' is a variant of the [[Cessna C172P|C172P]]. Equally, this could be used for different [[Talk:Aircraft_Checklists#In-air_startups_.26_supporting_Startup_Situations|startup situations]] too.
Aircraft developers can make use of a new tag in the [[Aircraft-set.xml]] file.  Added to the <code><nowiki><sim></nowiki></code>, the <code><nowiki><variant-of></nowiki></code> tag states to the launcher the aircraft type that your aircraft is a variant of.  For example, the [[British Aerospace Sea Harrier|BAe Sea Harrier FA2]] is a variant of the BAe Sea Harrier, and the ''Cessna 172P - Canvas Demo'' is a variant of the [[Cessna C172P|C172P]]. Equally, this could be used for different [[Talk:Aircraft_Checklists#In-air_startups_.26_supporting_Startup_Situations|startup situations]] too.


Line 108: Line 116:
<code><nowiki><variant-of>777-200</variant-of></nowiki></code>
<code><nowiki><variant-of>777-200</variant-of></nowiki></code>


== Related content ==
* [[Aircraft rating system]]
* [[Howto:Add sound effects to aircraft]]
* [[Howto:Animate models]]
* [[Release:Aircraft Selection Criteria]]


[[Category:Aircraft enhancement]]
[[Category:Aircraft enhancement]]

Revision as of 03:01, 2 October 2015

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

The aircraft-set.xml file (or rather <name-of-aircraft>-set.xml) is the top level aircraft configuration file. The aircraft-set.xml file should be in the aircraft's root directory, for example $FG_ROOT/Aircraft/747-400/747-400-set.xml.

When FlightGear loads an aircraft the aircraft-set.xml file is from where all the other aircraft specific configuration and other files are read in. It also can contain the meta data that is used for example when packaging the aircraft before a release of FlightGear.

Typical content

The aircraft-set.xml file is a PropertyList XML file that contain for example:

To help provide a more consistent experience for end users, aircraft developers are encouraged to use Release:Aircraft Selection Criteria as a guide when preparing an aircraft for inclusion in the FGAddon aircraft repository, 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 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>

Related content