<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.flightgear.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jsb</id>
	<title>FlightGear wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.flightgear.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jsb"/>
	<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/Special:Contributions/Jsb"/>
	<updated>2026-04-09T17:15:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=USB-HID&amp;diff=143879</id>
		<title>USB-HID</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=USB-HID&amp;diff=143879"/>
		<updated>2026-04-03T09:15:49Z</updated>

		<summary type="html">&lt;p&gt;Jsb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[draft]&lt;br /&gt;
&lt;br /&gt;
USB-HID (Human Interface Device) is one of the methods to connect input devices to FlightGear. &lt;br /&gt;
&lt;br /&gt;
==Linux access rights for devices==&lt;br /&gt;
HID devices under linux have usually restricted access rights, e.g. normal users are not allowed to access them directly. As you should not run FlightGear as root user, you most likely need to create a few udev rules to allow normal users to access the device files.&lt;br /&gt;
&lt;br /&gt;
First, use &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; to get a list of all detected USB devices. The output should look similar to this:&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Bus 003 Device 004: ID 294b:1901 Honeycomb Aeronautical Bravo Throttle Quadrant&lt;br /&gt;
Bus 003 Device 006: ID 06a3:0763 Saitek PLC Pro Flight Rudder Pedals&lt;br /&gt;
Bus 003 Device 002: ID 294b:1900 Honeycomb Aeronautical Alpha Flight Controls&lt;br /&gt;
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub&lt;br /&gt;
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Find the lines containing your relevant input devices (joysticks, yoke, throttle, pedals, ...) and note the IDs. The format is &amp;lt;vendor-id&amp;gt;:&amp;lt;device-id&amp;gt;. For simplicity, this example uses only the vendor-id.&lt;br /&gt;
&lt;br /&gt;
On Ubuntu, you can add for example the following file under &amp;lt;code&amp;gt;/etc/udev/rules.d&amp;lt;/code&amp;gt; to allow r/w access to members of the &amp;lt;code&amp;gt;input&amp;lt;/code&amp;gt; user group (or any user group you prefer). Of course, you have to add/modify the lines to match the vendor-ids of your devices and your user id (Linux login name) must be a member of the group mentioned in the rules.&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/udev/rules.d/40-usb-flightgear.rules&lt;br /&gt;
#&lt;br /&gt;
# To add your user to the input group try:&lt;br /&gt;
# sudo usermod --append --groups input &amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Honeycomb&lt;br /&gt;
SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{idVendor}==&amp;quot;294b&amp;quot;, GROUP=&amp;quot;input&amp;quot;, MODE=&amp;quot;0664&amp;quot;&lt;br /&gt;
# Saitek&lt;br /&gt;
SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{idVendor}==&amp;quot;06a3&amp;quot;, GROUP=&amp;quot;input&amp;quot;, MODE=&amp;quot;0664&amp;quot;&lt;br /&gt;
# Winctrl&lt;br /&gt;
SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{idVendor}==&amp;quot;4098&amp;quot;, GROUP=&amp;quot;input&amp;quot;, MODE=&amp;quot;0664&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;To activate the new rules, try &amp;lt;code&amp;gt;udevadm control --reload-rules &amp;amp;&amp;amp; udevadm trigger&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
If this does not help, a reboot will do.&lt;br /&gt;
&lt;br /&gt;
==Developing Configuration files for input devices==&lt;br /&gt;
&lt;br /&gt;
=== Gathering data ===&lt;br /&gt;
Add the following parameters to your FlightGear command line or via the launcher Settings&amp;gt;Additional Settings&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
--log-class=input&lt;br /&gt;
--log-level=debug&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will create a lot of debug output for the input systems in which you can find all events supported by your devices&lt;br /&gt;
&lt;br /&gt;
=== Creating a config file ===&lt;br /&gt;
The configuration files shall be stored in FGDATA/Input/Event/&amp;lt;Vendor&amp;gt;/&amp;lt;Model&amp;gt;.xml &lt;br /&gt;
&lt;br /&gt;
As a starting point you can copy this example. Replace the data as needed.&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;!-- next two must be single word, no special characters! --&amp;gt;&lt;br /&gt;
  &amp;lt;vendor-name&amp;gt;honeycomb&amp;lt;/vendor-name&amp;gt;&lt;br /&gt;
  &amp;lt;model-name&amp;gt;bravo&amp;lt;/model-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- &lt;br /&gt;
  the name as seen e.g. in lsusb or the debug output of flightgear &lt;br /&gt;
  multiple &amp;lt;name&amp;gt;&amp;lt;/name&amp;gt; lines are allowed to match name variants&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Honeycomb Aeronautical Bravo Throttle Quadrant&amp;lt;/name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- &lt;br /&gt;
  during development, set this to true to get more debug output&lt;br /&gt;
  do not forget to set it to false, when you finalize your config file&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
  &amp;lt;debug-events type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/debug-events&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nasal&amp;gt;&lt;br /&gt;
    &amp;lt;open&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      #bravo = input_helpers.honeycomb.bravo.new(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/open&amp;gt;&lt;br /&gt;
    &amp;lt;close&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      #if (ishash(bravo) and isfunc(bravo['close']))&lt;br /&gt;
      #  bravo.close(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/close&amp;gt;&lt;br /&gt;
  &amp;lt;/nasal&amp;gt;&lt;br /&gt;
  &amp;lt;!-- events shall follow here --&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Example for an axis event:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;event&amp;gt;&lt;br /&gt;
    &amp;lt;desc&amp;gt;Lever 0&amp;lt;/desc&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;abs-x-translate&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;min-range&amp;gt;-1023&amp;lt;/min-range&amp;gt;&lt;br /&gt;
    &amp;lt;max-range&amp;gt;1023&amp;lt;/max-range&amp;gt;&lt;br /&gt;
    &amp;lt;binding&amp;gt;&lt;br /&gt;
      &amp;lt;command&amp;gt;property-scale&amp;lt;/command&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
  &amp;lt;/event&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Example for a button event:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;event&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;button-1&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;desc&amp;gt;AP mode HDG&amp;lt;/desc&amp;gt;&lt;br /&gt;
    &amp;lt;repeatable&amp;gt;false&amp;lt;/repeatable&amp;gt;&lt;br /&gt;
    &amp;lt;binding&amp;gt;&lt;br /&gt;
      &amp;lt;command&amp;gt;property-assign&amp;lt;/command&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/input/honeycomb/bravo/buttons/hdg&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;value&amp;gt;1&amp;lt;/value&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
    &amp;lt;mod-up&amp;gt;&lt;br /&gt;
      &amp;lt;binding&amp;gt;&lt;br /&gt;
        &amp;lt;command&amp;gt;property-assign&amp;lt;/command&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/input/honeycomb/bravo/buttons/hdg&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;value&amp;gt;0&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/binding&amp;gt;&lt;br /&gt;
    &amp;lt;/mod-up&amp;gt;&lt;br /&gt;
  &amp;lt;/event&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Status of OS support==&lt;br /&gt;
Linux: Supported&lt;br /&gt;
&lt;br /&gt;
MacOS: supported?&lt;br /&gt;
&lt;br /&gt;
Windows: not yet supported?&lt;br /&gt;
&lt;br /&gt;
== see also ==&lt;br /&gt;
[[Input helpers]]&lt;br /&gt;
&lt;br /&gt;
[[Honeycomb Input Devices]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Input_helpers&amp;diff=143878</id>
		<title>Input helpers</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Input_helpers&amp;diff=143878"/>
		<updated>2026-04-02T20:03:35Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Corrections&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This page is about Nasal script code for input devices like joysticks, yokes, throttle quadrants and pedals. While small scripts can be easily added directly into joystick &amp;lt;binding&amp;gt;, larger code blocks should be organized a bit differently. &lt;br /&gt;
&lt;br /&gt;
As always: &amp;quot;do not repeat yourself&amp;quot; = to make everyones live easier, code should not be copy&amp;amp;pasted but put into a &amp;quot;central&amp;quot; place as functions or classes and be called whenever, wherever needed. This way maintenance has to be done only in one place.&lt;br /&gt;
&lt;br /&gt;
== input_helpers namespace ==&lt;br /&gt;
Input helper code should be stored in FGDATA/Nasal/input_helpers/&amp;lt;vendorname&amp;gt;.nas&lt;br /&gt;
&lt;br /&gt;
To avoid clashes, there should be one file per vendor and in each of these files a namespace (hash) for this vendor shall be created.&lt;br /&gt;
&lt;br /&gt;
See honeycomb.nas for an example:&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
# &lt;br /&gt;
# Helpers for Honeycomb input devices&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# !!! Abbreviated sample !!! &lt;br /&gt;
# Check FGDATA repository for latest full version&lt;br /&gt;
&lt;br /&gt;
# namespace&lt;br /&gt;
var honeycomb = {};&lt;br /&gt;
&lt;br /&gt;
# Helper for the Honeycomb Alpha Yoke&lt;br /&gt;
honeycomb[&amp;quot;alpha&amp;quot;] = {&lt;br /&gt;
    new: func(cfgnode) {&lt;br /&gt;
        var m = {&lt;br /&gt;
            parents: [me, input_helpers.config_manager.new(cfgnode)],&lt;br /&gt;
        };&lt;br /&gt;
        return m;&lt;br /&gt;
    },&lt;br /&gt;
    # abreviated file&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== config_manager - supporting config variants for a device ==&lt;br /&gt;
The &amp;lt;code&amp;gt;input_helpers.config_manager&amp;lt;/code&amp;gt; class is designed to allow configuration variants for an input device to be defined within a single XML config file.&lt;br /&gt;
&lt;br /&gt;
Why? Take the Honeycomb Bravo throttle quadrant as an example. It supports six levers with replaceable lever &amp;quot;heads&amp;quot;, one set for airliners and another one for GA single and dual engine models, so you can configure the hardware with levers from single throttle/mixture up to four jet engines.&lt;br /&gt;
&lt;br /&gt;
Now, you need a way to tell FlightGear, what levers you put onto your throttle quadrant and how to interprete the lever inputs. To avoid juggling with XML files, we simply put the limited number of variants into the XML and let the config_manager do the rest.&lt;br /&gt;
&lt;br /&gt;
If XML files containing &amp;lt;config-variants&amp;gt; are loaded during startup, config_manager will show a popup hint about this fact and open a dialog to select the desired config variant. &lt;br /&gt;
&lt;br /&gt;
The selection is added to aircraft.data and thus is safed per aircraft for convenience.&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!-- shortened version for illustration only --&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;vendor-name&amp;gt;honeycomb&amp;lt;/vendor-name&amp;gt;&lt;br /&gt;
  &amp;lt;model-name&amp;gt;bravo&amp;lt;/model-name&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Honeycomb Aeronautical Bravo Throttle Quadrant&amp;lt;/name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;debug-events type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/debug-events&amp;gt;&lt;br /&gt;
  &amp;lt;hid-debug-raw type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/hid-debug-raw&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
  we need &amp;lt;nasal&amp;gt; to load the config_manager or a vendor&lt;br /&gt;
  specific derived class of it&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
  &amp;lt;nasal&amp;gt;&lt;br /&gt;
    &amp;lt;open&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      print(&amp;quot;Honeycomb Bravo Nasal (event) open&amp;quot;);&lt;br /&gt;
      bravo = input_helpers.honeycomb.bravo.new(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/open&amp;gt;&lt;br /&gt;
    &amp;lt;close&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      print(&amp;quot;Honeycomb Bravo Nasal (event) close&amp;quot;);&lt;br /&gt;
      if (ishash(bravo) and isfunc(bravo['close']))&lt;br /&gt;
        bravo.close(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/close&amp;gt;&lt;br /&gt;
  &amp;lt;/nasal&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
  now we can add &amp;lt;config-variants&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
  &amp;lt;config-variants&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
&amp;lt;!-- id must be a single word, no special chars, useable as hash key in Nasal --&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;jet2&amp;lt;/id&amp;gt; &lt;br /&gt;
&amp;lt;!-- text for the GUI dialog --&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Airliner (two engines)&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
  add property mappings for this variant. &lt;br /&gt;
  &amp;lt;input&amp;gt; is used in the &amp;lt;event&amp;gt; elements&lt;br /&gt;
  &amp;lt;output&amp;gt; is the target property input will be aliased to&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flight/speed-brake&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/reverser&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/reverser&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[5]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flaps-lever-continuous&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;tm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Mixture&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;tpm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Prop/Mixture&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/propeller-pitch&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;   &lt;br /&gt;
  &amp;lt;/config-variants&amp;gt;&lt;br /&gt;
&amp;lt;!-- events cut; see latest version in FGDATA repository --&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== see also ==&lt;br /&gt;
[[USB-HID]]&lt;br /&gt;
&lt;br /&gt;
[[Honeycomb Input Devices]]&lt;br /&gt;
[[Category:Nasal]]&lt;br /&gt;
[[Category:Joysticks and Yokes]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=USB-HID&amp;diff=143877</id>
		<title>USB-HID</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=USB-HID&amp;diff=143877"/>
		<updated>2026-04-02T20:02:21Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Corrections&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[draft]&lt;br /&gt;
&lt;br /&gt;
USB-HID (Human Interface Device) is one of the methods to connect input devices to FlightGear. &lt;br /&gt;
&lt;br /&gt;
==Linux access rights for devices==&lt;br /&gt;
HID devices under linux have usually restricted access rights, e.g. normal users are not allowed to access them directly. As you should not run FlightGear as root user, you most likely need to create a few udev rules to allow normal users to access the device files.&lt;br /&gt;
&lt;br /&gt;
First, use &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; to get a list of all detected USB devices. The output should look similar to this:&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Bus 003 Device 004: ID 294b:1901 Honeycomb Aeronautical Bravo Throttle Quadrant&lt;br /&gt;
Bus 003 Device 006: ID 06a3:0763 Saitek PLC Pro Flight Rudder Pedals&lt;br /&gt;
Bus 003 Device 002: ID 294b:1900 Honeycomb Aeronautical Alpha Flight Controls&lt;br /&gt;
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub&lt;br /&gt;
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Find the lines containing your relevant input devices (joysticks, yoke, throttle, pedals, ...) and note the IDs. The format is &amp;lt;vendor-id&amp;gt;:&amp;lt;device-id&amp;gt;. For simplicity, this example uses only the vendor-id.&lt;br /&gt;
&lt;br /&gt;
On Ubuntu, you can add for example the following file under &amp;lt;code&amp;gt;/etc/udev/rules.d&amp;lt;/code&amp;gt; to allow r/w access to members of the &amp;lt;code&amp;gt;input&amp;lt;/code&amp;gt; user group. Of course, you have to add/modify the lines to match the vendor-ids of your devices and your user id must be a member of the group.&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/udev/rules.d/40-usb-flightgear.rules&lt;br /&gt;
#&lt;br /&gt;
# To add your user to the input group try:&lt;br /&gt;
# sudo usermod --append --groups input &amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Honeycomb&lt;br /&gt;
SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{idVendor}==&amp;quot;294b&amp;quot;, GROUP=&amp;quot;input&amp;quot;, MODE=&amp;quot;0664&amp;quot;&lt;br /&gt;
# saitek&lt;br /&gt;
SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{idVendor}==&amp;quot;06a3&amp;quot;, GROUP=&amp;quot;input&amp;quot;, MODE=&amp;quot;0664&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;To activate the new rules, try &amp;lt;code&amp;gt;udevadm control --reload-rules &amp;amp;&amp;amp; udevadm trigger&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
If this does not help, a reboot will do.&lt;br /&gt;
&lt;br /&gt;
==Developing Configuration files for input devices==&lt;br /&gt;
&lt;br /&gt;
=== Gathering data ===&lt;br /&gt;
Add the following parameters to your FlightGear command line or via the launcher Settings&amp;gt;Additional Settings&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
--log-class=input&lt;br /&gt;
--log-level=debug&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will create a lot of debug output for the input systems in which you can find all events supported by your devices&lt;br /&gt;
&lt;br /&gt;
=== Creating a config file ===&lt;br /&gt;
The configuration files shall be stored in FGDATA/Input/Event/&amp;lt;Vendor&amp;gt;/&amp;lt;Model&amp;gt;.xml &lt;br /&gt;
&lt;br /&gt;
As a starting point you can copy this example. Replace the data as needed.&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;!-- next two must be single word, no special characters! --&amp;gt;&lt;br /&gt;
  &amp;lt;vendor-name&amp;gt;honeycomb&amp;lt;/vendor-name&amp;gt;&lt;br /&gt;
  &amp;lt;model-name&amp;gt;bravo&amp;lt;/model-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- &lt;br /&gt;
  the name as seen e.g. in lsusb or the debug output of flightgear &lt;br /&gt;
  multiple &amp;lt;name&amp;gt;&amp;lt;/name&amp;gt; lines are allowed to match name variants&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Honeycomb Aeronautical Bravo Throttle Quadrant&amp;lt;/name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- &lt;br /&gt;
  during development, set this to true to get more debug output&lt;br /&gt;
  do not forget to set it to false, when you finalize your config file&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
  &amp;lt;debug-events type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/debug-events&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nasal&amp;gt;&lt;br /&gt;
    &amp;lt;open&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      #bravo = input_helpers.honeycomb.bravo.new(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/open&amp;gt;&lt;br /&gt;
    &amp;lt;close&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      #if (ishash(bravo) and isfunc(bravo['close']))&lt;br /&gt;
      #  bravo.close(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/close&amp;gt;&lt;br /&gt;
  &amp;lt;/nasal&amp;gt;&lt;br /&gt;
  &amp;lt;!-- events shall follow here --&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Example for an axis event:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;event&amp;gt;&lt;br /&gt;
    &amp;lt;desc&amp;gt;Lever 0&amp;lt;/desc&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;abs-x-translate&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;min-range&amp;gt;-1023&amp;lt;/min-range&amp;gt;&lt;br /&gt;
    &amp;lt;max-range&amp;gt;1023&amp;lt;/max-range&amp;gt;&lt;br /&gt;
    &amp;lt;binding&amp;gt;&lt;br /&gt;
      &amp;lt;command&amp;gt;property-scale&amp;lt;/command&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
  &amp;lt;/event&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Example for a button event:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;event&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;button-1&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;desc&amp;gt;AP mode HDG&amp;lt;/desc&amp;gt;&lt;br /&gt;
    &amp;lt;repeatable&amp;gt;false&amp;lt;/repeatable&amp;gt;&lt;br /&gt;
    &amp;lt;binding&amp;gt;&lt;br /&gt;
      &amp;lt;command&amp;gt;property-assign&amp;lt;/command&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/input/honeycomb/bravo/buttons/hdg&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;value&amp;gt;1&amp;lt;/value&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
    &amp;lt;mod-up&amp;gt;&lt;br /&gt;
      &amp;lt;binding&amp;gt;&lt;br /&gt;
        &amp;lt;command&amp;gt;property-assign&amp;lt;/command&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/input/honeycomb/bravo/buttons/hdg&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;value&amp;gt;0&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/binding&amp;gt;&lt;br /&gt;
    &amp;lt;/mod-up&amp;gt;&lt;br /&gt;
  &amp;lt;/event&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Status of OS support==&lt;br /&gt;
Linux: Supported&lt;br /&gt;
&lt;br /&gt;
MacOS: supported?&lt;br /&gt;
&lt;br /&gt;
Windows: not yet supported?&lt;br /&gt;
&lt;br /&gt;
== see also ==&lt;br /&gt;
[[Input helpers]]&lt;br /&gt;
&lt;br /&gt;
[[Honeycomb Input Devices]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=USB-HID&amp;diff=143871</id>
		<title>USB-HID</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=USB-HID&amp;diff=143871"/>
		<updated>2026-04-01T21:11:58Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Creating a config file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[draft]&lt;br /&gt;
&lt;br /&gt;
USB-HID (Human Interface Device) is one of the methods to connect input devices to FlightGear. &lt;br /&gt;
&lt;br /&gt;
==Linux access rights for devices==&lt;br /&gt;
HID devices under linux have usually restricted access rights, e.g. normal users are not allowed to access them directly. As you should not run FlightGear as root user, you most likely need to create a few udev rules to allow normal users to access the device files.&lt;br /&gt;
&lt;br /&gt;
First, use &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; to get a list of all detected USB devices. The output should look similar to this:&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Bus 003 Device 004: ID 294b:1901 Honeycomb Aeronautical Bravo Throttle Quadrant&lt;br /&gt;
Bus 003 Device 006: ID 06a3:0763 Saitek PLC Pro Flight Rudder Pedals&lt;br /&gt;
Bus 003 Device 002: ID 294b:1900 Honeycomb Aeronautical Alpha Flight Controls&lt;br /&gt;
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub&lt;br /&gt;
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Find the lines containing your relevant input devices (joysticks, yoke, throttle, pedals, ...) and note the IDs. The format is &amp;lt;vendor-id&amp;gt;:&amp;lt;device-id&amp;gt;. For simplicity, this example uses only the vendor-id.&lt;br /&gt;
&lt;br /&gt;
On Ubuntu, you can add for example the following file under &amp;lt;code&amp;gt;/etc/udev/rules.d&amp;lt;/code&amp;gt; to allow r/w access to members of the &amp;lt;code&amp;gt;input&amp;lt;/code&amp;gt; user group. Of course, you have to add/modify the lines to match the vendor-ids of your devices and your user id must be a member of the group.&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/udev/rules.d/40-usb-flightgear.rules&lt;br /&gt;
#&lt;br /&gt;
# To add your user to the input group try:&lt;br /&gt;
# sudo usermod --append --groups input &amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Honeycomb&lt;br /&gt;
SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{idVendor}==&amp;quot;294b&amp;quot;, GROUP=&amp;quot;input&amp;quot;, MODE=&amp;quot;0664&amp;quot;&lt;br /&gt;
# saitek&lt;br /&gt;
SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{idVendor}==&amp;quot;06a3&amp;quot;, GROUP=&amp;quot;input&amp;quot;, MODE=&amp;quot;0664&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;To activate the new rules, try &amp;lt;code&amp;gt;udevadm control --reload-rules &amp;amp;&amp;amp; udevadm trigger&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
If this does not help, a reboot will do.&lt;br /&gt;
&lt;br /&gt;
==Developing Configuration files for input devices==&lt;br /&gt;
&lt;br /&gt;
=== Gathering data ===&lt;br /&gt;
Add the following parameters to your FlightGear command line or via the launcher Settings&amp;gt;Additional Settings&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
--log-class=input&lt;br /&gt;
--log-level=debug&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will create a lot of debug output for the input systems in which you can find all events supported by your devices&lt;br /&gt;
&lt;br /&gt;
=== Creating a config file ===&lt;br /&gt;
The configuration files shall be stored in FGDATA/Input/Event/&amp;lt;Vendor&amp;gt;/&amp;lt;Model&amp;gt;.xml &lt;br /&gt;
&lt;br /&gt;
As a starting point you can copy this example. Replace the data as needed.&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;!-- next two must be single word, no special characters! --&amp;gt;&lt;br /&gt;
  &amp;lt;vendor-id&amp;gt;honeycomb&amp;lt;/vendor-id&amp;gt;&lt;br /&gt;
  &amp;lt;model-id&amp;gt;bravo&amp;lt;/model-id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- &lt;br /&gt;
  the name as seen e.g. in lsusb or the debug output of flightgear &lt;br /&gt;
  multiple &amp;lt;name&amp;gt;&amp;lt;/name&amp;gt; lines are allowed to match name variants&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Honeycomb Aeronautical Bravo Throttle Quadrant&amp;lt;/name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- &lt;br /&gt;
  during development, set this to true to get more debug output&lt;br /&gt;
  do not forget to set it to false, when you finalize your config file&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
  &amp;lt;debug-events type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/debug-events&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nasal&amp;gt;&lt;br /&gt;
    &amp;lt;open&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      #bravo = input_helpers.honeycomb.bravo.new(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/open&amp;gt;&lt;br /&gt;
    &amp;lt;close&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      #if (ishash(bravo) and isfunc(bravo['close']))&lt;br /&gt;
      #  bravo.close(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/close&amp;gt;&lt;br /&gt;
  &amp;lt;/nasal&amp;gt;&lt;br /&gt;
  &amp;lt;!-- events shall follow here --&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Example for an axis event:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;event&amp;gt;&lt;br /&gt;
    &amp;lt;desc&amp;gt;Lever 0&amp;lt;/desc&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;abs-x-translate&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;min-range&amp;gt;-1023&amp;lt;/min-range&amp;gt;&lt;br /&gt;
    &amp;lt;max-range&amp;gt;1023&amp;lt;/max-range&amp;gt;&lt;br /&gt;
    &amp;lt;binding&amp;gt;&lt;br /&gt;
      &amp;lt;command&amp;gt;property-scale&amp;lt;/command&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
  &amp;lt;/event&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Example for a button event:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;event&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;button-1&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;desc&amp;gt;AP mode HDG&amp;lt;/desc&amp;gt;&lt;br /&gt;
    &amp;lt;repeatable&amp;gt;false&amp;lt;/repeatable&amp;gt;&lt;br /&gt;
    &amp;lt;binding&amp;gt;&lt;br /&gt;
      &amp;lt;command&amp;gt;property-assign&amp;lt;/command&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/input/honeycomb/bravo/buttons/hdg&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;value&amp;gt;1&amp;lt;/value&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
    &amp;lt;mod-up&amp;gt;&lt;br /&gt;
      &amp;lt;binding&amp;gt;&lt;br /&gt;
        &amp;lt;command&amp;gt;property-assign&amp;lt;/command&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/input/honeycomb/bravo/buttons/hdg&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;value&amp;gt;0&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/binding&amp;gt;&lt;br /&gt;
    &amp;lt;/mod-up&amp;gt;&lt;br /&gt;
  &amp;lt;/event&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Status of OS support==&lt;br /&gt;
Linux: Supported&lt;br /&gt;
&lt;br /&gt;
MacOS: supported?&lt;br /&gt;
&lt;br /&gt;
Windows: not yet supported?&lt;br /&gt;
&lt;br /&gt;
== see also ==&lt;br /&gt;
[[Input helpers]]&lt;br /&gt;
&lt;br /&gt;
[[Honeycomb Input Devices]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Nasal_library/props&amp;diff=143787</id>
		<title>Nasal library/props</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Nasal_library/props&amp;diff=143787"/>
		<updated>2026-03-24T20:02:07Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Remove wrong notes regarding performance .&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Nasal Navigation|nocat=1}}&lt;br /&gt;
This page contains documentation for the '''&amp;lt;code&amp;gt;props&amp;lt;/code&amp;gt; namespace''' in [[Nasal]]. This namespace provides APIs for working with property trees (including the main [[Property Tree]]) via {{API Link|simgear|class|SGPropertyNode}}. The &amp;lt;code&amp;gt;props&amp;lt;/code&amp;gt; namespace is sourced from {{fgdata source|Nasal/props.nas}} and {{flightgear source|src/Scripting/nasal-props.cxx}}.&lt;br /&gt;
&lt;br /&gt;
== Class ==&lt;br /&gt;
=== Node ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|mode = class&lt;br /&gt;
|text = The main class, used widely for manipulating property trees.&lt;br /&gt;
}}&lt;br /&gt;
==== new() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.new([values]);&lt;br /&gt;
|text = Constructor function. Returns a new &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = values&lt;br /&gt;
|param1text = An optional hash that will be the initial property structure.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
props.dump(node);&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    a: 1,&lt;br /&gt;
    b: [&amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;],&lt;br /&gt;
    c: {&lt;br /&gt;
        d: 1 * 4&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== addChild() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.addChild(name[, min_idx[, append]]);&lt;br /&gt;
|version = 2.10&lt;br /&gt;
|commit = {{fgdata commit|a15d5829379864c7138edff621d6864c5f426d0b|t=commit}}&lt;br /&gt;
|text = Add a new, blank child to the node. Returns the newly-created node.&lt;br /&gt;
|param1 = name&lt;br /&gt;
|param1text = The name of the node as a string.&lt;br /&gt;
|param2 = min_idx&lt;br /&gt;
|param2text = This specifies the minimum index to add the new one to. This takes precedence over '''append'''. Defaults to 0.&lt;br /&gt;
|param3 = append&lt;br /&gt;
|param3text = If there is already one or more children with the same name and this argument is true (1), the new child will be added after the child with the highest index. If false (0), the new child will be added at the lowest available index with the limit of '''min_idx'''. Defaults to true (1).&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 1);&lt;br /&gt;
props.dump(node); # a[1]&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 1);&lt;br /&gt;
props.dump(node); # a[1]&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 0, false);&lt;br /&gt;
props.dump(node); # a[1] and a[0]&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 1);&lt;br /&gt;
props.dump(node); # a[1]&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 0, true);&lt;br /&gt;
props.dump(node); # a[1] and a[2]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== addChildren() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.addChildren(name, count[, min_idx[, append]]);&lt;br /&gt;
|version = 2.10&lt;br /&gt;
|commit = {{fgdata commit|7f1117a5374beabb045fb76fbb6dd8bfb0128100|t=commit}}&lt;br /&gt;
|text = Adds multiple children with the same name to this node. Returns &amp;lt;code&amp;gt;'''nil&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param1 = name&lt;br /&gt;
|param1text = The name of the nodes as a string.&lt;br /&gt;
|param2 = count&lt;br /&gt;
|param2text = Number of new children to add.&lt;br /&gt;
|param3 = min_idx&lt;br /&gt;
|param3text = Performs the same function as in &amp;lt;code&amp;gt;[[#addChild.28.29|Node.addChild()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param4 = append&lt;br /&gt;
|param4text = Performs the same function as in &amp;lt;code&amp;gt;[[#addChild.28.29|Node.addChild()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2);&lt;br /&gt;
props.dump(node); # a[0] and a[1]&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2, 1);&lt;br /&gt;
props.dump(node); # a[1] and a[2]&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 2);&lt;br /&gt;
props.dump(node); # a[2]&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2, 0, 0);&lt;br /&gt;
props.dump(node); # a[2], a[0], and a[1]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== adjustValue() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.adjustValue(delta);&lt;br /&gt;
|text = Adds delta (numeric) to current value respecting the node type. &lt;br /&gt;
|param1 = delta&lt;br /&gt;
|param1text = Numeric value (can be negative) to add to current node value.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== alias() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.alias(node, chainListener=0);&lt;br /&gt;
|text = Aliases this node to another one. Returns 1 on success and 0 on failure.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = The node to alias to. Can be one of:&lt;br /&gt;
* A path to a property in the [[Property Tree]] as a string.&lt;br /&gt;
* A &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost.&lt;br /&gt;
* A &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.alias(&amp;quot;/position/altitude-ft&amp;quot;);&lt;br /&gt;
props.dump(node); # equals the current altitude&lt;br /&gt;
|example2 = var node1 = props.Node.new();&lt;br /&gt;
node1.setDoubleValue(2.34);&lt;br /&gt;
var node2 = props.Node.new();&lt;br /&gt;
node2.alias(node1);&lt;br /&gt;
props.dump(node2); # equals 2.34&lt;br /&gt;
|param2=chainListener|param2text=Specify if listeners should work on aliased properties or not. Current default is false forbackwards compatability.}}&lt;br /&gt;
&lt;br /&gt;
==== clearValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.clearValue();&lt;br /&gt;
|text = Clears the value and type of the node.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(2.34);&lt;br /&gt;
props.dump(node); # prints &amp;quot;{DOUBLE} = 2.35&amp;quot;&lt;br /&gt;
node.clearValue();&lt;br /&gt;
props.dump(node); # prints &amp;quot;{NONE} = nil&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== decrement() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.decrement(n = 1);&lt;br /&gt;
|text = Decrements integer property by n (default: n = 1)&lt;br /&gt;
|param1 = n&lt;br /&gt;
|param1text = Value to subtract, will be converted to int, defaults to 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== equals() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.equals(node);&lt;br /&gt;
|version = 2.12&lt;br /&gt;
|commit = {{fgdata commit|d80722065f3c11e0511fa888b1f5f310dd0183e3|t=commit}}&lt;br /&gt;
|text = Checks whether the node refers to the same one as another. Returns 1 (true) if it is, and 0 (false) if otherwise.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = Node to check against. May be either a &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost or a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object.&lt;br /&gt;
|example1 = var n = props.Node.new();&lt;br /&gt;
var a = n;&lt;br /&gt;
print(a.equals(n)); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getAliasTarget() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getAliasTarget();&lt;br /&gt;
|text = Returns the alias target of a node as another &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|example1 = setprop(&amp;quot;/test&amp;quot;, 2.35);&lt;br /&gt;
var node = props.Node.new();&lt;br /&gt;
node.alias(&amp;quot;/test&amp;quot;);&lt;br /&gt;
var tgt = node.getAliasTarget();&lt;br /&gt;
print(tgt.getPath()); # prints &amp;quot;/test&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getAttribute() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getAttribute([rel_path, ]name);&lt;br /&gt;
props.Node.getAttribute();&lt;br /&gt;
|text = Returns an attribute. If no arguments are given, the function will return an integer specifying the attributes set for the node (see {{simgear source|simgear/props/props.hxx|l=767}} for a list). A list of attributes are below&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! String !! Return value&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} last {{!!}} The highest used attribute code (should be 128). See for {{simgear source|simgear/props/props.hxx|l=767}} the codes.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} children {{!!}} Number of child nodes.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} listeners {{!!}} Number of listeners connected to this node.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} references {{!!}} Number of times the node has previously been referenced.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} tied {{!!}} Whether the node is tied.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} alias {{!!}} Whether the node is aliased.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} readable {{!!}} Whether the node can be read.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} writable {{!!}} Whether the node can be written to.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} archive {{!!}} Whether the node will be saved when the &amp;quot;save&amp;quot; [[fgcommands|fgcommand]] is triggered.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} trace-read {{!!}} Whether the reading of the node will be logged when &amp;lt;code&amp;gt;--log-level=info&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} trace-write {{!!}} Whether the writing to the node will be logged when &amp;lt;code&amp;gt;--log-level=info&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} userarchive {{!!}} Whether the node will be saved to the [[FlightGear configuration via XML#autosave.xml|autosave file]] (only works for actual properties).&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} preserve {{!!}} Whether the value of node will be preserved during resets (only works for actual properties).&lt;br /&gt;
{{!}}}&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = name&lt;br /&gt;
|param2text = Attribute as a string. See the above table for a full list.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
var child = node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
print(node.getAttribute(&amp;quot;children&amp;quot;)); # prints &amp;quot;1&amp;quot;&lt;br /&gt;
|example2text = Example using relative path&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
var child = node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
print(node.getAttribute(&amp;quot;a&amp;quot;, &amp;quot;readable&amp;quot;)); # prints &amp;quot;1&amp;quot; (node can be read from)&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
var node2 = props.Node.new();&lt;br /&gt;
node2.alias(node);&lt;br /&gt;
print(node2.getAttribute(&amp;quot;alias&amp;quot;)); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
|example4 = print(props.globals.getNode(&amp;quot;/sim/signals/fdm-initialized&amp;quot;).getAttribute(&amp;quot;listeners&amp;quot;)); # prints the number of listeners&lt;br /&gt;
|example5 = print(props.globals.getNode(&amp;quot;/sim/time/elapsed-sec&amp;quot;).getAttribute(&amp;quot;tied&amp;quot;)); # prints &amp;quot;1&amp;quot; (true), meaning it is tied&lt;br /&gt;
|example6 = var node = props.Node.new();&lt;br /&gt;
print(node.getAttribute(&amp;quot;writable&amp;quot;)); # prints &amp;quot;1&amp;quot; (true), meaning the node can be written to&lt;br /&gt;
|example7text = Example using no arguments&lt;br /&gt;
|example7 = var node = props.Node.new();&lt;br /&gt;
print(node.getAttribute()); # prints &amp;quot;3&amp;quot; (true), meaning the node can be read from (1) and written to (2)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getBoolValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getBoolValue();&lt;br /&gt;
|text = Returns the value of a node converted to a boolean. If the node is a number type, 0  will return false, while 1 will return true. If the node is a string or unspecified type and the value is &amp;lt;code&amp;gt;&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt;, false will be returned. Otherwise, true will be returned. Remember that boolean values are represented in Nasal as 1 (true) and 0 (false).&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(1);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setBoolValue(0);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;false&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(1.23);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setDoubleValue(-1.23);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setDoubleValue(0.0);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;false&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setIntValue(2);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setIntValue(-2);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setIntValue(0);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;false&amp;quot;&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setValue(&amp;quot;Hello, World!&amp;quot;);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setValue(&amp;quot;false&amp;quot;);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;false&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getChild() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getChild(rel_path[, idx[, create]]);&lt;br /&gt;
|text = Returns a child of a node as another &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Relative path to the child node as a string.&lt;br /&gt;
|param2 = idx&lt;br /&gt;
|param2text = Optional index for the child node as an integer.&lt;br /&gt;
|param3 = create&lt;br /&gt;
|param3text = If set to true (1), a new child will be created if it does not exist. If set to false (0), the function will not create a new child and the function will return &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; if no child exists. Defaults to false.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
var c = node.getChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 3);&lt;br /&gt;
node.getNode(&amp;quot;a[1]&amp;quot;).setDoubleValue(2.35);&lt;br /&gt;
var c = node.getChild(&amp;quot;a&amp;quot;, 1);&lt;br /&gt;
print(c.getValue()); # prints &amp;quot;2.35&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
var c = node.getChild(&amp;quot;a&amp;quot;, 1, true);&lt;br /&gt;
props.dump(node); # new child a[1] will have appeared&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getChildren() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getChildren([name]);&lt;br /&gt;
|text = Returns a vector of child nodes, optionally those with a certain name, as &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; instances.&lt;br /&gt;
|param1 = name&lt;br /&gt;
|param1text = Optional name of the child nodes as a string. If not given, all children will be returned.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 3);&lt;br /&gt;
node.addChildren(&amp;quot;b&amp;quot;, 3);&lt;br /&gt;
debug.dump(node.getChildren()); # all child nodes in the vector&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 3);&lt;br /&gt;
node.addChildren(&amp;quot;b&amp;quot;, 3);&lt;br /&gt;
debug.dump(node.getChildren(&amp;quot;b&amp;quot;)); # only children with the name &amp;quot;b&amp;quot; in the vector&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getIndex() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getIndex();&lt;br /&gt;
|text = Returns the index of a node as an integer.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 3);&lt;br /&gt;
print(node.getChild(&amp;quot;a&amp;quot;, 1).getIndex()); # prints &amp;quot;1&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;b&amp;quot;);&lt;br /&gt;
print(node.getChild(&amp;quot;b&amp;quot;).getIndex()); # prints &amp;quot;0&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getName() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getName();&lt;br /&gt;
|text = Returns the name of the node as a string.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
var c = node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
debug.dump(c.getName()); # prints &amp;quot;a&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 3);&lt;br /&gt;
debug.dump(node.getChild(&amp;quot;a&amp;quot;, 2).getName()); # prints &amp;quot;a&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getNode() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getNode(rel_path[, create]);&lt;br /&gt;
|text = Returns a subnode as another &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Relative path to the subnode as a string.&lt;br /&gt;
|param2 = create&lt;br /&gt;
|param2text = If true (1), the node will be created if it does not exist. If false (0) and the node does not exist, the function will return &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt;. Default to false (0).&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: &amp;quot;Hello, World!&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
print(node.getNode(&amp;quot;c/d&amp;quot;).getValue()); # prints &amp;quot;Hello, World!&amp;quot;&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {}&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
node.getNode(&amp;quot;c/d&amp;quot;, true).setDoubleValue(2.35);&lt;br /&gt;
props.dump(node); # c/d now exists&lt;br /&gt;
|example3 = var ac = props.globals.getNode(&amp;quot;sim/aircraft&amp;quot;);&lt;br /&gt;
print(&amp;quot;Current aircraft is: &amp;quot;, ac.getValue());&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getParent() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getParent();&lt;br /&gt;
|text = Returns the parent of a node, or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; if there is no parent.&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: &amp;quot;Hello, World!&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
props.dump(node.getNode(&amp;quot;c/d&amp;quot;).getParent()); # dumps &amp;quot;c&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
debug.dump(node.getParent()); # prints nil&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getPath() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getPath();&lt;br /&gt;
|text = Returns the path of the node as a string.&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: &amp;quot;Hello, World!&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
print(node.getNode(&amp;quot;c/d&amp;quot;).getPath()); # prints &amp;quot;/c/d&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getType() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getType();&lt;br /&gt;
|text = Returns node's type as a string. It should be one of &amp;quot;NONE&amp;quot;, &amp;quot;ALIAS&amp;quot;, &amp;quot;BOOL&amp;quot;, &amp;quot;INT&amp;quot;, &amp;quot;LONG&amp;quot; (long integer), &amp;quot;FLOAT&amp;quot;, &amp;quot;DOUBLE&amp;quot;, &amp;quot;STRING&amp;quot;, &amp;quot;VEC3D&amp;quot;, &amp;quot;VEC4D&amp;quot;, &amp;quot;UNSPECIFIED&amp;quot;.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
print(node.getType()); # prints &amp;quot;NONE&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setIntValue(12);&lt;br /&gt;
print(node.getType()); # prints &amp;quot;INT&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setValue([0.4, 0.2, 1]);&lt;br /&gt;
debug.dump(node.getValue()); # prints &amp;quot;[0.4, 0.2, 1]&amp;quot;&lt;br /&gt;
print(node.getType()); # prints &amp;quot;VEC3D&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getValue([rel_path]);&lt;br /&gt;
|text = {{hatnote|See also {{func link|getBoolValue()|page=this}}.}}&lt;br /&gt;
&lt;br /&gt;
Returns the value of the node.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path to a subnode as a string, which may contain '/' characters. If the subnode does not exist, we return nil.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(2.35);&lt;br /&gt;
print(node.getValue()); # prints &amp;quot;2.35&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setValue(&amp;quot;Hi&amp;quot;);&lt;br /&gt;
print(node.getValue()); # prints &amp;quot;Hi&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;).setValue(&amp;quot;Hi&amp;quot;);&lt;br /&gt;
print(node.getValue(&amp;quot;a&amp;quot;)); # prints &amp;quot;Hi&amp;quot;&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setValue([0, 0.5, 1]);&lt;br /&gt;
debug.dump(node.getValue()); # prints &amp;quot;[0, 0.5, 1]&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getValues() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getValues();&lt;br /&gt;
|text = Returns the node tree as a hash, with all the various subnodes, etc. If the node has no children, the result is equivalent to {{func link|getValue()|page=this}}. Subnodes that are indexed will be combined into one key and their values placed in a vector (see example 2).&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;string&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;number&amp;quot;: 1.2,&lt;br /&gt;
    &amp;quot;subnode&amp;quot;: {&lt;br /&gt;
        &amp;quot;idx-node&amp;quot;: [1, 2, 3]&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
node.addChild(&amp;quot;bool&amp;quot;).setBoolValue(1);&lt;br /&gt;
props.dump(node); # dump to node tree&lt;br /&gt;
debug.dump(node.getValues()); # dump the node converted to hash&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: [1, 2, 3]&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
props.dump(node); # a[0] = 1, a[1] = 2, a[2] = 3&lt;br /&gt;
debug.dump(node.getValues()); # a: [1, 2, 3]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== increment() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.increment(n = 1);&lt;br /&gt;
|text = Increments integer property by n (default: n = 1)&lt;br /&gt;
|param1 = n&lt;br /&gt;
|param1text = Value to add, will be converted to int, defaults to 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== initNode() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.initNode([path[, value[, type[, force]]]]);&lt;br /&gt;
|text = Initializes a node if it doesn't exist and returns that node as a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object.&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Optional path to a subnode as a string. If not given, the node itself will be initialized.&lt;br /&gt;
|param2 = value&lt;br /&gt;
|param2text = Optional default value to initialize the node with.&lt;br /&gt;
|param3 = type&lt;br /&gt;
|param3text = Optional string that will set the type of the node. Must be one of &amp;lt;code&amp;gt;&amp;quot;DOUBLE&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;INT&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;BOOL&amp;quot;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;quot;STRING&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param4 = force&lt;br /&gt;
|param4text = If set to true (1), the node's type will be forced to change.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
var a = node.initNode(&amp;quot;a&amp;quot;);&lt;br /&gt;
props.dump(a);&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
var a = node.initNode(&amp;quot;a&amp;quot;, &amp;quot;Hi&amp;quot;);&lt;br /&gt;
props.dump(a);&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
var a = node.initNode(&amp;quot;a&amp;quot;, 1.25, &amp;quot;INT&amp;quot;);&lt;br /&gt;
props.dump(a); # a = 1&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;).setBoolValue(0);&lt;br /&gt;
props.dump(node.getChild(&amp;quot;a&amp;quot;)); # a = 0 (type: bool)&lt;br /&gt;
var a = node.initNode(&amp;quot;a&amp;quot;, 1.25, &amp;quot;INT&amp;quot;, true);&lt;br /&gt;
props.dump(a); # a = 0 (type: int)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== isInt() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.isInt();&lt;br /&gt;
|text = Returns true (1) if node '''type''' is &amp;quot;INT&amp;quot; or &amp;quot;LONG&amp;quot; (long integer) otherwise false (0).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== isNumeric() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.isNumeric();&lt;br /&gt;
|text = Returns true (1) if node '''type''' is &amp;quot;INT&amp;quot;, &amp;quot;LONG&amp;quot;, &amp;quot;FLOAT&amp;quot; or &amp;quot;DOUBLE&amp;quot; otherwise false (0).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== remove() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.remove();&lt;br /&gt;
|text = Removes the node and returns the removed node.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.getChild(&amp;quot;a&amp;quot;).remove();&lt;br /&gt;
props.dump(node); # child &amp;quot;a&amp;quot; does not exist anymore&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== removeAllChildren() ====&lt;br /&gt;
{{Caution|Be careful when  using this API in conjunction with the Canvas system and element specific properties, for details please see [[Howto:Canvas Path Benchmarking]]}}&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.removeAllChildren();&lt;br /&gt;
|version = 3.2&lt;br /&gt;
|commit = {{fgdata commit|4766ed21a68230c0c15265e5604a74f4d99e0f5d|t=commit}}&lt;br /&gt;
|text = Removes all child nodes and returns the node.&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: 2,&lt;br /&gt;
    &amp;quot;c&amp;quot;: 3&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.removeAllChildren();&lt;br /&gt;
props.dump(node); # all children have been removed&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== removeChild() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.removeChild(rel_path, idx);&lt;br /&gt;
|text = Removes a given child node child nodes and returns the node.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Relative path to a subnode as a string.&lt;br /&gt;
|param2 = idx&lt;br /&gt;
|param2text = Index of the subnode to remove as an integer.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.removeChild(&amp;quot;a&amp;quot;, 0);&lt;br /&gt;
props.dump(node); # child &amp;quot;a&amp;quot; has been removed&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.removeChild(&amp;quot;a&amp;quot;, 0);&lt;br /&gt;
props.dump(node); # just a[1] remains&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== removeChildren() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.removeChildren([name]);&lt;br /&gt;
|text = Removes all children with a specified name. If no arguments are given, all children will be removed (see also {{func link|removeAllChildren()|page=this}}).&lt;br /&gt;
|param1 = name&lt;br /&gt;
|param1text = Optional name of children to remove as a string.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2);&lt;br /&gt;
node.addChildren(&amp;quot;b&amp;quot;, 2);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.removeChildren(&amp;quot;a&amp;quot;);&lt;br /&gt;
props.dump(node); # just children named &amp;quot;b&amp;quot; remain&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2);&lt;br /&gt;
node.addChildren(&amp;quot;b&amp;quot;, 2);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.removeChildren();&lt;br /&gt;
props.dump(node); # all children removed&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setAttribute() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setAttribute([rel_path, ]attr, value);&lt;br /&gt;
props.Node.setAttribute(attrs);&lt;br /&gt;
|text = Sets an attribute or multiple attributes. A list of attributes and their codes are below. For a brand new node, the default attributes are ''readable'' and ''writable''. Returns an integer specifying the old attributes.&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! String !! Description&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} readable {{!!}} Whether the node can be read.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} writable {{!!}} Whether the node can be written to.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} archive {{!!}} Whether the node will be saved when the &amp;quot;save&amp;quot; [[fgcommands|fgcommand]] is triggered.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} trace-read {{!!}} Whether the reading of the node will be logged when &amp;lt;code&amp;gt;--log-level=info&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} trace-write {{!!}} Whether the writing to the node will be logged when &amp;lt;code&amp;gt;--log-level=info&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} userarchive {{!!}} Whether the node will be saved to the [[FlightGear configuration via XML#autosave.xml|autosave file]] (only works for actual properties).&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} preserve {{!!}} Whether the value of node will be preserved during resets (only works for actual properties).&lt;br /&gt;
{{!}}}&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = attr&lt;br /&gt;
|param2text = Name of attribute to set as a string. See above.&lt;br /&gt;
|param3 = value&lt;br /&gt;
|param3text = Boolean value to set the property to.&lt;br /&gt;
|param4 = attrs&lt;br /&gt;
|param4text = When the function is used in its second form, this argument is used. This argument should be an integer specifying which arguments are set to true. See {{simgear source|simgear/props/props.hxx|l=767}} for the full list of codes. Simply add codes of the desired attributes together.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setAttribute(&amp;quot;trace-write&amp;quot;, 1);&lt;br /&gt;
node.setIntValue(12); # will be traced&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setAttribute(&amp;quot;readable&amp;quot;, 0);&lt;br /&gt;
var val = node.getValue();&lt;br /&gt;
debug.dump(val); # prints &amp;quot;nil&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
node.setAttribute(&amp;quot;a&amp;quot;, &amp;quot;trace-write&amp;quot;, 1);&lt;br /&gt;
node.getChild(&amp;quot;a&amp;quot;).setIntValue(12); # will be traced&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setAttribute(35); # read + write + trace-write&lt;br /&gt;
node.setIntValue(12); # will be traced&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setBoolValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setBoolValue([rel_path, ]value);&lt;br /&gt;
|text = Sets a node to a boolean value. If the node has no type, it will be set to a bool type. If the node is already a number type, it will be set to either 1 or 0. If it is a string, it will be set to either &amp;quot;true&amp;quot; or &amp;quot;false&amp;quot;. Returns 1 (true) if the operation was successful.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = value&lt;br /&gt;
|param2text = Value to set the node to, will be interpreted into a boolean. If it is &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt;, it will be false. If it is a string, it will be false. If it is a number, 0 will be false, while other numbers will be true. All other cases will be interpreted as 0.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(nil);&lt;br /&gt;
props.dump(node); # node = 0 (false)&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(&amp;quot;Hi&amp;quot;);&lt;br /&gt;
props.dump(node); # node = 1 (true)&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(0);&lt;br /&gt;
props.dump(node); # node = 0 (false)&lt;br /&gt;
node.setBoolValue(1.25);&lt;br /&gt;
props.dump(node); # node = 1 (true)&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setValue(&amp;quot;String&amp;quot;);&lt;br /&gt;
props.dump(node); # node = &amp;quot;String&amp;quot; (type: string)&lt;br /&gt;
node.setBoolValue(1);&lt;br /&gt;
props.dump(node); # node = &amp;quot;true&amp;quot;&lt;br /&gt;
|example5 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(12.32);&lt;br /&gt;
props.dump(node); # node = 12.32 (type: double)&lt;br /&gt;
node.setBoolValue(1);&lt;br /&gt;
props.dump(node); # node = 1&lt;br /&gt;
|example6 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
node.setBoolValue(&amp;quot;a&amp;quot;, 1);&lt;br /&gt;
props.dump(node); # /a = 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setDoubleValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setDoubleValue([rel_path, ]value);&lt;br /&gt;
|text = Sets a node to a double value. If the node has no type, it will be set to a double type. If the node is a bool, values different from zero will be interpreted as true. If the node is a string, the value will be converted to a string. If the node is an integer type, it will be truncated to the closest integer to zero. Returns 1 (true) if the operation was successful.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = value&lt;br /&gt;
|param2text = Value to set the node to, will be interpreted into a double number. It must be a valid number or a string that can be converted to a number.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(1.1);&lt;br /&gt;
props.dump(node); # node = 1.1 (type: double)&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(&amp;quot;1.1&amp;quot;);&lt;br /&gt;
props.dump(node); # node = 1.1 (type: double)&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(1);&lt;br /&gt;
node.setDoubleValue(&amp;quot;1.1&amp;quot;);&lt;br /&gt;
props.dump(node); # node = 1 (type: bool)&lt;br /&gt;
node.setDoubleValue(0.0);&lt;br /&gt;
props.dump(node); # node = 0 (type: bool)&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setIntValue(1);&lt;br /&gt;
node.setDoubleValue(1.1);&lt;br /&gt;
props.dump(node); # node = 1 (type: int)&lt;br /&gt;
node.setDoubleValue(&amp;quot;-1.1&amp;quot;);&lt;br /&gt;
props.dump(node); # node = -1 (type: int)&lt;br /&gt;
|example5 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
node.setDoubleValue(&amp;quot;a&amp;quot;, 12.2);&lt;br /&gt;
props.dump(node); # /a = 12.2&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setIntValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setIntValue([rel_path, ]value);&lt;br /&gt;
|text = Sets a node to an integer value. If the node has no type, it will be set to a integer type. If the node is a bool, values different from zero will be interpreted as true. If the node is a string, the value will be converted to a string. Returns 1 (true) if the operation was successful.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = value&lt;br /&gt;
|param2text = Value to set the node to, will be interpreted into a integer. It must be a valid number or a string that can be converted to a number. If the number is a double, it will be truncated to the closest integer to zero.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setIntValue(12);&lt;br /&gt;
props.dump(node); # node = 12&lt;br /&gt;
node.setIntValue(&amp;quot;6&amp;quot;);&lt;br /&gt;
props.dump(node); # node = 6&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setIntValue(12.2);&lt;br /&gt;
props.dump(node); # node = 12&lt;br /&gt;
node.setIntValue(-12.2);&lt;br /&gt;
props.dump(node); # node = 12&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(1);&lt;br /&gt;
node.setIntValue(12.5);&lt;br /&gt;
props.dump(node); # node = 1 (type: bool)&lt;br /&gt;
node.setIntValue(0);&lt;br /&gt;
props.dump(node); # node = 0 (type: bool)&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setValue(&amp;quot;Hi&amp;quot;);&lt;br /&gt;
node.setIntValue(12);&lt;br /&gt;
props.dump(node); # node = &amp;quot;12&amp;quot; (type: string)&lt;br /&gt;
|example5 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
node.setIntValue(&amp;quot;a&amp;quot;, 12);&lt;br /&gt;
props.dump(node); # /a = 12&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setValue([rel_path, ]value);&lt;br /&gt;
|text = {{hatnote|See also {{func link|setBoolValue()|page=this}}, {{func link|setDoubleValue()|page=this}}, and {{func link|setIntValue()|page=this}}.}}&lt;br /&gt;
&lt;br /&gt;
Sets a node to a given value. See table below for conversions and effects. Note that vec3d and vec4d types are not fully integrated into SGPropertyNode. Returns 1 (true) if the operation was successful.&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}} colspan=&amp;quot;2&amp;quot; style=&amp;quot;text-align:right&amp;quot; {{!}} '''value''' type → &lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; {{!}} Number&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; {{!}} String &lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; {{!}} Vector&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} style=&amp;quot;text-align:left&amp;quot; {{!}} Current node&amp;lt;br&amp;gt;type ↓&lt;br /&gt;
{{!}} style=&amp;quot;text-align:right&amp;quot; {{!}} Result ↘&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} None/unspecified&lt;br /&gt;
{{!}}&lt;br /&gt;
* Type set to &amp;lt;code&amp;gt;double&amp;lt;/code&amp;gt;&lt;br /&gt;
* Node set to '''value'''.&lt;br /&gt;
{{!}}&lt;br /&gt;
* Type set to &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt;&lt;br /&gt;
* Node set to '''value'''.&lt;br /&gt;
{{!}}&lt;br /&gt;
* Type set to &amp;lt;code&amp;gt;vec*d&amp;lt;/code&amp;gt;&lt;br /&gt;
* Node set to '''value'''.&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} Bool&lt;br /&gt;
{{!}}&lt;br /&gt;
* If '''value''' != 0, node set to true.&lt;br /&gt;
* If '''value''' == 0, node set to false.&lt;br /&gt;
{{!}}&lt;br /&gt;
* If '''value''' == &amp;quot;true&amp;quot;, node set to true.&lt;br /&gt;
* If '''value''' can be converted to an integer,&amp;lt;br&amp;gt;and != 0, node set to true.&lt;br /&gt;
{{!}} Node set to true.&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} Integer&lt;br /&gt;
{{!}} Node set to truncated '''value'''&lt;br /&gt;
{{!}} Node set to '''value ''' converted and truncated to an integer.&lt;br /&gt;
{{!}} Node set to 1.&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} Double&lt;br /&gt;
{{!}} Node set to '''value'''.&lt;br /&gt;
{{!}} Node set to '''value''' converted to number.&lt;br /&gt;
{{!}} Throws an error (vector is not a number).&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} String&lt;br /&gt;
{{!}} Node set to '''value''' converted to string. {{!!}} Node set to '''value'''. {{!!}} Node not set.&lt;br /&gt;
{{!}}}&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = value&lt;br /&gt;
|param2text = Value to set the node to. Must be a string, a valid number, or a vector consisting of 3 or 4 numbers. See table above for conversions and effects.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setValue(&amp;quot;Hi&amp;quot;);&lt;br /&gt;
props.dump(node); # node = &amp;quot;Hi&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
node.setValue(&amp;quot;a&amp;quot;, &amp;quot;Hi&amp;quot;);&lt;br /&gt;
props.dump(node); # \a = &amp;quot;Hi&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setValue([0.4, 0.2, 1]);&lt;br /&gt;
debug.dump(node.getValue()); # prints &amp;quot;[0.4, 0.2, 1]&amp;quot;&lt;br /&gt;
print(node.getType()); # prints &amp;quot;VEC3D&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setValues() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setValues(val);&lt;br /&gt;
|text = {{hatnote|See also {{func link|getValues()|page=this}}.}}&lt;br /&gt;
&lt;br /&gt;
Sets the nodes property tree from a Nasal hash. Scalars will become nodes in the tree and hashes will become named subnodes. Vectors will be converted into indexed nodes, with the values in the vector becoming their values (see examples below).&lt;br /&gt;
|param1 = val&lt;br /&gt;
|param1text = A hash that will become the property tree.&lt;br /&gt;
|example1 = var val = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 100 # &amp;quot;a&amp;quot; will become the subnode's name, and 100 its value&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new();&lt;br /&gt;
node.setValues(val);&lt;br /&gt;
props.dump(node); # dump tree&lt;br /&gt;
|example2 = var val = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: [1, 2, 3]&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new();&lt;br /&gt;
node.setValues(val);&lt;br /&gt;
props.dump(node); # dump tree&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== unalias() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.unalias();&lt;br /&gt;
|text = Un-aliases the node and returns it to a blank state. Returns 1 on success and 0 on failure (e.g., when used on a tied property).&lt;br /&gt;
|example2 = var node1 = props.Node.new();&lt;br /&gt;
node1.setDoubleValue(2.35);&lt;br /&gt;
var node2 = props.Node.new();&lt;br /&gt;
node2.alias(node1);&lt;br /&gt;
&lt;br /&gt;
props.dump(node2); # equals 2.35&lt;br /&gt;
node2.unalias();&lt;br /&gt;
props.dump(node2); # no value or type&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== toggleBoolValue() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = toggleBoolValue();&lt;br /&gt;
|text = Toggle a boolean property. You have to make sure the property is of type bool!&lt;br /&gt;
|example1 = var b = props.Node.new().initNode(&amp;quot;/_test/bool&amp;quot;, 1, &amp;quot;BOOL&amp;quot;);&lt;br /&gt;
print(&amp;quot;bool &amp;quot;, b.getValue());&lt;br /&gt;
b.toggleBoolValue();&lt;br /&gt;
print(&amp;quot;after toggleBoolValue &amp;quot;, b.getValue());&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
=== compileCondition() ===&lt;br /&gt;
{{see also|Conditions}}&lt;br /&gt;
&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.compileCondition(node);&lt;br /&gt;
|version = 3.2&lt;br /&gt;
|commit = {{fgdata commit|43f8ce08706629e69984b1cc34e5e979d03ef09a|t=commit}}&lt;br /&gt;
|text = Compiles a [[conditions|condition]] property branch and returns a &amp;lt;code&amp;gt;Condition&amp;lt;/code&amp;gt; ghost object or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; on error. This ghost will contain a &amp;lt;code&amp;gt;test()&amp;lt;/code&amp;gt; function that will return the result of the condition as either 1 (true) or 0 (false).&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = Either a props.Node containing the condition, or a string specifying a place in the [[Property Tree]] where there is a condition branch.&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;equals&amp;quot;: {&lt;br /&gt;
        &amp;quot;property&amp;quot;: '/test',&lt;br /&gt;
        &amp;quot;value&amp;quot;: 12&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 12);&lt;br /&gt;
&lt;br /&gt;
var cond = props.compileCondition(node);&lt;br /&gt;
print(cond.test()); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 15);&lt;br /&gt;
print(cond.test()); # prints &amp;quot;0&amp;quot; (false)&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    &amp;quot;equals&amp;quot;: {&lt;br /&gt;
        &amp;quot;property&amp;quot;: '/test',&lt;br /&gt;
        &amp;quot;value&amp;quot;: 12&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
props.globals.getNode(&amp;quot;test2/condition&amp;quot;, 1).setValues(tree); # place it in the Property Tree&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 12);&lt;br /&gt;
&lt;br /&gt;
var cond = props.compileCondition(node);&lt;br /&gt;
print(cond.test()); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 15);&lt;br /&gt;
print(cond.test()); # prints &amp;quot;0&amp;quot; (false)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== condition() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.condition(node);&lt;br /&gt;
|text = Evaluates a [[conditions|condition]] property branch and returns the result as a boolean.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = Either a props.Node containing the condition, or a string specifying a place in the [[Property Tree]] where there is a condition branch.&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;equals&amp;quot;: {&lt;br /&gt;
        &amp;quot;property&amp;quot;: '/test',&lt;br /&gt;
        &amp;quot;value&amp;quot;: 12&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 12);&lt;br /&gt;
&lt;br /&gt;
print(props.condition(node)); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 15);&lt;br /&gt;
print(props.condition(node)); # prints &amp;quot;0&amp;quot; (false)&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    &amp;quot;equals&amp;quot;: {&lt;br /&gt;
        &amp;quot;property&amp;quot;: '/test',&lt;br /&gt;
        &amp;quot;value&amp;quot;: 12&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
props.globals.getNode(&amp;quot;test2/condition&amp;quot;, 1).setValues(tree); # place it in the Property Tree&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 12);&lt;br /&gt;
&lt;br /&gt;
print(props.condition(node)); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 15);&lt;br /&gt;
print(props.condition(node)); # prints &amp;quot;0&amp;quot; (false)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== copy() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.copy(src, dest[, attr]);&lt;br /&gt;
|text = Copies the property tree of the source into the destination node. Note that aliased properties will not be copied.&lt;br /&gt;
|param1 = src&lt;br /&gt;
|param1text = Source &amp;lt;code&amp;gt;props.Node object&amp;lt;/code&amp;gt; to copy from.&lt;br /&gt;
|param2 = dest&lt;br /&gt;
|param2text = Destination &amp;lt;code&amp;gt;props.Node object&amp;lt;/code&amp;gt; to copy to.&lt;br /&gt;
|param3 = attr&lt;br /&gt;
|param3text = If set to true (1), attributes will also be copied. Defaults to false (0).&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1.5,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: [1, 2, 3]&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var src = props.Node.new(tree);&lt;br /&gt;
var dest = props.Node.new();&lt;br /&gt;
props.copy(src, dest);&lt;br /&gt;
props.dump(dest);&lt;br /&gt;
|example2 = var src = props.Node.new();&lt;br /&gt;
var a = src.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
a.setAttribute(&amp;quot;trace-write&amp;quot;, 1);&lt;br /&gt;
a.setIntValue(12);&lt;br /&gt;
var dest = props.Node.new();&lt;br /&gt;
props.copy(src, dest, true);&lt;br /&gt;
print(dest.getNode(&amp;quot;a&amp;quot;).getAttribute(&amp;quot;trace-write&amp;quot;)); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== dump() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.dump(node);&lt;br /&gt;
|text = Recursively dump the state of a node into the console, showing value and type of each node. Note that as of 10/2016, the value of vec*d type nodes cannot be dumped.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = Node to dump.&lt;br /&gt;
|example1 = var node = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 12,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: [1, 2, 3]&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
props.dump(node); # dump into console&lt;br /&gt;
|example2 = # Dump the entire Property Tree&lt;br /&gt;
# Warning! This is an intensive operation!&lt;br /&gt;
props.dump(props.globals);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== getNode() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.getNode();&lt;br /&gt;
|version = 3.2&lt;br /&gt;
|commit = {{fgdata commit|807062d0b6f858885547f27325e829c2bf42a12b|t=commit}}&lt;br /&gt;
|text = Shortcut for &amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot; inline&amp;gt;props.globals.getNode()&amp;lt;/syntaxhighlight&amp;gt;. See {{func link|getNode()||Node|page=this}} for full documentation.&lt;br /&gt;
|example1 = print(&amp;quot;Current aircraft is: &amp;quot;, props.getNode(&amp;quot;/sim/aircraft&amp;quot;).getValue());&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== nodeList() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.nodeList(arg[, arg[, ...]]);&lt;br /&gt;
|text = Converts its arguments into a vector of node objects if possible and returns that vector. &lt;br /&gt;
|param1 = arg&lt;br /&gt;
|param1text = Object to operate on. Must be a node object, string, vector, hash, function, or &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost. Vectors and hashes must contain any of the other acceptable types, functions must return any of the other types, strings will be assumed to be paths to global properties, and ghosts will be converted into node objects. There may be any number of arguments.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
var f = func(){&lt;br /&gt;
    var n = props.Node.new();&lt;br /&gt;
    return n._g;&lt;br /&gt;
}&lt;br /&gt;
var list = props.nodeList(node,&lt;br /&gt;
    &amp;quot;/sim/aircraft&amp;quot;,&lt;br /&gt;
    [&amp;quot;/sim/fg-root&amp;quot;],&lt;br /&gt;
    { &amp;quot;path&amp;quot;: &amp;quot;/sim/fg-home&amp;quot; },&lt;br /&gt;
    f&lt;br /&gt;
);&lt;br /&gt;
debug.dump(list); # dump list&lt;br /&gt;
|example2 = var root = &amp;quot;/sim/version/&amp;quot;;&lt;br /&gt;
var info = [&lt;br /&gt;
    root ~ &amp;quot;build-id&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;build-number&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;flightgear&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;hla-support&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;openscenegraph&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;revision&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;simgear&amp;quot;&lt;br /&gt;
];&lt;br /&gt;
info = props.nodeList(info); # turn into list of nodes&lt;br /&gt;
foreach(var n; info){&lt;br /&gt;
    print(n.getValue()); # dump info&lt;br /&gt;
}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== runBinding() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.runBinding(node[, module]);&lt;br /&gt;
|text = Runs a [[Bindings|binding]] element in a node object. Returns 1 (true) on success and 0 (false) on failure.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = A {{tag|binding}} element as a node object.&lt;br /&gt;
|param2 = module&lt;br /&gt;
|param2text = Optional string specifying a module to run Nasal scripts in if the command is &amp;lt;code&amp;gt;nasal&amp;lt;/code&amp;gt;. This argument will not override any {{tag|module}} element in the '''node'''&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;command&amp;quot;: &amp;quot;dialog-show&amp;quot;,&lt;br /&gt;
    &amp;quot;dialog-name&amp;quot;: &amp;quot;map&amp;quot; # open map&lt;br /&gt;
};&lt;br /&gt;
var binding = props.Node.new(tree);&lt;br /&gt;
props.runBinding(binding);&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    &amp;quot;command&amp;quot;: &amp;quot;nasal&amp;quot;,&lt;br /&gt;
    &amp;quot;script&amp;quot;: 'print(pi)' # prints value of math.pi&lt;br /&gt;
};&lt;br /&gt;
var binding = props.Node.new(tree);&lt;br /&gt;
props.runBinding(binding, &amp;quot;math&amp;quot;);&lt;br /&gt;
|example3 = var tree = {&lt;br /&gt;
    &amp;quot;command&amp;quot;: &amp;quot;nasal&amp;quot;,&lt;br /&gt;
    &amp;quot;script&amp;quot;: 'print(pi)', # prints value of math.pi&lt;br /&gt;
    &amp;quot;module&amp;quot;: &amp;quot;math&amp;quot; # this is used&lt;br /&gt;
};&lt;br /&gt;
var binding = props.Node.new(tree);&lt;br /&gt;
props.runBinding(binding, &amp;quot;debug&amp;quot;);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== setAll() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.setAll(base, child, value);&lt;br /&gt;
|text = Sets indexed subnodes in the Property Tree with the same name to the same value.&lt;br /&gt;
|param1 = base&lt;br /&gt;
|param1text = Base path to the nodes.&lt;br /&gt;
|param2 = child&lt;br /&gt;
|param2text = Path to child nodes.&lt;br /&gt;
|param3 = value&lt;br /&gt;
|param3text = Value to set the subnodes to.&lt;br /&gt;
|example1 = # apply 50% throttle to all engines&lt;br /&gt;
props.setAll(&amp;quot;/controls/engines/engine&amp;quot;, &amp;quot;throttle&amp;quot;, 0.5);&lt;br /&gt;
|example2 = var nodes = props.globals.addChildren(&amp;quot;/test&amp;quot;, 3);&lt;br /&gt;
foreach(var node; nodes){&lt;br /&gt;
    node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
props.setAll(&amp;quot;/test&amp;quot;, &amp;quot;a&amp;quot;, &amp;quot;Hi&amp;quot;); # set all children (test[*]/a) to &amp;quot;Hi&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== wrap() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.wrap(node);&lt;br /&gt;
|text = Turns &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghosts, either in a vector or single, into &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; objects.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost or vector of such ghosts.&lt;br /&gt;
|example1 = var ghost = canvas._newCanvasGhost();&lt;br /&gt;
var node = props.wrap(ghost._node_ghost);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
|example2 = var vector = [canvas._newCanvasGhost()._node_ghost, props.Node.new()._g];&lt;br /&gt;
var nodes = props.wrap(vector);&lt;br /&gt;
foreach(var node; nodes){&lt;br /&gt;
    props.dump(node);&lt;br /&gt;
    print(&amp;quot;----&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== wrapNode() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.wrapNode(node);&lt;br /&gt;
|text = Turns a &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost into a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost to convert.&lt;br /&gt;
|example1 = var ghost = canvas._newCanvasGhost();&lt;br /&gt;
var node = props.wrapNode(ghost._node_ghost);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Variable ==&lt;br /&gt;
=== globals ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.globals;&lt;br /&gt;
|text = Exposes the [[Property Tree]] as a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
|example1 = print(&amp;quot;Current aircraft: &amp;quot;, props.globals.getNode(&amp;quot;/sim/aircraft&amp;quot;).getValue());&lt;br /&gt;
|example2text = Alternative using {{func link|getprop()}}.&lt;br /&gt;
|example2 = print(&amp;quot;Current aircraft: &amp;quot;, getprop(&amp;quot;/sim/aircraft&amp;quot;));&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Nasal namespaces}}&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=YASim&amp;diff=143752</id>
		<title>YASim</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=YASim&amp;diff=143752"/>
		<updated>2026-03-19T21:00:59Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Variable tail incidence / elevator trim */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:yasimlogo.png|thumb]] &lt;br /&gt;
&lt;br /&gt;
'''YASim''' is one of two [[flight dynamics model]]s commonly used in [[FlightGear]], alongside [[JSBSim]]. The flight dynamics model (FDM) determines how the [[aircraft]] moves and flies.&lt;br /&gt;
&lt;br /&gt;
Gary Neely wrote in his [http://www.buckarooshangar.com/flightgear/ introduction to YASim]:&lt;br /&gt;
&lt;br /&gt;
:''The FDM is the mathematical model that controls the physics of flight within the simulator. The physical 3D aircraft model has nothing to do with flight dynamics-- in essence it's just a picture to look at. It's the FDM that dictates how the model flies.''&lt;br /&gt;
&lt;br /&gt;
:''Why YASim? YASim uses the geometry of the aircraft to generate the base flight characteristics. While this suggests a 'realistic' or out-of-the-box approach, it is a only rough approximation that will require much tweaking before you get a result that approaches realism. If you have solid flight data for your aircraft such as wind-tunnel data or you are looking to eventually generate a hyper-realistic simulation, JSBSim is probably a better approach. If you lack such data but know the geometry of the aircraft and have access to the same flight characteristics and limits as a real pilot would, then YASim can provide a solution that is more than sufficient for most simulation needs.''&lt;br /&gt;
&lt;br /&gt;
== Coordinate system notes ==&lt;br /&gt;
All positions specified are in metres (which is weird, since all other units in the file are English). The X axis points forward, Y is left, and Z is up. Take your right hand, and hold it like a gun. Your first and second fingers are the X and Y axes, and your upwards-pointing thumb is the Z. This is slightly different from the coordinate system used by [[JSBSim]]. Sorry. The origin can be placed anywhere, so long as you are consistent. I use the nose of the aircraft.&lt;br /&gt;
&lt;br /&gt;
(In the [[JSBSim_Aerodynamics#Frames|JSBSim coordinate system]], X and Z are the same as in YASim, but Y points to the right instead of left.)&lt;br /&gt;
&lt;br /&gt;
=== Checking alignment with Blender ===&lt;br /&gt;
&lt;br /&gt;
Blender can display a '''.ac''' model and a yasim model at the same time, allowing one to check whether the wings, gear contact points etc are aligned correctly. But it seems that Blender ignores any top-level &amp;lt;code&amp;gt;loc &amp;lt;x&amp;gt; &amp;lt;y&amp;gt; &amp;lt;z&amp;gt;&amp;lt;/code&amp;gt; specification in the '''.ac''' file, which makes it non-trivial to check alignment if such a specification is used.&lt;br /&gt;
&lt;br /&gt;
== YASim design notes ==&lt;br /&gt;
Andy Ross's original design notes for YASim can be found in [https://pdfhost.io/v/~iYsLl7xS_alldvi.pdf this PDF file]. These provide some useful background for how YASim works.&lt;br /&gt;
&lt;br /&gt;
== XML Elements ==&lt;br /&gt;
&amp;lt;!-- To future editors:  The all lowercase headings are XML tags and should ''probably'' be left that way --&amp;gt;&lt;br /&gt;
=== airplane ===&lt;br /&gt;
The top-level element for the file. It contains the following attributes: &lt;br /&gt;
* '''mass:''' The empty (no fuel) weight, in pounds. It does include the weight of the engine(s), so when you add the engine weight in its tag, it acts just like a ballast.&lt;br /&gt;
* '''version:''' The version attribute is used to maintain compatibility when updating yasim (e.g. bugfixes). If this attribute i not given, the original version will be used. Several bugfixes to YASim were implemented in FlightGear 3.2 (see [[FlightGear Newsletter April 2014]]), some more are fixed in FlightGear 2017.2. &lt;br /&gt;
Available versions are:&lt;br /&gt;
* &amp;lt;code&amp;gt;YASIM_VERSION_ORIGINAL&amp;lt;/code&amp;gt; explicitly use the old buggy calculations (same as no version attribute at all)&lt;br /&gt;
* &amp;lt;code&amp;gt;YASIM_VERSION_32&amp;lt;/code&amp;gt; enable bugfixes up to version 3.2&lt;br /&gt;
* &amp;lt;code&amp;gt;2017.2&amp;lt;/code&amp;gt; enable bugfixes up to version 2017.2&lt;br /&gt;
* &amp;lt;code&amp;gt;2018.1&amp;lt;/code&amp;gt; (FIXME) no bugfixes by now. Use this version if your aircraft makes use of new features in YASim 2018.1 so it will cause at least a warning with older FG versions. &lt;br /&gt;
* &amp;lt;code&amp;gt;YASIM_VERSION_CURRENT&amp;lt;/code&amp;gt; use latest version compiled into the users FlightGear. &lt;br /&gt;
{{Warning| Using YASIM_VERSION_CURRENT might make the aircraft unusable in case of future changes to YASim without updating the aircraft accordingly.}}&lt;br /&gt;
&lt;br /&gt;
'''New in 2018.1'''&lt;br /&gt;
*  '''mtow-lbs''' and '''mtow-kg:''' use one of them to specify max. takeoff weight. Does not affect the FDM, but is used by CLI tool to calculate some numbers.&lt;br /&gt;
&lt;br /&gt;
=== approach ===&lt;br /&gt;
The approach parameters for the aircraft. The solver will generate an aircraft that matches these settings (by adjusting the parameters of the surface like drag and lift). It is extremely important to give parameters which could be really achieved by defined aircraft geometry, otherwise, it gives an unstable or not flyable result. The element can (and should) contain &amp;lt;control&amp;gt; elements indicating pilot input settings, such as flaps and throttle, for the approach.&lt;br /&gt;
&lt;br /&gt;
* '''speed:''' The approach airspeed, in knots TAS.&lt;br /&gt;
* '''aoa:''' The approach angle of attack, in degrees&lt;br /&gt;
* '''fuel:''' Fraction (0-1) of fuel in the tanks. Default is 0.2.&lt;br /&gt;
&lt;br /&gt;
=== cruise ===&lt;br /&gt;
The cruise speed and altitude for the solver to match. As above, this should contain &amp;lt;control&amp;gt; elements indicating aircraft configuration. Especially, make sure the engines are generating enough thrust at cruise!&lt;br /&gt;
* '''speed:''' The cruise speed, in knots TAS.&lt;br /&gt;
* '''alt:''' The cruise altitude, in feet MSL.&lt;br /&gt;
* '''fuel:''' Fraction (0-1) of fuel in the tanks. Default is 0.2.&lt;br /&gt;
=== cockpit ===&lt;br /&gt;
The location of the cockpit (pilot eyepoint).&lt;br /&gt;
* '''x,y,z:''' eyepoint location (see coordinates note)&lt;br /&gt;
&lt;br /&gt;
=== fuselage ===&lt;br /&gt;
This defines a tubelike structure. It will be given an even mass and aerodynamic force distribution by the solver. You can have as many as you like, in any orientation you please.&lt;br /&gt;
* '''ax,ay,az:''' One end of the tube (typically the front)&lt;br /&gt;
* '''bx,by,bz:''' The other (&amp;quot;back&amp;quot;) end.&lt;br /&gt;
* '''width:''' The width of the tube, in metres.&lt;br /&gt;
* '''taper:''' The approximate radius at the &amp;quot;tips&amp;quot; of the fuselage expressed as a fraction (0-1) of the width value.&lt;br /&gt;
* '''midpoint:''' The location of the widest part of the fuselage, expressed as a fraction of the distance between A and B.&lt;br /&gt;
* '''idrag:''' Multiplier for the &amp;quot;induced drag&amp;quot; generated by this object. Default is one. With idrag=0 the fuselage generates only drag.&lt;br /&gt;
* '''cx,cy,cz:''' Factors for the generated drag in the fuselages &amp;quot;local coordinate system&amp;quot; with x pointing from end to front, z perpendicular to x with y=0 in the aircraft coordinate system. E.g. for a fuselage of a height of 2 times the width you can define cy=2 and (due to the doubled front surface) cx=2.&lt;br /&gt;
&lt;br /&gt;
=== Surfaces ===&lt;br /&gt;
==== wing ====&lt;br /&gt;
This defines the main wing of the aircraft. You can have only one (but see below about using vstab objects for extra lifting surfaces). The wing should have a &amp;lt;stall&amp;gt; subelement to indicate stall behavior, control surface subelements (flap0, flap1, spoiler, slat) to indicate what and where the control surfaces are, and &amp;lt;control&amp;gt; subelements to map user input properties to the control surfaces.&lt;br /&gt;
* '''x,y,z:''' The &amp;quot;base&amp;quot; of the wing, specified as the location of the mid-chord (not leading edge, trailing edge, or aerodynamic center) point at the root of the LEFT (!) wing.&lt;br /&gt;
* '''length:''' The length from the midchord point of the base of the wing to the midchord point at the tip. Note that this is not the same thing as span.&lt;br /&gt;
* '''chord:''' The chord of the wing at its base, along the X axis (not normal to the leading edge, as it is sometimes defined).&lt;br /&gt;
* '''incidence:''' The incidence angle at the wing root, in degrees. Zero is level with the fuselage (as in an aerobatic plane), positive means that the leading edge is higher than the trailing edge (as in a trainer).&lt;br /&gt;
* '''twist:''' The difference between the incidence angle at the wing root and the incidence angle at the wing tip. Typically, this is a negative number so that the wing tips have a lower angle of attack and stall after the wing root (washout).&lt;br /&gt;
* '''taper:''' The taper fraction, expressed as the tip chord divided by the root chord. A taper of one is a hershey bar wing, and zero would be a wing ending at a point. Defaults to one.&lt;br /&gt;
* '''sweep:''' The sweep angle of the wing, in degrees. Zero is no sweep, positive angles are swept back. Defaults to zero. [This looks to be the sweep of the mid-chord of the wing, not the sweep of the leading edge.]&lt;br /&gt;
* '''dihedral:''' The dihedral angle of the wing. Positive angles are upward dihedral. Defaults to zero.&lt;br /&gt;
* '''idrag:''' Multiplier for the &amp;quot;induced drag&amp;quot; generated by this surface. In general, low aspect wings will generate less induced drag per-AoA than high aspect (glider) wings. This value isn't constrained well by the solution process, and may require tuning to get throttle settings correct in high AoA (approach) situations.&lt;br /&gt;
* '''effectiveness:''' Multiplier for the &amp;quot;normal&amp;quot; drag generated by the wing. Defaults to 1. Arbitrary, dimensionless factor. &lt;br /&gt;
* '''camber:''' The lift produced by the wing at zero angle of attack, expressed as a fraction of the maximum lift produced at the stall AoA.&lt;br /&gt;
* '''flow:''' The flow regime for the wing. Valid values are &amp;quot;SUBSONIC&amp;quot; (default) and &amp;quot;TRANSONIC&amp;quot;. Setting surface to transonic adds more lift above mach number 0.6 by applying a Prandl/Glauert correction term to each surface-element. The effect is a more balanced lift/drag distribution reported by the solver. Use for anything that flies faster than mach 0.6 or has supercritical airfoils.&lt;br /&gt;
* '''mcrit:''' The critical mach number for the wing. This point defines the begin of exponential drag rise due to mach speed. Default &amp;quot;0.6&amp;quot;, only available if flow=&amp;quot;TRANSONIC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Wing section support (since 2018.1):'''&lt;br /&gt;
&lt;br /&gt;
Wing section support to define variable geometry (geometry parameters per section)&lt;br /&gt;
* More than one &amp;lt;wing&amp;gt;-element is allowed now. &lt;br /&gt;
* x, y, z, chord and incidence attribute shall be specifed only for the first &amp;lt;wing&amp;gt; in the XML file. They will be overridden for subsequent &amp;lt;wing&amp;gt;-elements.&lt;br /&gt;
* Use '''append=&amp;quot;1&amp;quot;''' for additional '''wing''' elements to skip x, y, z, chord and incidence attribute as the will be calculated from previous '''wing''' element tip chord. This workaround is currently needed due to limitations in the XML parser.&lt;br /&gt;
&lt;br /&gt;
==== hstab ====&lt;br /&gt;
These define the horizontal stabilizer of the aircraft. Internally, it is just a wing object and therefore works the same in XML. &lt;br /&gt;
You are allowed only one hstab object; the solver needs to know which wing's incidence to play with to get the aircraft trimmed correctly.&lt;br /&gt;
&lt;br /&gt;
'''New in 2018.1:'''&lt;br /&gt;
* '''hstab''' supports sections in the same way '''wing''' does, but it is still considered as /the/ (only) hstab used by the solver.&lt;br /&gt;
*  '''incidence-min-deg''' and '''incidence-max-deg''': optional attributes to limit valid result range fore the solver. Use with care or you won't get a solution.&lt;br /&gt;
&lt;br /&gt;
==== vstab ====&lt;br /&gt;
A &amp;quot;vertical&amp;quot; stabilizer. Like hstab, this is just another wing, with a few special properties. The surface is not &amp;quot;mirrored&amp;quot; as are wing and hstab objects. If you define a left wing only, you'll only get a left wing. The default dihedral, if unspecified, is 90 degrees instead of zero. But all parameters are equally settable, so there's no requirement that this object be &amp;quot;vertical&amp;quot; at all. You can use it for anything you like, such as extra wings for biplanes. Most importantly, these surfaces are not involved with the solver computation, so you can have none, or as many as you like.&lt;br /&gt;
&lt;br /&gt;
==== mstab ====&lt;br /&gt;
A mirrored horizontal stabilizer. Exactly the same as wing, but not involved with the solver computation, so you can have none, or as many as you like.&lt;br /&gt;
&lt;br /&gt;
==== stall ====&lt;br /&gt;
A subelement of a wing (or hstab/vstab/mstab) that specifies the stall behavior.&lt;br /&gt;
* '''aoa:''' The stall angle (maximum lift) in degrees. Note that this is relative to the wing, not the fuselage (since the wing may have a non-zero incidence angle).&lt;br /&gt;
* '''width:''' The &amp;quot;width&amp;quot; of the stall, in degrees. A high value indicates a gentle stall. Low values are viscious for a non-twisted wing, but are acceptable for a twisted one (since the whole wing will not stall at the same time).&lt;br /&gt;
* '''peak:''' The height of the lift peak, relative to the post-stall secondary lift peak at 45 degrees. Defaults to 1.5. This one is deep voodoo, and probably doesn't need to change much. Bug me for an explanation if you're curious.&lt;br /&gt;
&lt;br /&gt;
==== flap0, flap1, slat, spoiler ====&lt;br /&gt;
These are subelements of wing/hstab/vstab objects, and specify the location and effectiveness of the control surfaces.&lt;br /&gt;
* '''start:''' The position along the wing where the control surface begins.Zero is the root, one is the tip.&lt;br /&gt;
* '''end:''' The position where the surface ends, as above.&lt;br /&gt;
* '''lift:''' The lift multiplier for a flap or slat at full extension. One is a no-op, a typical aileron might be 1.2 or so, a giant jetliner flap 2.0, and a spoiler 0.0. For spoilers, the interpretation is a little different -- they spoil only &amp;quot;prestall&amp;quot; lift. Lift due purely to &amp;quot;flat plate&amp;quot; effects isn't affected. For typical wings that stall at low AoA's essentially all lift is pre-stall and you don't have to care. Jet fighters tend not to have wing spoilers, for exactly this reason. This value is not applicable to slats, which affect stall AoA only.&lt;br /&gt;
* '''drag:''' The drag multiplier, as above. Typically should be higher than the lift multiplier for flaps.&lt;br /&gt;
* '''aoa:''' Applicable only to slats. This indicates the angle by which the stall AoA is translated by the slat extension.&lt;br /&gt;
  &lt;br /&gt;
=== Rotor and rotorgear ===&lt;br /&gt;
YASim has also possibility to simulate rotorcraft blades. The number properties of rotor elements are large therefore are spitted to the separate page  [[Howto:Make a helicopter#XML%20Elements|howto make a helicopter in YASim]].&lt;br /&gt;
&lt;br /&gt;
=== Engine ===&lt;br /&gt;
==== Thruster ====&lt;br /&gt;
A very simple &amp;quot;thrust only&amp;quot; engine object. Useful for things like thrust vectoring nozzles. All it does is map its THROTTLE input axis to its output thrust rating. Does not consume fuel, etc...&lt;br /&gt;
* '''thrust:''' Maximum thrust in pounds&lt;br /&gt;
* '''x,y,z:''' The point on the airframe where thrust will be applied.&lt;br /&gt;
* '''vx,vy,vy:''' The direction of the thrust in airframe coordinates. The vector will be normalized automatically, so any non-zero vector will work fine.&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
  &amp;lt;thruster x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;0.03&amp;quot; vx=&amp;quot;1&amp;quot; vy=&amp;quot;0&amp;quot; vz=&amp;quot;0&amp;quot; thrust=&amp;quot;6.61&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;control-input axis=&amp;quot;/controls/engines/engine[0]/throttle&amp;quot; control=&amp;quot;THROTTLE&amp;quot; src0=&amp;quot;-1&amp;quot; src1=&amp;quot;1&amp;quot; dst0=&amp;quot;-1&amp;quot; dst1=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/thruster&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Jet ====&lt;br /&gt;
A turbojet/fan engine. It accepts a &amp;lt;control&amp;gt; subelement to map a property to its throttle setting, and an &amp;lt;actionpt&amp;gt; subelement to place the action point of the thrust at a different position than the mass of the engine.&lt;br /&gt;
* '''x,y,z:''' The location of the engine, as a point mass. If no actionpt is specified, this will also be the point of application of thrust.&lt;br /&gt;
* '''mass:''' The mass of the engine, in pounds.&lt;br /&gt;
* '''thrust:''' The maximum sea-level thrust, in pounds.&lt;br /&gt;
* '''afterburner:''' Maximum total thrust with afterburner/reheat, in pounds [defaults to &amp;quot;no additional thrust&amp;quot;].&lt;br /&gt;
* '''rotate:''' Vector angle of the thrust in degrees about the Y axis [0].&lt;br /&gt;
* '''n1-idle:''' Idling low pressure core / fan speed [55]. &lt;br /&gt;
* '''n1-max:''' Maximum low pressure core / fan speed [102].&lt;br /&gt;
* '''n2-idle:''' Idling high pressure core speed [73].&lt;br /&gt;
* '''n2-max:''' Maximum high pressure core speed [103].&lt;br /&gt;
* '''tsfc:''' Thrust-specific fuel consumption [0.8]. This should be considerably lower for modern turbofans.&lt;br /&gt;
* '''atsfc:''' (version &amp;gt;= 2016.3.1) Thrust specific fuel consumption with afterburner on. When set to zero defaults to older behaviour where it is calculated from dry fuel consumption [0].&lt;br /&gt;
* '''egt:''' Exhaust gas temperature at takeoff in K [1050].&lt;br /&gt;
* '''epr:''' Engine pressure ratio at takeoff [3.0].&lt;br /&gt;
* '''exhaust-speed:''' The maximum exhaust speed in knots [~1555].&lt;br /&gt;
* '''spool-time:''' Time, in seconds, for the engine to respond to 90% of a commanded powersetting.&lt;br /&gt;
&lt;br /&gt;
==== Propeller ====&lt;br /&gt;
A propeller. This element requires an engine subtag. Currently &amp;lt;piston-engine&amp;gt; and &amp;lt;turbine-engine&amp;gt; are supported.&lt;br /&gt;
* '''x,y,z:''' The position of the mass (!) of the engine/propeller combination. If the point of force application is different (and it will be) it should be set with an &amp;lt;actionpt&amp;gt; subelement.&lt;br /&gt;
* '''mass:''' The mass of the engine/propeller, in pounds.&lt;br /&gt;
* '''moment:''' The moment, in kg-metres^2. This has to be hand calculated and guessed at for now. A more automated system will be forthcoming. Use a negative moment value for counter-rotating (&amp;quot;European&amp;quot; -- CCW as seen from behind the prop) propellers. A good guess for this value is the radius of the prop (in meters) squared times the mass (kg) divided by three; that is the moment of a plain &amp;quot;stick&amp;quot; bolted to the prop shaft.&lt;br /&gt;
* '''radius:''' The radius, in meters, or the propeller.&lt;br /&gt;
* '''cruise-speed:''' The max efficiency cruise speed of the propeller. Generally not the same as the aircraft's cruise speed.&lt;br /&gt;
* '''cruise-rpm:''' The RPM of the propeller at max-eff. cruise.&lt;br /&gt;
* '''cruise-power:''' The power sunk by the prop at cruise, in horsepower.&lt;br /&gt;
* '''cruise-alt:''' The reference cruise altitude in feet.&lt;br /&gt;
* '''takeoff-power:''' The takeoff power required by the propeller...&lt;br /&gt;
* '''takeoff-rpm:''' ...at the given takeoff RPM.&lt;br /&gt;
* '''gear-ratio:''' The factor by which the engine RPM is multiplied to produce the propeller RPM. Optional (defaults to 1.0).&lt;br /&gt;
* '''contra:''' When set (contra=&amp;quot;1&amp;quot;), this indicates that the propeller is a contra-rotating pair. It will not contribute to the aircraft's net gyroscopic moment, nor will it produce asymmetric torque on the aircraft body. Asymmetric slipstream effects, when implemented, will also be zero when this is set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
YASim assumes a fixed-pitch propeller by default. If your engine is using a constant-speed propeller, you'll also need to provide these attributes:&lt;br /&gt;
&lt;br /&gt;
* '''min-rpm:''' The minimum operational RPM for a constant speed propeller. This is the speed to which the prop governor will seek when the blue lever is at a minimum. The coarse-stop attribute limits how far the governor can go into trying to reach this RPM.&lt;br /&gt;
* '''max-rpm:''' The maximum operational RPM for a constant speed propeller. See above. The fine-stop attribute limits how far the governor can go in trying to reach this RPM.&lt;br /&gt;
* '''fine-stop:''' The minimum pitch of the propeller (high RPM) as a ratio of ideal cruise pitch. This is set to 0.25 by default -- a higher value will result in a lower RPM at low power settings (e.g. idle, taxi, and approach).&lt;br /&gt;
* '''coarse-stop:''' The maximum pitch of the propeller (low RPM) as a ratio of ideal cruise pitch. This is set to 4.0 by default -- a lower value may result in a higher RPM at high power settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== piston-engine =====&lt;br /&gt;
&lt;br /&gt;
A piston engine definition. This must be a subelement of an enclosing &amp;lt;propeller&amp;gt; tag.&lt;br /&gt;
&lt;br /&gt;
* '''eng-power:''' Maximum BHP of the engine at sea level.&lt;br /&gt;
* '''eng-rpm:''' The engine RPM at which eng-power is developed&lt;br /&gt;
* '''displacement:''' The engine displacement in cubic inches.&lt;br /&gt;
* '''compression:''' The engine compression ratio.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
    	&amp;lt;piston-engine eng-power=&amp;quot;2&amp;quot; eng-rpm=&amp;quot;3800&amp;quot; displacement=&amp;quot;20&amp;quot; &amp;gt;&lt;br /&gt;
    		&amp;lt;control-input axis=&amp;quot;/controls/engines/engine[0]/throttle&amp;quot; control=&amp;quot;THROTTLE&amp;quot;/&amp;gt;&lt;br /&gt;
    		&amp;lt;control-input axis=&amp;quot;/controls/engines/engine[0]/starter&amp;quot; control=&amp;quot;STARTER&amp;quot;/&amp;gt;&lt;br /&gt;
    		&amp;lt;control-input axis=&amp;quot;/controls/engines/engine[0]/magnetos&amp;quot; control=&amp;quot;MAGNETOS&amp;quot;/&amp;gt;&lt;br /&gt;
    		&amp;lt;control-input axis=&amp;quot;/controls/engines/engine[0]/mixture&amp;quot; control=&amp;quot;MIXTURE&amp;quot;/&amp;gt;&lt;br /&gt;
    	&amp;lt;/piston-engine&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== electric-engine =====&lt;br /&gt;
&lt;br /&gt;
A simplified electric DC engine model. The model is available since the end of April 2020, therefore it is currently available in daily build FlightGear snapshots. This definition must be a subelement of an enclosing &amp;lt;propeller&amp;gt; tag.&lt;br /&gt;
&lt;br /&gt;
* '''Kv''' electric engine constant in revolutions per minute to volt. &lt;br /&gt;
* '''voltage''' The voltage applied to the motor e.g. Nominal battery voltage in Volts. &lt;br /&gt;
* '''Rm''' The engine winding resistance in Ohms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
  &amp;lt;propeller x=&amp;quot;0.02&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;0.03&amp;quot;&lt;br /&gt;
      mass=&amp;quot;0.05&amp;quot;&lt;br /&gt;
      moment=&amp;quot;0.0006&amp;quot;&lt;br /&gt;
      radius=&amp;quot;0.203&amp;quot;&lt;br /&gt;
      cruise-speed=&amp;quot;26&amp;quot;&lt;br /&gt;
      cruise-rpm=&amp;quot;7000&amp;quot;&lt;br /&gt;
      cruise-power=&amp;quot;0.5&amp;quot;&lt;br /&gt;
      cruise-alt=&amp;quot;2000&amp;quot;&lt;br /&gt;
      takeoff-power=&amp;quot;0.70&amp;quot;&lt;br /&gt;
      takeoff-rpm=&amp;quot;9200&amp;quot;&lt;br /&gt;
      contra=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;actionpt x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;0.03&amp;quot;/&amp;gt;&lt;br /&gt;
    	&amp;lt;electric-engine Kv=&amp;quot;750&amp;quot; voltage=&amp;quot;15&amp;quot; Rm=&amp;quot;0.02&amp;quot; &amp;gt;&lt;br /&gt;
    		&amp;lt;control-input axis=&amp;quot;/controls/engines/engine[0]/throttle&amp;quot; control=&amp;quot;THROTTLE&amp;quot;/&amp;gt;&lt;br /&gt;
    	&amp;lt;/electric-engine&amp;gt;&lt;br /&gt;
  &amp;lt;/propeller&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Landing gear ===&lt;br /&gt;
==== gear ====&lt;br /&gt;
Defines a landing gear. Accepts &amp;lt;control&amp;gt; subelements to map properties to steering and braking. Can also be used to simulate floats. Although the coefficients are still called ..fric, it is calculated in fluids as a drag (proportional to the square of the speed). In fluids gears are not considered to detect crashes (as on ground). &lt;br /&gt;
* '''x,y,z:''' The location of the fully-extended gear tip.&lt;br /&gt;
* '''compression:''' The distance in metres along the &amp;quot;up&amp;quot; axis that the gear will compress.&lt;br /&gt;
* '''initial-load:''' The initial load of the spring in multiples of compression. Defaults to 0. (With this parameter a lower spring-constants will be used for the gear-&amp;gt; can reduce numerical problems (jitter)) '''Note:''' the spring-constant is varied from 0% compression to 20% compression to get continuous behavior around 0 compression. (could be physically explained by wheel deformation)&lt;br /&gt;
* '''upx/upy/upz:''' The direction of compression, defaults to vertical (0,0,1) if unspecified. These are used only for a direction -- the vector need not be normalized, as the length is specified by &amp;quot;compression&amp;quot;.&lt;br /&gt;
* '''sfric:''' Static (non-skidding) coefficient of friction. Defaults to 0.8.&lt;br /&gt;
* '''dfric:''' Dynamic friction. Defaults to 0.7.&lt;br /&gt;
* '''stiction:''' Stiction to ground. Defaults to 0. stiction = &amp;quot;1&amp;quot; ensures the gear isn't sliding unintentionally (Note: please correct docu here for more detailed facts, developers didn't document this extension here and this is based on trial and guessing only)&lt;br /&gt;
* '''spring:''' A dimensionless multiplier for the automatically generated spring constant. Increase to make the gear stiffer, decrease to make it squishier.&lt;br /&gt;
* '''damp:''' A dimensionless multiplier for the automatically generated damping coefficient. Decrease to make the gear &amp;quot;bouncier&amp;quot;, increase to make it &amp;quot;slower&amp;quot;. Beware of increasing this too far: very high damping forces can make the numerics unstable. If you can't make the gear stop bouncing with this number, try increasing the compression length instead.&lt;br /&gt;
* '''on-water:''' if this is set to &amp;quot;0&amp;quot; the gear will be ignored if on water. Defaults to &amp;quot;0&amp;quot;&lt;br /&gt;
* '''on-solid:''' if this set to &amp;quot;0&amp;quot; the gear will be ignored if not on water. Defaults to &amp;quot;1&amp;quot;&lt;br /&gt;
* '''speed-planing:'''&lt;br /&gt;
* '''spring-factor-not-planing:''' At zero speed the spring factor is multiplied by spring-factor-not-planing. Above speed-planing this factor is equal to 1. The idea is, to use this for floats simulating the transition from swimming to planing. speed-planing defaults to 0, spring-factor-not-planing defaults to 1.&lt;br /&gt;
* '''reduce-friction-by-extension:''' at full extension the friction is reduced by this relative value. 0.7 means 30% friction at full extension. If you specify a value greater than one, the friction will be zero before reaching full extension. Defaults to &amp;quot;0&amp;quot;&lt;br /&gt;
* '''ignored-by-solver:''' with the on-water/on-solid tags you can have more than one set of gears in one aircraft, If the solver (who automatically generates the spring constants) would take all gears into account, the result would be wrong. E. G. set this tag to &amp;quot;1&amp;quot; for all gears, which are not active on runways. Defaults to &amp;quot;0&amp;quot;. You can not exclude all gears in the solving process.&lt;br /&gt;
&lt;br /&gt;
Will define two properties associated with compression of landing gear:&lt;br /&gt;
&lt;br /&gt;
* '''compression-norm''' - range from 0..1, 0 means gear fully extended, 1 means fully compressed.&lt;br /&gt;
* '''compression-m''' - vertical distance in metres that the wheel has moved in order to be on top of ground; this will usually be different from the animation distance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
  &amp;lt;!-- front gear --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;gear x=&amp;quot;0.0&amp;quot; y=&amp;quot;0.0&amp;quot; z=&amp;quot;-0.205&amp;quot;&lt;br /&gt;
    spring=&amp;quot;0.9&amp;quot;&lt;br /&gt;
    damp=&amp;quot;0.8&amp;quot;&lt;br /&gt;
    dfric=&amp;quot;0.9&amp;quot;&lt;br /&gt;
    sfric=&amp;quot;1.1&amp;quot;&lt;br /&gt;
    compression=&amp;quot;0.051&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;control-input axis=&amp;quot;/controls/flight/rudder&amp;quot; control=&amp;quot;STEER&amp;quot; square=&amp;quot;true&amp;quot; src0=&amp;quot;-1.0&amp;quot; src1=&amp;quot;1.0&amp;quot; dst0=&amp;quot;-0.3&amp;quot; dst1=&amp;quot;0.3&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;control-input axis=&amp;quot;/controls/gear/brake-right&amp;quot; control=&amp;quot;BRAKE&amp;quot; split=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;control-input axis=&amp;quot;/controls/gear/brake-parking&amp;quot; control=&amp;quot;BRAKE&amp;quot; split=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/gear&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- two rear gears --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;gear x=&amp;quot;-0.4&amp;quot; y=&amp;quot;0.25&amp;quot; z=&amp;quot;-0.205&amp;quot;&lt;br /&gt;
    spring=&amp;quot;0.9&amp;quot;&lt;br /&gt;
    damp=&amp;quot;0.8&amp;quot;&lt;br /&gt;
    dfric=&amp;quot;0.9&amp;quot;&lt;br /&gt;
    sfric=&amp;quot;1.1&amp;quot;&lt;br /&gt;
    compression=&amp;quot;0.051&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;control-input axis=&amp;quot;/controls/gear/brake-right&amp;quot; control=&amp;quot;BRAKE&amp;quot; split=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;control-input axis=&amp;quot;/controls/gear/brake-parking&amp;quot; control=&amp;quot;BRAKE&amp;quot; split=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/gear&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;gear x=&amp;quot;-0.4&amp;quot; y=&amp;quot;-0.25&amp;quot; z=&amp;quot;-0.205&amp;quot;&lt;br /&gt;
    spring=&amp;quot;0.9&amp;quot;&lt;br /&gt;
    damp=&amp;quot;0.8&amp;quot;&lt;br /&gt;
    dfric=&amp;quot;0.9&amp;quot;&lt;br /&gt;
    sfric=&amp;quot;1.1&amp;quot;&lt;br /&gt;
    compression=&amp;quot;0.051&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;control-input axis=&amp;quot;/controls/gear/brake-left&amp;quot; control=&amp;quot;BRAKE&amp;quot; split=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;control-input axis=&amp;quot;/controls/gear/brake-parking&amp;quot; control=&amp;quot;BRAKE&amp;quot; split=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/gear&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Torus-shaped contact surface on next =====&lt;br /&gt;
&lt;br /&gt;
On next as of 2022-3-19 one can specify a torus-shaped tyre contact surface using these new parameters:&lt;br /&gt;
&lt;br /&gt;
* '''wheel-x'''&lt;br /&gt;
* '''wheel-y'''&lt;br /&gt;
* '''wheel-z'''&lt;br /&gt;
* '''wheel-radius''' (default 0)&lt;br /&gt;
* '''tyre-radius''' (default 0)&lt;br /&gt;
* '''wheel-axle-x'''&lt;br /&gt;
* '''wheel-axle-y'''&lt;br /&gt;
* '''wheel-axle-z'''&lt;br /&gt;
&lt;br /&gt;
The contact point will be the lowest point on a torus with radius '''tyre-radius''' wrapped around a wheel with radius '''wheel-radius''' centred on point '''(wheel-x, wheel-y, wheel-z)''' with orientation defined by '''wheel-axle'''. This contact point will depend on the aircraft's orientation relative to the ground.&lt;br /&gt;
&lt;br /&gt;
If not specified, '''wheel-axle''' defaults to (0, 1, 0), giving a conventional vertical wheel in line with the aircraft. Other values may allow modelling of, for example, a Bf109's non-vertical undercarriage.&lt;br /&gt;
&lt;br /&gt;
Default values of zero for wheel-radius and tyre-radius give a fixed contact point at (wheel-x, wheel-y, wheel-z).&lt;br /&gt;
&lt;br /&gt;
If an aircraft also specifies an old-style contact point with '''(x, y, z)''' it will work with both new and old builds of Flightgear.&lt;br /&gt;
&lt;br /&gt;
==== Launchbar ====&lt;br /&gt;
Defines a catapult launchbar or strop.&lt;br /&gt;
* '''x,y,z:''' The location of the mount point of the launch bar or strop on the aircraft.&lt;br /&gt;
* '''length:''' The length of the launch bar from mount point to tip&lt;br /&gt;
* '''down-angle:''' The max angle below the horizontal the launchbar can achieve.&lt;br /&gt;
* '''up-angle:''' The max angle above the horizontal the launchbar can achieve.&lt;br /&gt;
* '''holdback-{x,y,z}:''' The location of the holdback mount point on the aircraft.&lt;br /&gt;
* '''holdback-length:''' The length of the holdback from mount point to tip. Note: holdback up-angle and down-angle are the same as those defined for the launchbar and are not specified in the configuration.&lt;br /&gt;
&lt;br /&gt;
=== Fuel ===&lt;br /&gt;
==== tank ====&lt;br /&gt;
A fuel tank. Tanks in the aircraft are identified numerically (starting from zero), in the order they are defined in the file. If the left tank is first, &amp;quot;tank[0]&amp;quot; will be the left tank. &lt;br /&gt;
* '''x,y,z:''' The location of the tank.&lt;br /&gt;
* '''capacity:''' The maximum contents of the tank, in pounds. Not gallons -- YASim supports fuels of varying densities.&lt;br /&gt;
* '''jet:''' A boolean. If present, this causes the fuel density to be treated as Jet-A. Otherwise, gasoline density is used. A more elaborate density setting (in pounds per gallon, for example) would be easy to implement. Bug me.&lt;br /&gt;
&lt;br /&gt;
=== Center of Gravity ===&lt;br /&gt;
==== Ballast ====&lt;br /&gt;
This is a mechanism for modifying the mass distribution of the aircraft. A ballast setting specifies that a particular amount of the empty weight of the aircraft must be placed at a given location. The remaining non-ballast weight will be distributed &amp;quot;intelligently&amp;quot; across the fuselage and wing objects. Note again: this does NOT change the empty weight of the aircraft. &lt;br /&gt;
* '''x,y,z:''' The location of the ballast.&lt;br /&gt;
* '''mass:''' How much mass, in pounds, to put there. Note that this value can be negative. I find that I often need to &amp;quot;lighten&amp;quot; the tail of the aircraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
  &amp;lt;ballast  x=&amp;quot;-0.24&amp;quot; y=&amp;quot;0.0&amp;quot; z=&amp;quot;0.33&amp;quot; mass-kg=&amp;quot;0.5&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Weight ====&lt;br /&gt;
This is an added weight, something not part of the empty weight of the aircraft, like passengers, cargo, or external stores. The actual value of the mass is not specified here, instead, a mapping to a property is used. This allows external code, such as the panel, to control the weight (loading a given cargo configuration from preference files, dropping bombs at runtime, etc...)&lt;br /&gt;
* '''x,y,z:''' The location of the weight.&lt;br /&gt;
* '''mass-prop:''' The name of the fgfs property containing the mass, in pounds, of this weight.&lt;br /&gt;
* '''size:''' The aerodynamic &amp;quot;size&amp;quot;, in metres, of the object. This is important for external stores, which will cause drag. For reasonably aerodynamic stuff like bombs, the size should be roughly the width of the object. For other stuff, you're on your own. The default is zero, which results in no aerodynamic force (internal cargo).&lt;br /&gt;
* '''solve-weight:''' Subtag of approach and cruise parameters. Used to specify a non-zero setting for a &amp;lt;weight&amp;gt; tag during solution. The default is to assume all weights are zero at the given performance numbers.&lt;br /&gt;
* '''idx:''' Index of the weight in the file (starting with zero).&lt;br /&gt;
* '''weight:''' Weight setting in pounds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
  &amp;lt;weight x=&amp;quot;-0.06471&amp;quot; y=&amp;quot;0.225&amp;quot; z=&amp;quot;-0.2&amp;quot;  mass-prop=&amp;quot;/sim/weight[0]/weight-kg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Controls ===&lt;br /&gt;
==== control-input ====&lt;br /&gt;
This element manages a mapping from fgfs properties (user input) to settable values on the aircraft's objects. Note that the value to be set MUST (!) be valid on the given object type. This is not checked for by the parser, and will cause a runtime crash if you try it. Wing's don't have throttle controls, etc... Note that multiple axes may be set on the same value. They are summed before setting.&lt;br /&gt;
* '''axis:''' The name of the double-valued fgfs property &amp;quot;axis&amp;quot; to use as input, such as &amp;quot;/controls/flight/aileron&amp;quot;.&lt;br /&gt;
* '''control:''' Which control axis to set on the objects. It can have the following values:&lt;br /&gt;
** THROTTLE - The throttle on a jet or propeller. &lt;br /&gt;
** MIXTURE - The mixture on a propeller.&lt;br /&gt;
** REHEAT - The afterburner on a jet&lt;br /&gt;
** PROP - The propeller advance&lt;br /&gt;
** BRAKE - The brake on a gear.&lt;br /&gt;
** STEER - The steering angle on a gear. &lt;br /&gt;
** INCIDENCE - The incidence angle of a wing.&lt;br /&gt;
** FLAP0 - The flap0 deflection of a wing. &lt;br /&gt;
** FLAP1 - The flap1 deflection of a wing. &lt;br /&gt;
** SLAT - The slat extension of a wing. &lt;br /&gt;
** SPOILER - The spoiler extension for a wing. &lt;br /&gt;
** CYCLICAIL - The &amp;quot;aileron&amp;quot; cyclic input of a rotor &lt;br /&gt;
** CYCLICELE - The &amp;quot;elevator&amp;quot; cyclic input of a rotor &lt;br /&gt;
** COLLECTIVE - The collective input of a rotor&lt;br /&gt;
** ROTORENGINEON - If not equal zero the rotor is rotating &lt;br /&gt;
** WINCHRELSPEED - The relative winch speed &lt;br /&gt;
** {... and many more, see [https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/src/FDM/YASim/ControlMap.cpp#l25 ControlMap.cpp] ...}&lt;br /&gt;
* '''invert:''' Negate the value of the property before settling on the object.&lt;br /&gt;
* '''split:''' Applicable to wing control surfaces. Sets the normal value on the left-wing, and a negated value on the right-wing.&lt;br /&gt;
* '''square:''' Squares the value before setting. Useful for controls like a steering that needs a wide range, yet lots of sensitivity in the center. Obviously only applicable to values that have a range of [-1:1] or [0:1]. &lt;br /&gt;
* '''src0/src1/dst0/dst1:''' If present, these define a linear mapping from the source to the output value. Input values in the range src0-src1 are mapped linearly to dst0-dst1, with clamping for input values that lie outside the range.&lt;br /&gt;
&lt;br /&gt;
==== control-output ====&lt;br /&gt;
This can be used to pass the value of a YASim control axis (after all mapping and summing is applied) back to the property tree.&lt;br /&gt;
* '''control:''' Name of the control axis. See above.&lt;br /&gt;
* '''prop:''' Property node to receive the value.&lt;br /&gt;
* '''side:''' Optional, for split controls. Either &amp;quot;right&amp;quot; or &amp;quot;left&amp;quot; &lt;br /&gt;
* '''min/max:''' Clamping applied to output value.&lt;br /&gt;
&lt;br /&gt;
==== control-speed ====&lt;br /&gt;
Some controls (most notably flaps and hydraulics) have maximum slew rates and cannot respond instantly to pilot input. This can be implemented with a control-speed tag, which defines a &amp;quot;transition time&amp;quot; required to slew through the full input range. Note that this tag is semi-deprecated, complicated control input filtering can be done much more robustly from a Nasal script.&lt;br /&gt;
* '''control:''' Name of the control axis. See above.&lt;br /&gt;
* '''transition-time:''' Time in seconds to slew through input range.&lt;br /&gt;
&lt;br /&gt;
==== control-setting ====&lt;br /&gt;
This tag is used to define a particular setting for a control axis inside the &amp;lt;cruise&amp;gt; or &amp;lt;approach&amp;gt; tags, where obviously property input is not available. It can be used, for example, to inform the solver that the approach performance values assume full flaps, etc...&lt;br /&gt;
* '''axis:''' Name of the control input (i.e. a property name)&lt;br /&gt;
* '''value:''' Value of the control axis.&lt;br /&gt;
&lt;br /&gt;
=== Winch and Aerotow ===&lt;br /&gt;
==== hitch ====&lt;br /&gt;
A hitch, can be used for winch-start (in gliders) or aerotow (in gliders and motor aircraft) or for external cargo with helicopter. You can do aerotow over the net via multiplayer (see j3 and bocian as an example).&lt;br /&gt;
* '''name:''' the name of the hitch. must be aerotow if you want to do aerotow via multiplayer. You will find many properties at /sim/hitches/name. Most of them are directly tied to the internal variables, you can modify them as you like. You can add a listener to the property &amp;quot;broken&amp;quot;, e. g. for playing a sound.&lt;br /&gt;
* '''x,y,z:''' The position of the hitch&lt;br /&gt;
* '''force-is-calculated-by-other:''' if you want to simulate aerotowing over the internet, set this value to &amp;quot;1&amp;quot; in the motor aircraft. Don't specify or set this to zero in gliders. In a LAN the time lag might be small enough to set it on both aircraft to &amp;quot;0&amp;quot;. It's intended, that this is done automatically in the future.&lt;br /&gt;
==== tow ====&lt;br /&gt;
The tow used for aerotow or winch. This must be a subelement of an enclosing &amp;lt;hitch&amp;gt; tag.&lt;br /&gt;
* '''length:''' upstretched length in metres&lt;br /&gt;
* '''weight-per-meter:''' in kg/metre&lt;br /&gt;
* '''elastic-constant:''' lower values give higher elasticity&lt;br /&gt;
* '''break-force:''' in N&lt;br /&gt;
* '''mp-auto-connect-period:''' the every x seconds a towed multiplayer aircraft is searched. If found, this tow is connected automatically, parameters are copied from the other aircraft. Should be set only in the motor aircraft, not in the glider&lt;br /&gt;
==== winch ====&lt;br /&gt;
The tow used for aerotow or winch. This must be a subelement of an enclosing &amp;lt;hitch&amp;gt; tag.&lt;br /&gt;
* '''max-tow-length:''' in m&lt;br /&gt;
* '''min-tow-length''': in m&lt;br /&gt;
* '''initial-tow-length:''' in m. The initial tow length also defines the length/search radius used for the mp-autoconnect feature&lt;br /&gt;
* '''max-winch-speed:''' in m/s&lt;br /&gt;
* '''power:''' in kW&lt;br /&gt;
* '''max-force:''' in N&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
&amp;lt;hitch name=&amp;quot;winch&amp;quot; x=&amp;quot;0.0&amp;quot; y=&amp;quot;0.0&amp;quot; z=&amp;quot;0.0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tow length=&amp;quot;50&amp;quot; weight-per-meter=&amp;quot;0.0035&amp;quot; elastic-constant=&amp;quot;40000&amp;quot; break-force=&amp;quot;10000&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;!-- 3mm paracord--&amp;gt;&lt;br /&gt;
    &amp;lt;winch max-tow-length=&amp;quot;1000&amp;quot; min-tow-length=&amp;quot;1&amp;quot; initial-tow-length=&amp;quot;1000&amp;quot; max-winch-speed=&amp;quot;20&amp;quot; power=&amp;quot;2&amp;quot; max-force=&amp;quot;80&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;control-input axis=&amp;quot;/controls/winch/place&amp;quot; control=&amp;quot;PLACEWINCH&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/hitch&amp;gt;&lt;br /&gt;
&amp;lt;hitch name=&amp;quot;aerotow&amp;quot; x=&amp;quot;0.0&amp;quot; y=&amp;quot;0.0&amp;quot; z=&amp;quot;0.0&amp;quot; force-is-calculated-by-other=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tow length=&amp;quot;60&amp;quot; weight-per-meter=&amp;quot;0.0035&amp;quot; elastic-constant=&amp;quot;9000&amp;quot; break-force=&amp;quot;100&amp;quot; mp-auto-connect-period=&amp;quot;0.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;winch max-tow-length=&amp;quot;1000&amp;quot; min-tow-length=&amp;quot;60&amp;quot; initial-tow-length=&amp;quot;60&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;control-input axis=&amp;quot;/controls/aerotow/find-aircraft&amp;quot; control=&amp;quot;FINDAITOW&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/hitch&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Visualization ==&lt;br /&gt;
&lt;br /&gt;
=== Blender visualization tool ===&lt;br /&gt;
&lt;br /&gt;
[[File:Yasim_visualisation_dc6.png|thumb|dc6 FDM in Blender]]To make the programmed aircraft visible it is possible to load and compare it with the 3D model within [[Blender]]. They applaud for this ''very'' useful script goes to M. Franz, thank you very much!&lt;br /&gt;
&lt;br /&gt;
For Blender versions &amp;lt;= 2.4 the script is located in FlightGears source code {{flightgear file|utils/Modeller/yasim_import.py}}.&lt;br /&gt;
&lt;br /&gt;
For Blender versions newer than 2.4, please see [[Blender YASim import]].&lt;br /&gt;
&lt;br /&gt;
The howto, taken from inside the script:&lt;br /&gt;
&lt;br /&gt;
 yasim_import.py loads and visualizes a YASim FDM geometry&lt;br /&gt;
 =========================================================&lt;br /&gt;
 &lt;br /&gt;
 It is recommended to load the model superimposed over a greyed out and immutable copy of the aircraft model:&lt;br /&gt;
 &lt;br /&gt;
   (0) put this script into ~/.blender/scripts/&lt;br /&gt;
   (1) load or import aircraft model (menu -&amp;gt; &amp;quot;File&amp;quot; -&amp;gt; &amp;quot;Import&amp;quot; -&amp;gt; &amp;quot;AC3D (.ac) ...&amp;quot;)&lt;br /&gt;
   (2) create new *empty* scene (menu -&amp;gt; arrow button left of &amp;quot;SCE:scene1&amp;quot; combobox -&amp;gt; &amp;quot;ADD NEW&amp;quot; -&amp;gt; &amp;quot;empty&amp;quot;)&lt;br /&gt;
   (3) rename scene to yasim (not required)&lt;br /&gt;
   (4) link to scene1 (F10 -&amp;gt; &amp;quot;Output&amp;quot; tab -&amp;gt; arrow button left of text entry &amp;quot;No Set Scene&amp;quot; -&amp;gt; &amp;quot;scene1&amp;quot;)&lt;br /&gt;
   (5) now load the YASim config file (menu -&amp;gt; &amp;quot;File&amp;quot; -&amp;gt; &amp;quot;Import&amp;quot; -&amp;gt; &amp;quot;YASim (.xml) ...&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 This is good enough for simple checks. But if you are working on the YASim configuration, then you need a&lt;br /&gt;
 quick and convenient way to reload the file. In that case, continue after (4):&lt;br /&gt;
 &lt;br /&gt;
   (5) switch the button area at the bottom of the blender screen to &amp;quot;Scripts Window&amp;quot; mode (green python snake icon)&lt;br /&gt;
   (6) load the YASim config file (menu -&amp;gt; &amp;quot;Scripts&amp;quot; -&amp;gt; &amp;quot;Import&amp;quot; -&amp;gt; &amp;quot;YASim (.xml) ...&amp;quot;)&lt;br /&gt;
   (7) make the &amp;quot;Scripts Window&amp;quot; area as small as possible by dragging the area separator down&lt;br /&gt;
   (8) optionally split the &amp;quot;3D View&amp;quot; area and switch the right part to the &amp;quot;Outliner&amp;quot;&lt;br /&gt;
   (9) press the &amp;quot;Reload YASim&amp;quot; button in the script area to reload the file&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 If the 3D model is displaced with respect to the FDM model, then the &amp;lt;offsets&amp;gt; values from the&lt;br /&gt;
 model animation XML file should be added as comment to the YASim config file, as a line all by&lt;br /&gt;
 itself, with no spaces surrounding the equal signs. Spaces elsewhere are allowed. For example:&lt;br /&gt;
 &lt;br /&gt;
   &amp;lt;offsets&amp;gt;&lt;br /&gt;
       &amp;lt;x-m&amp;gt;3.45&amp;lt;/x-m&amp;gt;&lt;br /&gt;
       &amp;lt;z-m&amp;gt;-0.4&amp;lt;/z-m&amp;gt;&lt;br /&gt;
       &amp;lt;pitch-deg&amp;gt;5&amp;lt;/pitch-deg&amp;gt;&lt;br /&gt;
   &amp;lt;/offsets&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 becomes:&lt;br /&gt;
 &lt;br /&gt;
   &amp;lt;!-- offsets: x=3.45 z=-0.4 p=5 --&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Possible variables are:&lt;br /&gt;
 &lt;br /&gt;
   x ... &amp;lt;x-m&amp;gt;&lt;br /&gt;
   y ... &amp;lt;y-m&amp;gt;&lt;br /&gt;
   z ... &amp;lt;z-m&amp;gt;&lt;br /&gt;
   h ... &amp;lt;heading-deg&amp;gt;&lt;br /&gt;
   p ... &amp;lt;pitch-deg&amp;gt;&lt;br /&gt;
   r ... &amp;lt;roll-deg&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Of course, absolute FDM coordinates can then no longer directly be read from Blender's 3D view.&lt;br /&gt;
 The cursor coordinates display in the script area, however, shows the coordinates in YASim space.&lt;br /&gt;
 Note that object names don't contain XML indices but element numbers. YASim_hstab#2 is the third&lt;br /&gt;
 hstab in the whole file, not necessarily in its parent XML group. A floating-point part in the&lt;br /&gt;
 object name (e.g. YASim_hstab#2.004) only means that the geometry has been reloaded that often.&lt;br /&gt;
 It's an unavoidable consequence of how Blender deals with meshes.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Elements are displayed as follows:&lt;br /&gt;
 &lt;br /&gt;
   cockpit                             -&amp;gt; monkey head&lt;br /&gt;
   fuselage                            -&amp;gt; blue &amp;quot;tube&amp;quot; (with only 12 sides for less clutter); center at &amp;quot;a&amp;quot;&lt;br /&gt;
   vstab                               -&amp;gt; red with yellow flaps&lt;br /&gt;
   wing/mstab/hstab                    -&amp;gt; green with yellow flaps/spoilers/slats (always 20 cm deep);&lt;br /&gt;
                                          symmetric surfaces are only displayed on the left side&lt;br /&gt;
   thrusters (jet/propeller/thruster)  -&amp;gt; dashed line from center to actionpt;&lt;br /&gt;
                                          arrow from actionpt along thrust vector (always 1 m long);&lt;br /&gt;
                                          propeller circle&lt;br /&gt;
   rotor                               -&amp;gt; radius and rel_len_blade_start circle, direction arrow,&lt;br /&gt;
                                          normal and forward vector, one blade at phi0&lt;br /&gt;
   gear                                -&amp;gt; contact point and compression vector (no arrow head)&lt;br /&gt;
   tank                                -&amp;gt; cube (10 cm side length)&lt;br /&gt;
   weight                              -&amp;gt; inverted cone&lt;br /&gt;
   ballast                             -&amp;gt; cylinder&lt;br /&gt;
   hitch                               -&amp;gt; circle (10 cm diameter)&lt;br /&gt;
   hook                                -&amp;gt; dashed line for up angle, T-line for down angle&lt;br /&gt;
   launchbar                           -&amp;gt; dashed line for up angles, T-line for down angles&lt;br /&gt;
A note about step (0) for Windows users: the mentioned path is inside the folder where Blender lives, something like &amp;lt;code&amp;gt;C:\Program Files\Blender Foundation\Blender\.blender\scripts&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Visualize model in OpenSCAD or FreeCAD ===&lt;br /&gt;
&lt;br /&gt;
There exist a possibility to display the YASim XML elements in the OpenSCAD or FreeCAD tools. This could be extremely useful in the case of UAV aircraft development. &lt;br /&gt;
&lt;br /&gt;
* [https://github.com/ThunderFly-aerospace/YASim2SCAD YASim2SCAD] - This tool converts YASim XML to scad file which could be displayed as an overlay in OpenSCAD or FreeCAD project.&lt;br /&gt;
* [https://gitlab.com/yasimtoscad/yasimtoscad yasimtoscad] - Another  tool to convert YASim XML to scad file which could be displayed as an overlay in OpenSCAD.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Visualization tools ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitwisetech/ysimi YSIMI]  Interactive Tuning Tools for FlightGear's YASIM Flight Dynamics Model&lt;br /&gt;
* [https://github.com/bitwisetech/yasiVers yasiVers] is a tool for visualization of YASim calculations.&lt;br /&gt;
&lt;br /&gt;
== Export of YASim internals to property tree ==&lt;br /&gt;
Ever wondered what is going on inside yasim? See the property tree under /fdm/yasim/&lt;br /&gt;
 &lt;br /&gt;
Some information is static and shows what yasim has compiled from your XML. &lt;br /&gt;
Other information is &amp;quot;run-time&amp;quot; like forces, speed, acceleration, c.g. &lt;br /&gt;
&lt;br /&gt;
If note noted otherwise:&lt;br /&gt;
* expect metric unit (meter, kilogram, newton, ...)&lt;br /&gt;
* expect minimum version 2017.2&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Path !! Description !! Information type !! min. version&lt;br /&gt;
|-&lt;br /&gt;
| accelerations/ || linear and rot. accelerations in aircraft coord. || run time ||&lt;br /&gt;
|-&lt;br /&gt;
| debug/ || misc internals, for now subject to change without notice || run time || 2018.1&lt;br /&gt;
|-&lt;br /&gt;
| forces/ || aerodynamic forces in N || run time ||&lt;br /&gt;
|-&lt;br /&gt;
| velocities/ || linear and rot. velocities in aircraft coord. || run time ||&lt;br /&gt;
|-&lt;br /&gt;
| model/cg-x-range-aft || desired CG range || compile time ||&lt;br /&gt;
|-&lt;br /&gt;
| model/cg-x-range-front || desired CG range || compile time ||&lt;br /&gt;
|-&lt;br /&gt;
| model/cg-x-max || CG hard limit from gear position || compile time ||&lt;br /&gt;
|-&lt;br /&gt;
| model/cg-x-min || CG hard limit from gear position || compile time ||&lt;br /&gt;
|-&lt;br /&gt;
| model/masses || shows the calculated mass points || compile time ||&lt;br /&gt;
|-&lt;br /&gt;
| model/wings || wing parameters || compile time ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
By using the standard command line, we can see what the YASim solver is calculating.  First, open up Command Prompt, enter in the location of yasim.exe, and then the location of the YASim XML file.  For example, here's what you would type in for a standard Windows [[Changelog_2.12|FlightGear 2.12.0]] installation, and viewing the [[F-14_Tomcat|F-14B's]] YASim file.&lt;br /&gt;
{{Note|You can copy &amp;amp; paste the examples into Command Prompt by right-clicking on the title and navigate to Edit &amp;gt; Paste.  Then, click Enter to execute.}} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;C:\Program Files\FlightGear\bin\Win32\yasim.exe&amp;quot; &amp;quot;C:\Program Files\FlightGear\data\Aircraft\f-14b\f-14b-yasim.xml&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The results will give many different values.&lt;br /&gt;
&lt;br /&gt;
* '''Drag Coefficient:''' The drag coefficient of the aircraft.&lt;br /&gt;
* '''Lift Ratio:''' The lift ratio of the aircraft.&lt;br /&gt;
* '''Cruise AoA:''' The cruise AoA, from conditions at [[YASim#cruise|&amp;lt;cruise&amp;gt;]] in the xml file.&lt;br /&gt;
* '''Tail Incidence:''' The incidence angle of the tail, &amp;quot;solved&amp;quot; by YASim as a way to stabilize the aircraft.&lt;br /&gt;
* '''Approach Elevator:''' The approach elevator, from conditions at [[YASim#approach|&amp;lt;approach&amp;gt;]] in the xml file.&lt;br /&gt;
* '''CG:''' Center of gravity of the aircraft in coordinates. Unless it's supposed to be offset, it should always have a Y value of 0.&lt;br /&gt;
&lt;br /&gt;
The YASim standalone solver also has some command line flags that change it's behaviour.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;C:\Program Files\FlightGear\bin\Win32\yasim.exe&amp;quot; &amp;quot;C:\Program Files\FlightGear\data\Aircraft\f-14b\f-14b-yasim.xml&amp;quot; -g -a 1000 -s 490&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''-g:''' Instructs YASim to generate space-separated tabular data instead of the usual solver output. This can be redirected to a file and used in various plotting programs to visualize the actual lift, drag, L/D curves. The columns of the output from left to right are: AoA, Lift, Drag, L/D. (aoa in degrees, lift and drag in G's).&lt;br /&gt;
* '''-a &amp;lt;altitude in meter:&amp;gt;''' Run the solver at the given altitude in meter.&lt;br /&gt;
* '''-s &amp;lt;speed in knots&amp;gt;:''' Also run at the given airspeed in knots.&lt;br /&gt;
&lt;br /&gt;
{{Note|The values generated by this method are for the aircraft taken as a whole, as solved by YASim, so they differ from the values of the wing airfoil.}}&lt;br /&gt;
&lt;br /&gt;
To get the tabular output for the example above at 1000 m and 150 knots, and to redirect this to a file, one would issue:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;C:\Program Files\FlightGear\bin\Win32\yasim.exe&amp;quot; &amp;quot;C:\Program Files\FlightGear\data\Aircraft\f-14b\f-14b-yasim.xml&amp;quot; -g -a 1000 -s 150 &amp;gt; &amp;quot;C:\Program Files\FlightGear\yasim.txt&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== New features and bugfixes in version 2017.2 ==&lt;br /&gt;
&lt;br /&gt;
=== XML parser ===&lt;br /&gt;
==== support for metric and imperial units ====&lt;br /&gt;
To make life easier for aircraft developers, the parser supports new additional attributes with a unit suffix, e.g. speed-kt for knots and speed-kmh for kilometers per hour.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;airplane {mass, mass-lbs, mass-kg}=&amp;quot;12345&amp;quot; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;approach {speed, speed-kt, speed-kmh}=&amp;quot;123&amp;quot; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;cruise {speed, speed-kt, speed-kmh}=&amp;quot;123&amp;quot; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;solve-weight {weight, weight-lbs, weight-kg}=&amp;quot;123&amp;quot; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;jet {mass, mass-lbs, mass-kg}=&amp;quot;1234&amp;quot; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;tank {capacity, capacity-lbs, capacity-kg}=&amp;quot;12345&amp;quot; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;ballast {mass, mass-lbs, mass-kg}=&amp;quot;1234&amp;quot; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|Aircraft using this new attributes will not run on older versions of FlightGear, so it is probably wise to publish those only after a reasonable number of users switched version 2017.2 or newer.}}&lt;br /&gt;
&lt;br /&gt;
==== CG tuning help ====&lt;br /&gt;
{{Note| The feature described in this section is not fully implemented yet, however, it may be of some help already.&lt;br /&gt;
It is currently implemented for the yasim CLI tool only. It does not affect the airplane behaviour while running FlightGear. }}&lt;br /&gt;
&lt;br /&gt;
New attributes have been added to &amp;lt;airplane&amp;gt; to assist tuning the center of gravity (CG).&lt;br /&gt;
The CG position is often expressed relative to the [https://en.wikipedia.org/wiki/Chord_(aeronautics)#Mean_aerodynamic_chord MAC] of the wing in percent. You can specify a desired range for CG in % relative to MAC, it will show up in the output of the yasim CLI tool (see example below):&lt;br /&gt;
&lt;br /&gt;
* cg-min: default 25% (just a guess, better numbers are welcome)&lt;br /&gt;
* cg-max: default 30% (just a guess, better numbers are welcome)&lt;br /&gt;
&lt;br /&gt;
{{Note| By convention 0% is leading edge, 100% is trailing edge, however the absolute values on x-axis are the other way round, e.g. nose is +x, tail is -x }}&lt;br /&gt;
{{warning|The MAC calculation in version 2017.2 works only on the &amp;lt;wing&amp;gt; element. Numbers will be wrong, if your model uses a combination of &amp;lt;wing&amp;gt; and &amp;lt;mstab&amp;gt; to build a wing with two or more sections.&lt;br /&gt;
Section support will be added in version 2018.1}}&lt;br /&gt;
YASim will print the leading edge coordinates of the MAC (x,y) and its length.&lt;br /&gt;
&lt;br /&gt;
'''Example output'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ yasim Citation-II-yasim.xml &lt;br /&gt;
This aircraft uses yasim version '2017.2'                                                                                                                                                                                                                                      &lt;br /&gt;
==========================                                                                                                                                                                                                                                                     &lt;br /&gt;
= YASim solution results =                                                                                                                                                                                                                                                     &lt;br /&gt;
==========================                                                                                                                                                                                                                                                     &lt;br /&gt;
       Iterations: 2210                                                                                                                                                                                                                                                        &lt;br /&gt;
 Drag Coefficient: 12.304669                                                                                                                                                                                                                                                   &lt;br /&gt;
       Lift Ratio: 85.317558                                                                                                                                                                                                                                                   &lt;br /&gt;
       Cruise AoA: 4.016746 deg                                                                                                                                                                                                                                                &lt;br /&gt;
   Tail Incidence: -3.053278 deg                                                                                                                                                                                                                                               &lt;br /&gt;
Approach Elevator: -0.377542                                                                                                                                                                                                                                                   &lt;br /&gt;
                                                                                                                                                                                                                                                                               &lt;br /&gt;
               CG: x:-6.543, y:-0.000, z:0.044                                                                                                                                                                                                                                 &lt;br /&gt;
    Wing MAC (*1): x:-6.00, y:3.83, length:2.0                                                                                                                                                                                                                                 &lt;br /&gt;
    CG-x rel. MAC: 0.272                                                                                                                                                                                                                                                       &lt;br /&gt;
    CG-x  desired: -6.599 &amp;lt; -6.543 &amp;lt; -6.198                                                                                                                                                                                                                                    &lt;br /&gt;
                                                                                                                                                                                                                                                                               &lt;br /&gt;
Inertia tensor [kg*m^2], origo at CG:                                                                                                                                                                                                                                          &lt;br /&gt;
                                                                                                                                                                                                                                                                               &lt;br /&gt;
  18009.289,  -0.000, 7120.470                                                                                                                                                                                                                                                 &lt;br /&gt;
   -0.000, 42459.316,   0.000                                                                                                                                                                                                                                                  &lt;br /&gt;
  7120.470,   0.000, 56980.656                                                                                                                                                                                                                                                 &lt;br /&gt;
                                                                                                                                                                                                                                                                               &lt;br /&gt;
(*1) MAC calculation works on &amp;lt;wing&amp;gt; only! Numbers will be wrong for segmented wings, e.g. &amp;lt;wing&amp;gt;+&amp;lt;mstab&amp;gt;.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Aircraft developer helpers ===&lt;br /&gt;
The command line utility got some new options. For some strange reason, the -a parameter expects altitude in meters instead of ft. This is now visible in the usage message but left unchanged for compatibility.&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;Usage:&lt;br /&gt;
  yasim &amp;lt;aircraft.xml&amp;gt; [-g [-a meters] [-s kts] [-approach | -cruise] ]&lt;br /&gt;
  yasim &amp;lt;aircraft.xml&amp;gt; [-d [-a meters] [-approach | -cruise] ]&lt;br /&gt;
  yasim &amp;lt;aircraft.xml&amp;gt; [-m]&lt;br /&gt;
  -g print lift/drag table: aoa, lift, drag, lift/drag &lt;br /&gt;
  -d print drag over TAS: kts, drag&lt;br /&gt;
     -a set altitude in meters!&lt;br /&gt;
     -s set speed in knots&lt;br /&gt;
  -m print mass distribution table: id, x, y, z, mass&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bugfixes ===&lt;br /&gt;
The following bugfixes require &amp;lt;airplane version=&amp;quot;2017.2&amp;quot;&amp;gt; for backward compatibility &lt;br /&gt;
* Ground effect: corrected the calculation of the height where g.e. ends&lt;br /&gt;
* Stall parameters were set wrong for wings with camber=0&lt;br /&gt;
&lt;br /&gt;
== New features and bugfixes in version 2018.1 ==&lt;br /&gt;
The following is under development and hopefully finds its way into FG version 2018.1&lt;br /&gt;
&lt;br /&gt;
=== Wing Section Support ===&lt;br /&gt;
Many airliners have wings with a geometry that is just a little more complex than what YASim supported initially (tapered wing with some angles like sweep, dihedral, ...), e.g. they have an inboard section and an outboard section that can be described with YASim wing syntax. You can use a wing + a mstab XML element to describe this geometry but it is easier if YASim can just append more wing sections by simply adding more wing XML elements. This is now (Version 2018.1) possible, yasim will simply append sections if it finds more than one wing or hstab in the XML.&lt;br /&gt;
You should use '''&amp;amp;lt;wing append=&amp;quot;1&amp;quot; ... &amp;amp;gt;''' for all but the first wing/hstab declaration. &lt;br /&gt;
{{Note|YASim will ignore the root point (x,y,z), the chord length and the incidence attributes, if you add &amp;quot;append&amp;quot; and calculate those from the previous wing section. }}&lt;br /&gt;
MAC calculation works for the whole wing.&lt;br /&gt;
&lt;br /&gt;
{{warning|Aircrafts using this feature will not work with older versions of flightgear. }}&lt;br /&gt;
To keep the aircraft backward compatible for a while, it is recommended to create a copy of its yasim XML file for development. &lt;br /&gt;
Once you are happy with the CG and wing parameters you can use the output of the YASim CLI tool to modifiy the original XML. &lt;br /&gt;
The tool will output the needed x,y,z etc per wing section to create a XML in old format with (only one) &amp;lt;wing&amp;gt; + &amp;lt;mstab&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== More information from CLI tools ===&lt;br /&gt;
You should configure the maximum take of weight (MTOW) in your XML file by adding either ''mtow-lbs'' or ''mtow-kg'' attribute to the airplane:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &amp;amp;lt;airplane mass=&amp;quot;7500&amp;quot; version=&amp;quot;2018.1&amp;quot; mtow-lbs=&amp;quot;12500&amp;quot;&amp;amp;gt; &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example output'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yasim CRJ700.xml &lt;br /&gt;
==========================&lt;br /&gt;
= YASim solution results =&lt;br /&gt;
==========================&lt;br /&gt;
Iterations        : 1024&lt;br /&gt;
Drag Coefficient  : 17.707&lt;br /&gt;
Lift Ratio        : 145.841&lt;br /&gt;
Cruise AoA        : -0.11 deg&lt;br /&gt;
Tail Incidence    : 3.47 deg&lt;br /&gt;
Approach Elevator : -0.792&lt;br /&gt;
&lt;br /&gt;
CG                : x:-0.046, y:0.000, z:-1.222&lt;br /&gt;
Wing MAC          : (x:0.79, y:4.99), length:3.4 &lt;br /&gt;
hard limit CG-x   : 14.232 m&lt;br /&gt;
soft limit CG-x   : -0.058 m&lt;br /&gt;
CG-x              : -0.046 m&lt;br /&gt;
CG-x rel. MAC     :  25%&lt;br /&gt;
soft limit CG-x   : -0.228 m&lt;br /&gt;
hard limit CG-x   : -0.986 m&lt;br /&gt;
&lt;br /&gt;
wing lever        : -0.012 m&lt;br /&gt;
tail lever        : -13.997 m&lt;br /&gt;
&lt;br /&gt;
max thrust        : 157.18 kN&lt;br /&gt;
thrust/empty      : 0.81&lt;br /&gt;
thrust/mtow       : 0.49&lt;br /&gt;
&lt;br /&gt;
wing span         : 22.64 m&lt;br /&gt;
sweep lead. edge  : 30.2 .. 30.6 deg&lt;br /&gt;
wing area         : 58.70 m^2&lt;br /&gt;
wing load empty   : 336.15 kg/m^2 (Empty 19731 kg)&lt;br /&gt;
wing load MTOW    : 562.18 kg/m^2 (MTOW  32999 kg)&lt;br /&gt;
&lt;br /&gt;
tail span         : 8.533 m&lt;br /&gt;
tail area         : 14.838 m^2&lt;br /&gt;
&lt;br /&gt;
#wing sections: 2&lt;br /&gt;
Section 0 base point (0.450, 1.226, -2.034), chord 5.085, incidence at section root 5.0deg&lt;br /&gt;
Section 1 base point (-0.663, 4.754, -1.942), chord 3.204, incidence at section root 3.0deg&lt;br /&gt;
&lt;br /&gt;
Inertia tensor [kg*m^2], origo at CG:&lt;br /&gt;
&lt;br /&gt;
   195646,       0,  122265&lt;br /&gt;
        0, 1757279,       0&lt;br /&gt;
   122265,       0, 1904528&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variable tail incidence / elevator trim ===&lt;br /&gt;
Small GA aircrafts usually trim with a trim tab on the elevator. For efficiency, airliners normally do not trim the elevator (&amp;quot;flap&amp;quot;) but rotate the whole horizontal stabilizer (tail  wing), e.g. they change the incidence for this wing. While this feature was somehow foreseen, it was not implemented yet, most likely because the &amp;quot;tail incidence&amp;quot; is one of the free variables used by the YASim solver. However, it is now possible to use the control=&amp;quot;INCIDENCE&amp;quot; within the &amp;amp;lt;hstab&amp;amp;gt; to implement an alternative trim '''while maintaining full elevator authority'''. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;hstab ... incidence-min-deg=&amp;quot;-13.0&amp;quot; incidence-max-deg=&amp;quot;2.0&amp;quot;&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;control-input axis=&amp;quot;/controls/flight/hstab-trim&amp;quot; control=&amp;quot;INCIDENCE&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;control-speed control=&amp;quot;INCIDENCE&amp;quot; transition-time=&amp;quot;20.0&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;control-output control=&amp;quot;INCIDENCE&amp;quot;  prop=&amp;quot;/surface-positions/hstab-rad&amp;quot; /&amp;gt;  &lt;br /&gt;
&amp;lt;/hstab&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{Note|The control output of INCIDENCE is the angle in radians, not in degree, as that is the unit internally used by YASim.}}&lt;br /&gt;
{{warning|The OPTIONAL incidence-min-deg and incidence-max-deg set the limits for the solver. You must make sure to select a sufficiently large range or solver will fail. }}&lt;br /&gt;
First experiments with this feature were successful in that the aircraft pitch could be changed as expected but fine tuning will be necessary.&lt;br /&gt;
&lt;br /&gt;
==== Trim System Configuration ====&lt;br /&gt;
To have &amp;lt;code&amp;gt;controls.elevatorTrim()&amp;lt;/code&amp;gt; trim the hstab instead of elevator, set &amp;lt;code&amp;gt;/sim/config/hstab-trim&amp;lt;/code&amp;gt; to true (YASim only). &lt;br /&gt;
&lt;br /&gt;
If no detailed system simulation is desired, simply set &amp;lt;code&amp;gt;/systems/hstab-trim/engaged&amp;lt;/code&amp;gt; to true in the aircrafts -set.xml to enable hstab trim. The trim rate is read from &amp;lt;code&amp;gt;/systems/hstab-trim/trim-rate&amp;lt;/code&amp;gt; and can be adjusted if needed (default is set in controls.nas).&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto:Make a helicopter#XML Elements]] &amp;amp;ndash; Rotor and rotorgear YASim elements&lt;br /&gt;
* [[Towing]]&lt;br /&gt;
* [[YASim Development Tools]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* {{cite web&lt;br /&gt;
 | url             = http://www.buckarooshangar.com/flightgear/yasimtut.html&lt;br /&gt;
 | title           = Guide to YASim&lt;br /&gt;
 | first           = Gary R. &amp;quot;Buckaroo&amp;quot;&lt;br /&gt;
 | last            = Neely&lt;br /&gt;
 | authorlink      = http://www.buckarooshangar.com/flightgear/&lt;br /&gt;
 | date            = 2013&lt;br /&gt;
 | accessdate      = April 16, 2020&lt;br /&gt;
 }} - A very helpful guide&lt;br /&gt;
* {{cite web&lt;br /&gt;
 | url             = https://sourceforge.net/projects/dacpei/&lt;br /&gt;
 | title           = DACPEI&lt;br /&gt;
 | author          = pytoche&lt;br /&gt;
 | date            = February 2012&lt;br /&gt;
 | publisher       = SourceForge&lt;br /&gt;
 | accessdate      = April 16, 2020&lt;br /&gt;
 }} - A fixed wing light aircraft WYSIWUG concept design suite that can export an YASim FDM to FlightGear.&lt;br /&gt;
&lt;br /&gt;
{{FDM}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Flight Dynamics Model]]&lt;br /&gt;
&lt;br /&gt;
[[fr:YASim]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=YASim&amp;diff=143742</id>
		<title>YASim</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=YASim&amp;diff=143742"/>
		<updated>2026-03-18T15:06:16Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Variable tail incidence / elevator trim */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:yasimlogo.png|thumb]] &lt;br /&gt;
&lt;br /&gt;
'''YASim''' is one of two [[flight dynamics model]]s commonly used in [[FlightGear]], alongside [[JSBSim]]. The flight dynamics model (FDM) determines how the [[aircraft]] moves and flies.&lt;br /&gt;
&lt;br /&gt;
Gary Neely wrote in his [http://www.buckarooshangar.com/flightgear/ introduction to YASim]:&lt;br /&gt;
&lt;br /&gt;
:''The FDM is the mathematical model that controls the physics of flight within the simulator. The physical 3D aircraft model has nothing to do with flight dynamics-- in essence it's just a picture to look at. It's the FDM that dictates how the model flies.''&lt;br /&gt;
&lt;br /&gt;
:''Why YASim? YASim uses the geometry of the aircraft to generate the base flight characteristics. While this suggests a 'realistic' or out-of-the-box approach, it is a only rough approximation that will require much tweaking before you get a result that approaches realism. If you have solid flight data for your aircraft such as wind-tunnel data or you are looking to eventually generate a hyper-realistic simulation, JSBSim is probably a better approach. If you lack such data but know the geometry of the aircraft and have access to the same flight characteristics and limits as a real pilot would, then YASim can provide a solution that is more than sufficient for most simulation needs.''&lt;br /&gt;
&lt;br /&gt;
== Coordinate system notes ==&lt;br /&gt;
All positions specified are in metres (which is weird, since all other units in the file are English). The X axis points forward, Y is left, and Z is up. Take your right hand, and hold it like a gun. Your first and second fingers are the X and Y axes, and your upwards-pointing thumb is the Z. This is slightly different from the coordinate system used by [[JSBSim]]. Sorry. The origin can be placed anywhere, so long as you are consistent. I use the nose of the aircraft.&lt;br /&gt;
&lt;br /&gt;
(In the [[JSBSim_Aerodynamics#Frames|JSBSim coordinate system]], X and Z are the same as in YASim, but Y points to the right instead of left.)&lt;br /&gt;
&lt;br /&gt;
=== Checking alignment with Blender ===&lt;br /&gt;
&lt;br /&gt;
Blender can display a '''.ac''' model and a yasim model at the same time, allowing one to check whether the wings, gear contact points etc are aligned correctly. But it seems that Blender ignores any top-level &amp;lt;code&amp;gt;loc &amp;lt;x&amp;gt; &amp;lt;y&amp;gt; &amp;lt;z&amp;gt;&amp;lt;/code&amp;gt; specification in the '''.ac''' file, which makes it non-trivial to check alignment if such a specification is used.&lt;br /&gt;
&lt;br /&gt;
== YASim design notes ==&lt;br /&gt;
Andy Ross's original design notes for YASim can be found in [https://pdfhost.io/v/~iYsLl7xS_alldvi.pdf this PDF file]. These provide some useful background for how YASim works.&lt;br /&gt;
&lt;br /&gt;
== XML Elements ==&lt;br /&gt;
&amp;lt;!-- To future editors:  The all lowercase headings are XML tags and should ''probably'' be left that way --&amp;gt;&lt;br /&gt;
=== airplane ===&lt;br /&gt;
The top-level element for the file. It contains the following attributes: &lt;br /&gt;
* '''mass:''' The empty (no fuel) weight, in pounds. It does include the weight of the engine(s), so when you add the engine weight in its tag, it acts just like a ballast.&lt;br /&gt;
* '''version:''' The version attribute is used to maintain compatibility when updating yasim (e.g. bugfixes). If this attribute i not given, the original version will be used. Several bugfixes to YASim were implemented in FlightGear 3.2 (see [[FlightGear Newsletter April 2014]]), some more are fixed in FlightGear 2017.2. &lt;br /&gt;
Available versions are:&lt;br /&gt;
* &amp;lt;code&amp;gt;YASIM_VERSION_ORIGINAL&amp;lt;/code&amp;gt; explicitly use the old buggy calculations (same as no version attribute at all)&lt;br /&gt;
* &amp;lt;code&amp;gt;YASIM_VERSION_32&amp;lt;/code&amp;gt; enable bugfixes up to version 3.2&lt;br /&gt;
* &amp;lt;code&amp;gt;2017.2&amp;lt;/code&amp;gt; enable bugfixes up to version 2017.2&lt;br /&gt;
* &amp;lt;code&amp;gt;2018.1&amp;lt;/code&amp;gt; (FIXME) no bugfixes by now. Use this version if your aircraft makes use of new features in YASim 2018.1 so it will cause at least a warning with older FG versions. &lt;br /&gt;
* &amp;lt;code&amp;gt;YASIM_VERSION_CURRENT&amp;lt;/code&amp;gt; use latest version compiled into the users FlightGear. &lt;br /&gt;
{{Warning| Using YASIM_VERSION_CURRENT might make the aircraft unusable in case of future changes to YASim without updating the aircraft accordingly.}}&lt;br /&gt;
&lt;br /&gt;
'''New in 2018.1'''&lt;br /&gt;
*  '''mtow-lbs''' and '''mtow-kg:''' use one of them to specify max. takeoff weight. Does not affect the FDM, but is used by CLI tool to calculate some numbers.&lt;br /&gt;
&lt;br /&gt;
=== approach ===&lt;br /&gt;
The approach parameters for the aircraft. The solver will generate an aircraft that matches these settings (by adjusting the parameters of the surface like drag and lift). It is extremely important to give parameters which could be really achieved by defined aircraft geometry, otherwise, it gives an unstable or not flyable result. The element can (and should) contain &amp;lt;control&amp;gt; elements indicating pilot input settings, such as flaps and throttle, for the approach.&lt;br /&gt;
&lt;br /&gt;
* '''speed:''' The approach airspeed, in knots TAS.&lt;br /&gt;
* '''aoa:''' The approach angle of attack, in degrees&lt;br /&gt;
* '''fuel:''' Fraction (0-1) of fuel in the tanks. Default is 0.2.&lt;br /&gt;
&lt;br /&gt;
=== cruise ===&lt;br /&gt;
The cruise speed and altitude for the solver to match. As above, this should contain &amp;lt;control&amp;gt; elements indicating aircraft configuration. Especially, make sure the engines are generating enough thrust at cruise!&lt;br /&gt;
* '''speed:''' The cruise speed, in knots TAS.&lt;br /&gt;
* '''alt:''' The cruise altitude, in feet MSL.&lt;br /&gt;
* '''fuel:''' Fraction (0-1) of fuel in the tanks. Default is 0.2.&lt;br /&gt;
=== cockpit ===&lt;br /&gt;
The location of the cockpit (pilot eyepoint).&lt;br /&gt;
* '''x,y,z:''' eyepoint location (see coordinates note)&lt;br /&gt;
&lt;br /&gt;
=== fuselage ===&lt;br /&gt;
This defines a tubelike structure. It will be given an even mass and aerodynamic force distribution by the solver. You can have as many as you like, in any orientation you please.&lt;br /&gt;
* '''ax,ay,az:''' One end of the tube (typically the front)&lt;br /&gt;
* '''bx,by,bz:''' The other (&amp;quot;back&amp;quot;) end.&lt;br /&gt;
* '''width:''' The width of the tube, in metres.&lt;br /&gt;
* '''taper:''' The approximate radius at the &amp;quot;tips&amp;quot; of the fuselage expressed as a fraction (0-1) of the width value.&lt;br /&gt;
* '''midpoint:''' The location of the widest part of the fuselage, expressed as a fraction of the distance between A and B.&lt;br /&gt;
* '''idrag:''' Multiplier for the &amp;quot;induced drag&amp;quot; generated by this object. Default is one. With idrag=0 the fuselage generates only drag.&lt;br /&gt;
* '''cx,cy,cz:''' Factors for the generated drag in the fuselages &amp;quot;local coordinate system&amp;quot; with x pointing from end to front, z perpendicular to x with y=0 in the aircraft coordinate system. E.g. for a fuselage of a height of 2 times the width you can define cy=2 and (due to the doubled front surface) cx=2.&lt;br /&gt;
&lt;br /&gt;
=== Surfaces ===&lt;br /&gt;
==== wing ====&lt;br /&gt;
This defines the main wing of the aircraft. You can have only one (but see below about using vstab objects for extra lifting surfaces). The wing should have a &amp;lt;stall&amp;gt; subelement to indicate stall behavior, control surface subelements (flap0, flap1, spoiler, slat) to indicate what and where the control surfaces are, and &amp;lt;control&amp;gt; subelements to map user input properties to the control surfaces.&lt;br /&gt;
* '''x,y,z:''' The &amp;quot;base&amp;quot; of the wing, specified as the location of the mid-chord (not leading edge, trailing edge, or aerodynamic center) point at the root of the LEFT (!) wing.&lt;br /&gt;
* '''length:''' The length from the midchord point of the base of the wing to the midchord point at the tip. Note that this is not the same thing as span.&lt;br /&gt;
* '''chord:''' The chord of the wing at its base, along the X axis (not normal to the leading edge, as it is sometimes defined).&lt;br /&gt;
* '''incidence:''' The incidence angle at the wing root, in degrees. Zero is level with the fuselage (as in an aerobatic plane), positive means that the leading edge is higher than the trailing edge (as in a trainer).&lt;br /&gt;
* '''twist:''' The difference between the incidence angle at the wing root and the incidence angle at the wing tip. Typically, this is a negative number so that the wing tips have a lower angle of attack and stall after the wing root (washout).&lt;br /&gt;
* '''taper:''' The taper fraction, expressed as the tip chord divided by the root chord. A taper of one is a hershey bar wing, and zero would be a wing ending at a point. Defaults to one.&lt;br /&gt;
* '''sweep:''' The sweep angle of the wing, in degrees. Zero is no sweep, positive angles are swept back. Defaults to zero. [This looks to be the sweep of the mid-chord of the wing, not the sweep of the leading edge.]&lt;br /&gt;
* '''dihedral:''' The dihedral angle of the wing. Positive angles are upward dihedral. Defaults to zero.&lt;br /&gt;
* '''idrag:''' Multiplier for the &amp;quot;induced drag&amp;quot; generated by this surface. In general, low aspect wings will generate less induced drag per-AoA than high aspect (glider) wings. This value isn't constrained well by the solution process, and may require tuning to get throttle settings correct in high AoA (approach) situations.&lt;br /&gt;
* '''effectiveness:''' Multiplier for the &amp;quot;normal&amp;quot; drag generated by the wing. Defaults to 1. Arbitrary, dimensionless factor. &lt;br /&gt;
* '''camber:''' The lift produced by the wing at zero angle of attack, expressed as a fraction of the maximum lift produced at the stall AoA.&lt;br /&gt;
* '''flow:''' The flow regime for the wing. Valid values are &amp;quot;SUBSONIC&amp;quot; (default) and &amp;quot;TRANSONIC&amp;quot;. Setting surface to transonic adds more lift above mach number 0.6 by applying a Prandl/Glauert correction term to each surface-element. The effect is a more balanced lift/drag distribution reported by the solver. Use for anything that flies faster than mach 0.6 or has supercritical airfoils.&lt;br /&gt;
* '''mcrit:''' The critical mach number for the wing. This point defines the begin of exponential drag rise due to mach speed. Default &amp;quot;0.6&amp;quot;, only available if flow=&amp;quot;TRANSONIC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Wing section support (since 2018.1):'''&lt;br /&gt;
&lt;br /&gt;
Wing section support to define variable geometry (geometry parameters per section)&lt;br /&gt;
* More than one &amp;lt;wing&amp;gt;-element is allowed now. &lt;br /&gt;
* x, y, z, chord and incidence attribute shall be specifed only for the first &amp;lt;wing&amp;gt; in the XML file. They will be overridden for subsequent &amp;lt;wing&amp;gt;-elements.&lt;br /&gt;
* Use '''append=&amp;quot;1&amp;quot;''' for additional '''wing''' elements to skip x, y, z, chord and incidence attribute as the will be calculated from previous '''wing''' element tip chord. This workaround is currently needed due to limitations in the XML parser.&lt;br /&gt;
&lt;br /&gt;
==== hstab ====&lt;br /&gt;
These define the horizontal stabilizer of the aircraft. Internally, it is just a wing object and therefore works the same in XML. &lt;br /&gt;
You are allowed only one hstab object; the solver needs to know which wing's incidence to play with to get the aircraft trimmed correctly.&lt;br /&gt;
&lt;br /&gt;
'''New in 2018.1:'''&lt;br /&gt;
* '''hstab''' supports sections in the same way '''wing''' does, but it is still considered as /the/ (only) hstab used by the solver.&lt;br /&gt;
*  '''incidence-min-deg''' and '''incidence-max-deg''': optional attributes to limit valid result range fore the solver. Use with care or you won't get a solution.&lt;br /&gt;
&lt;br /&gt;
==== vstab ====&lt;br /&gt;
A &amp;quot;vertical&amp;quot; stabilizer. Like hstab, this is just another wing, with a few special properties. The surface is not &amp;quot;mirrored&amp;quot; as are wing and hstab objects. If you define a left wing only, you'll only get a left wing. The default dihedral, if unspecified, is 90 degrees instead of zero. But all parameters are equally settable, so there's no requirement that this object be &amp;quot;vertical&amp;quot; at all. You can use it for anything you like, such as extra wings for biplanes. Most importantly, these surfaces are not involved with the solver computation, so you can have none, or as many as you like.&lt;br /&gt;
&lt;br /&gt;
==== mstab ====&lt;br /&gt;
A mirrored horizontal stabilizer. Exactly the same as wing, but not involved with the solver computation, so you can have none, or as many as you like.&lt;br /&gt;
&lt;br /&gt;
==== stall ====&lt;br /&gt;
A subelement of a wing (or hstab/vstab/mstab) that specifies the stall behavior.&lt;br /&gt;
* '''aoa:''' The stall angle (maximum lift) in degrees. Note that this is relative to the wing, not the fuselage (since the wing may have a non-zero incidence angle).&lt;br /&gt;
* '''width:''' The &amp;quot;width&amp;quot; of the stall, in degrees. A high value indicates a gentle stall. Low values are viscious for a non-twisted wing, but are acceptable for a twisted one (since the whole wing will not stall at the same time).&lt;br /&gt;
* '''peak:''' The height of the lift peak, relative to the post-stall secondary lift peak at 45 degrees. Defaults to 1.5. This one is deep voodoo, and probably doesn't need to change much. Bug me for an explanation if you're curious.&lt;br /&gt;
&lt;br /&gt;
==== flap0, flap1, slat, spoiler ====&lt;br /&gt;
These are subelements of wing/hstab/vstab objects, and specify the location and effectiveness of the control surfaces.&lt;br /&gt;
* '''start:''' The position along the wing where the control surface begins.Zero is the root, one is the tip.&lt;br /&gt;
* '''end:''' The position where the surface ends, as above.&lt;br /&gt;
* '''lift:''' The lift multiplier for a flap or slat at full extension. One is a no-op, a typical aileron might be 1.2 or so, a giant jetliner flap 2.0, and a spoiler 0.0. For spoilers, the interpretation is a little different -- they spoil only &amp;quot;prestall&amp;quot; lift. Lift due purely to &amp;quot;flat plate&amp;quot; effects isn't affected. For typical wings that stall at low AoA's essentially all lift is pre-stall and you don't have to care. Jet fighters tend not to have wing spoilers, for exactly this reason. This value is not applicable to slats, which affect stall AoA only.&lt;br /&gt;
* '''drag:''' The drag multiplier, as above. Typically should be higher than the lift multiplier for flaps.&lt;br /&gt;
* '''aoa:''' Applicable only to slats. This indicates the angle by which the stall AoA is translated by the slat extension.&lt;br /&gt;
  &lt;br /&gt;
=== Rotor and rotorgear ===&lt;br /&gt;
YASim has also possibility to simulate rotorcraft blades. The number properties of rotor elements are large therefore are spitted to the separate page  [[Howto:Make a helicopter#XML%20Elements|howto make a helicopter in YASim]].&lt;br /&gt;
&lt;br /&gt;
=== Engine ===&lt;br /&gt;
==== Thruster ====&lt;br /&gt;
A very simple &amp;quot;thrust only&amp;quot; engine object. Useful for things like thrust vectoring nozzles. All it does is map its THROTTLE input axis to its output thrust rating. Does not consume fuel, etc...&lt;br /&gt;
* '''thrust:''' Maximum thrust in pounds&lt;br /&gt;
* '''x,y,z:''' The point on the airframe where thrust will be applied.&lt;br /&gt;
* '''vx,vy,vy:''' The direction of the thrust in airframe coordinates. The vector will be normalized automatically, so any non-zero vector will work fine.&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
  &amp;lt;thruster x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;0.03&amp;quot; vx=&amp;quot;1&amp;quot; vy=&amp;quot;0&amp;quot; vz=&amp;quot;0&amp;quot; thrust=&amp;quot;6.61&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;control-input axis=&amp;quot;/controls/engines/engine[0]/throttle&amp;quot; control=&amp;quot;THROTTLE&amp;quot; src0=&amp;quot;-1&amp;quot; src1=&amp;quot;1&amp;quot; dst0=&amp;quot;-1&amp;quot; dst1=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/thruster&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Jet ====&lt;br /&gt;
A turbojet/fan engine. It accepts a &amp;lt;control&amp;gt; subelement to map a property to its throttle setting, and an &amp;lt;actionpt&amp;gt; subelement to place the action point of the thrust at a different position than the mass of the engine.&lt;br /&gt;
* '''x,y,z:''' The location of the engine, as a point mass. If no actionpt is specified, this will also be the point of application of thrust.&lt;br /&gt;
* '''mass:''' The mass of the engine, in pounds.&lt;br /&gt;
* '''thrust:''' The maximum sea-level thrust, in pounds.&lt;br /&gt;
* '''afterburner:''' Maximum total thrust with afterburner/reheat, in pounds [defaults to &amp;quot;no additional thrust&amp;quot;].&lt;br /&gt;
* '''rotate:''' Vector angle of the thrust in degrees about the Y axis [0].&lt;br /&gt;
* '''n1-idle:''' Idling low pressure core / fan speed [55]. &lt;br /&gt;
* '''n1-max:''' Maximum low pressure core / fan speed [102].&lt;br /&gt;
* '''n2-idle:''' Idling high pressure core speed [73].&lt;br /&gt;
* '''n2-max:''' Maximum high pressure core speed [103].&lt;br /&gt;
* '''tsfc:''' Thrust-specific fuel consumption [0.8]. This should be considerably lower for modern turbofans.&lt;br /&gt;
* '''atsfc:''' (version &amp;gt;= 2016.3.1) Thrust specific fuel consumption with afterburner on. When set to zero defaults to older behaviour where it is calculated from dry fuel consumption [0].&lt;br /&gt;
* '''egt:''' Exhaust gas temperature at takeoff in K [1050].&lt;br /&gt;
* '''epr:''' Engine pressure ratio at takeoff [3.0].&lt;br /&gt;
* '''exhaust-speed:''' The maximum exhaust speed in knots [~1555].&lt;br /&gt;
* '''spool-time:''' Time, in seconds, for the engine to respond to 90% of a commanded powersetting.&lt;br /&gt;
&lt;br /&gt;
==== Propeller ====&lt;br /&gt;
A propeller. This element requires an engine subtag. Currently &amp;lt;piston-engine&amp;gt; and &amp;lt;turbine-engine&amp;gt; are supported.&lt;br /&gt;
* '''x,y,z:''' The position of the mass (!) of the engine/propeller combination. If the point of force application is different (and it will be) it should be set with an &amp;lt;actionpt&amp;gt; subelement.&lt;br /&gt;
* '''mass:''' The mass of the engine/propeller, in pounds.&lt;br /&gt;
* '''moment:''' The moment, in kg-metres^2. This has to be hand calculated and guessed at for now. A more automated system will be forthcoming. Use a negative moment value for counter-rotating (&amp;quot;European&amp;quot; -- CCW as seen from behind the prop) propellers. A good guess for this value is the radius of the prop (in meters) squared times the mass (kg) divided by three; that is the moment of a plain &amp;quot;stick&amp;quot; bolted to the prop shaft.&lt;br /&gt;
* '''radius:''' The radius, in meters, or the propeller.&lt;br /&gt;
* '''cruise-speed:''' The max efficiency cruise speed of the propeller. Generally not the same as the aircraft's cruise speed.&lt;br /&gt;
* '''cruise-rpm:''' The RPM of the propeller at max-eff. cruise.&lt;br /&gt;
* '''cruise-power:''' The power sunk by the prop at cruise, in horsepower.&lt;br /&gt;
* '''cruise-alt:''' The reference cruise altitude in feet.&lt;br /&gt;
* '''takeoff-power:''' The takeoff power required by the propeller...&lt;br /&gt;
* '''takeoff-rpm:''' ...at the given takeoff RPM.&lt;br /&gt;
* '''gear-ratio:''' The factor by which the engine RPM is multiplied to produce the propeller RPM. Optional (defaults to 1.0).&lt;br /&gt;
* '''contra:''' When set (contra=&amp;quot;1&amp;quot;), this indicates that the propeller is a contra-rotating pair. It will not contribute to the aircraft's net gyroscopic moment, nor will it produce asymmetric torque on the aircraft body. Asymmetric slipstream effects, when implemented, will also be zero when this is set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
YASim assumes a fixed-pitch propeller by default. If your engine is using a constant-speed propeller, you'll also need to provide these attributes:&lt;br /&gt;
&lt;br /&gt;
* '''min-rpm:''' The minimum operational RPM for a constant speed propeller. This is the speed to which the prop governor will seek when the blue lever is at a minimum. The coarse-stop attribute limits how far the governor can go into trying to reach this RPM.&lt;br /&gt;
* '''max-rpm:''' The maximum operational RPM for a constant speed propeller. See above. The fine-stop attribute limits how far the governor can go in trying to reach this RPM.&lt;br /&gt;
* '''fine-stop:''' The minimum pitch of the propeller (high RPM) as a ratio of ideal cruise pitch. This is set to 0.25 by default -- a higher value will result in a lower RPM at low power settings (e.g. idle, taxi, and approach).&lt;br /&gt;
* '''coarse-stop:''' The maximum pitch of the propeller (low RPM) as a ratio of ideal cruise pitch. This is set to 4.0 by default -- a lower value may result in a higher RPM at high power settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== piston-engine =====&lt;br /&gt;
&lt;br /&gt;
A piston engine definition. This must be a subelement of an enclosing &amp;lt;propeller&amp;gt; tag.&lt;br /&gt;
&lt;br /&gt;
* '''eng-power:''' Maximum BHP of the engine at sea level.&lt;br /&gt;
* '''eng-rpm:''' The engine RPM at which eng-power is developed&lt;br /&gt;
* '''displacement:''' The engine displacement in cubic inches.&lt;br /&gt;
* '''compression:''' The engine compression ratio.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
    	&amp;lt;piston-engine eng-power=&amp;quot;2&amp;quot; eng-rpm=&amp;quot;3800&amp;quot; displacement=&amp;quot;20&amp;quot; &amp;gt;&lt;br /&gt;
    		&amp;lt;control-input axis=&amp;quot;/controls/engines/engine[0]/throttle&amp;quot; control=&amp;quot;THROTTLE&amp;quot;/&amp;gt;&lt;br /&gt;
    		&amp;lt;control-input axis=&amp;quot;/controls/engines/engine[0]/starter&amp;quot; control=&amp;quot;STARTER&amp;quot;/&amp;gt;&lt;br /&gt;
    		&amp;lt;control-input axis=&amp;quot;/controls/engines/engine[0]/magnetos&amp;quot; control=&amp;quot;MAGNETOS&amp;quot;/&amp;gt;&lt;br /&gt;
    		&amp;lt;control-input axis=&amp;quot;/controls/engines/engine[0]/mixture&amp;quot; control=&amp;quot;MIXTURE&amp;quot;/&amp;gt;&lt;br /&gt;
    	&amp;lt;/piston-engine&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== electric-engine =====&lt;br /&gt;
&lt;br /&gt;
A simplified electric DC engine model. The model is available since the end of April 2020, therefore it is currently available in daily build FlightGear snapshots. This definition must be a subelement of an enclosing &amp;lt;propeller&amp;gt; tag.&lt;br /&gt;
&lt;br /&gt;
* '''Kv''' electric engine constant in revolutions per minute to volt. &lt;br /&gt;
* '''voltage''' The voltage applied to the motor e.g. Nominal battery voltage in Volts. &lt;br /&gt;
* '''Rm''' The engine winding resistance in Ohms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
  &amp;lt;propeller x=&amp;quot;0.02&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;0.03&amp;quot;&lt;br /&gt;
      mass=&amp;quot;0.05&amp;quot;&lt;br /&gt;
      moment=&amp;quot;0.0006&amp;quot;&lt;br /&gt;
      radius=&amp;quot;0.203&amp;quot;&lt;br /&gt;
      cruise-speed=&amp;quot;26&amp;quot;&lt;br /&gt;
      cruise-rpm=&amp;quot;7000&amp;quot;&lt;br /&gt;
      cruise-power=&amp;quot;0.5&amp;quot;&lt;br /&gt;
      cruise-alt=&amp;quot;2000&amp;quot;&lt;br /&gt;
      takeoff-power=&amp;quot;0.70&amp;quot;&lt;br /&gt;
      takeoff-rpm=&amp;quot;9200&amp;quot;&lt;br /&gt;
      contra=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;actionpt x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;0.03&amp;quot;/&amp;gt;&lt;br /&gt;
    	&amp;lt;electric-engine Kv=&amp;quot;750&amp;quot; voltage=&amp;quot;15&amp;quot; Rm=&amp;quot;0.02&amp;quot; &amp;gt;&lt;br /&gt;
    		&amp;lt;control-input axis=&amp;quot;/controls/engines/engine[0]/throttle&amp;quot; control=&amp;quot;THROTTLE&amp;quot;/&amp;gt;&lt;br /&gt;
    	&amp;lt;/electric-engine&amp;gt;&lt;br /&gt;
  &amp;lt;/propeller&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Landing gear ===&lt;br /&gt;
==== gear ====&lt;br /&gt;
Defines a landing gear. Accepts &amp;lt;control&amp;gt; subelements to map properties to steering and braking. Can also be used to simulate floats. Although the coefficients are still called ..fric, it is calculated in fluids as a drag (proportional to the square of the speed). In fluids gears are not considered to detect crashes (as on ground). &lt;br /&gt;
* '''x,y,z:''' The location of the fully-extended gear tip.&lt;br /&gt;
* '''compression:''' The distance in metres along the &amp;quot;up&amp;quot; axis that the gear will compress.&lt;br /&gt;
* '''initial-load:''' The initial load of the spring in multiples of compression. Defaults to 0. (With this parameter a lower spring-constants will be used for the gear-&amp;gt; can reduce numerical problems (jitter)) '''Note:''' the spring-constant is varied from 0% compression to 20% compression to get continuous behavior around 0 compression. (could be physically explained by wheel deformation)&lt;br /&gt;
* '''upx/upy/upz:''' The direction of compression, defaults to vertical (0,0,1) if unspecified. These are used only for a direction -- the vector need not be normalized, as the length is specified by &amp;quot;compression&amp;quot;.&lt;br /&gt;
* '''sfric:''' Static (non-skidding) coefficient of friction. Defaults to 0.8.&lt;br /&gt;
* '''dfric:''' Dynamic friction. Defaults to 0.7.&lt;br /&gt;
* '''stiction:''' Stiction to ground. Defaults to 0. stiction = &amp;quot;1&amp;quot; ensures the gear isn't sliding unintentionally (Note: please correct docu here for more detailed facts, developers didn't document this extension here and this is based on trial and guessing only)&lt;br /&gt;
* '''spring:''' A dimensionless multiplier for the automatically generated spring constant. Increase to make the gear stiffer, decrease to make it squishier.&lt;br /&gt;
* '''damp:''' A dimensionless multiplier for the automatically generated damping coefficient. Decrease to make the gear &amp;quot;bouncier&amp;quot;, increase to make it &amp;quot;slower&amp;quot;. Beware of increasing this too far: very high damping forces can make the numerics unstable. If you can't make the gear stop bouncing with this number, try increasing the compression length instead.&lt;br /&gt;
* '''on-water:''' if this is set to &amp;quot;0&amp;quot; the gear will be ignored if on water. Defaults to &amp;quot;0&amp;quot;&lt;br /&gt;
* '''on-solid:''' if this set to &amp;quot;0&amp;quot; the gear will be ignored if not on water. Defaults to &amp;quot;1&amp;quot;&lt;br /&gt;
* '''speed-planing:'''&lt;br /&gt;
* '''spring-factor-not-planing:''' At zero speed the spring factor is multiplied by spring-factor-not-planing. Above speed-planing this factor is equal to 1. The idea is, to use this for floats simulating the transition from swimming to planing. speed-planing defaults to 0, spring-factor-not-planing defaults to 1.&lt;br /&gt;
* '''reduce-friction-by-extension:''' at full extension the friction is reduced by this relative value. 0.7 means 30% friction at full extension. If you specify a value greater than one, the friction will be zero before reaching full extension. Defaults to &amp;quot;0&amp;quot;&lt;br /&gt;
* '''ignored-by-solver:''' with the on-water/on-solid tags you can have more than one set of gears in one aircraft, If the solver (who automatically generates the spring constants) would take all gears into account, the result would be wrong. E. G. set this tag to &amp;quot;1&amp;quot; for all gears, which are not active on runways. Defaults to &amp;quot;0&amp;quot;. You can not exclude all gears in the solving process.&lt;br /&gt;
&lt;br /&gt;
Will define two properties associated with compression of landing gear:&lt;br /&gt;
&lt;br /&gt;
* '''compression-norm''' - range from 0..1, 0 means gear fully extended, 1 means fully compressed.&lt;br /&gt;
* '''compression-m''' - vertical distance in metres that the wheel has moved in order to be on top of ground; this will usually be different from the animation distance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
  &amp;lt;!-- front gear --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;gear x=&amp;quot;0.0&amp;quot; y=&amp;quot;0.0&amp;quot; z=&amp;quot;-0.205&amp;quot;&lt;br /&gt;
    spring=&amp;quot;0.9&amp;quot;&lt;br /&gt;
    damp=&amp;quot;0.8&amp;quot;&lt;br /&gt;
    dfric=&amp;quot;0.9&amp;quot;&lt;br /&gt;
    sfric=&amp;quot;1.1&amp;quot;&lt;br /&gt;
    compression=&amp;quot;0.051&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;control-input axis=&amp;quot;/controls/flight/rudder&amp;quot; control=&amp;quot;STEER&amp;quot; square=&amp;quot;true&amp;quot; src0=&amp;quot;-1.0&amp;quot; src1=&amp;quot;1.0&amp;quot; dst0=&amp;quot;-0.3&amp;quot; dst1=&amp;quot;0.3&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;control-input axis=&amp;quot;/controls/gear/brake-right&amp;quot; control=&amp;quot;BRAKE&amp;quot; split=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;control-input axis=&amp;quot;/controls/gear/brake-parking&amp;quot; control=&amp;quot;BRAKE&amp;quot; split=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/gear&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- two rear gears --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;gear x=&amp;quot;-0.4&amp;quot; y=&amp;quot;0.25&amp;quot; z=&amp;quot;-0.205&amp;quot;&lt;br /&gt;
    spring=&amp;quot;0.9&amp;quot;&lt;br /&gt;
    damp=&amp;quot;0.8&amp;quot;&lt;br /&gt;
    dfric=&amp;quot;0.9&amp;quot;&lt;br /&gt;
    sfric=&amp;quot;1.1&amp;quot;&lt;br /&gt;
    compression=&amp;quot;0.051&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;control-input axis=&amp;quot;/controls/gear/brake-right&amp;quot; control=&amp;quot;BRAKE&amp;quot; split=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;control-input axis=&amp;quot;/controls/gear/brake-parking&amp;quot; control=&amp;quot;BRAKE&amp;quot; split=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/gear&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;gear x=&amp;quot;-0.4&amp;quot; y=&amp;quot;-0.25&amp;quot; z=&amp;quot;-0.205&amp;quot;&lt;br /&gt;
    spring=&amp;quot;0.9&amp;quot;&lt;br /&gt;
    damp=&amp;quot;0.8&amp;quot;&lt;br /&gt;
    dfric=&amp;quot;0.9&amp;quot;&lt;br /&gt;
    sfric=&amp;quot;1.1&amp;quot;&lt;br /&gt;
    compression=&amp;quot;0.051&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;control-input axis=&amp;quot;/controls/gear/brake-left&amp;quot; control=&amp;quot;BRAKE&amp;quot; split=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;control-input axis=&amp;quot;/controls/gear/brake-parking&amp;quot; control=&amp;quot;BRAKE&amp;quot; split=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/gear&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Torus-shaped contact surface on next =====&lt;br /&gt;
&lt;br /&gt;
On next as of 2022-3-19 one can specify a torus-shaped tyre contact surface using these new parameters:&lt;br /&gt;
&lt;br /&gt;
* '''wheel-x'''&lt;br /&gt;
* '''wheel-y'''&lt;br /&gt;
* '''wheel-z'''&lt;br /&gt;
* '''wheel-radius''' (default 0)&lt;br /&gt;
* '''tyre-radius''' (default 0)&lt;br /&gt;
* '''wheel-axle-x'''&lt;br /&gt;
* '''wheel-axle-y'''&lt;br /&gt;
* '''wheel-axle-z'''&lt;br /&gt;
&lt;br /&gt;
The contact point will be the lowest point on a torus with radius '''tyre-radius''' wrapped around a wheel with radius '''wheel-radius''' centred on point '''(wheel-x, wheel-y, wheel-z)''' with orientation defined by '''wheel-axle'''. This contact point will depend on the aircraft's orientation relative to the ground.&lt;br /&gt;
&lt;br /&gt;
If not specified, '''wheel-axle''' defaults to (0, 1, 0), giving a conventional vertical wheel in line with the aircraft. Other values may allow modelling of, for example, a Bf109's non-vertical undercarriage.&lt;br /&gt;
&lt;br /&gt;
Default values of zero for wheel-radius and tyre-radius give a fixed contact point at (wheel-x, wheel-y, wheel-z).&lt;br /&gt;
&lt;br /&gt;
If an aircraft also specifies an old-style contact point with '''(x, y, z)''' it will work with both new and old builds of Flightgear.&lt;br /&gt;
&lt;br /&gt;
==== Launchbar ====&lt;br /&gt;
Defines a catapult launchbar or strop.&lt;br /&gt;
* '''x,y,z:''' The location of the mount point of the launch bar or strop on the aircraft.&lt;br /&gt;
* '''length:''' The length of the launch bar from mount point to tip&lt;br /&gt;
* '''down-angle:''' The max angle below the horizontal the launchbar can achieve.&lt;br /&gt;
* '''up-angle:''' The max angle above the horizontal the launchbar can achieve.&lt;br /&gt;
* '''holdback-{x,y,z}:''' The location of the holdback mount point on the aircraft.&lt;br /&gt;
* '''holdback-length:''' The length of the holdback from mount point to tip. Note: holdback up-angle and down-angle are the same as those defined for the launchbar and are not specified in the configuration.&lt;br /&gt;
&lt;br /&gt;
=== Fuel ===&lt;br /&gt;
==== tank ====&lt;br /&gt;
A fuel tank. Tanks in the aircraft are identified numerically (starting from zero), in the order they are defined in the file. If the left tank is first, &amp;quot;tank[0]&amp;quot; will be the left tank. &lt;br /&gt;
* '''x,y,z:''' The location of the tank.&lt;br /&gt;
* '''capacity:''' The maximum contents of the tank, in pounds. Not gallons -- YASim supports fuels of varying densities.&lt;br /&gt;
* '''jet:''' A boolean. If present, this causes the fuel density to be treated as Jet-A. Otherwise, gasoline density is used. A more elaborate density setting (in pounds per gallon, for example) would be easy to implement. Bug me.&lt;br /&gt;
&lt;br /&gt;
=== Center of Gravity ===&lt;br /&gt;
==== Ballast ====&lt;br /&gt;
This is a mechanism for modifying the mass distribution of the aircraft. A ballast setting specifies that a particular amount of the empty weight of the aircraft must be placed at a given location. The remaining non-ballast weight will be distributed &amp;quot;intelligently&amp;quot; across the fuselage and wing objects. Note again: this does NOT change the empty weight of the aircraft. &lt;br /&gt;
* '''x,y,z:''' The location of the ballast.&lt;br /&gt;
* '''mass:''' How much mass, in pounds, to put there. Note that this value can be negative. I find that I often need to &amp;quot;lighten&amp;quot; the tail of the aircraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
  &amp;lt;ballast  x=&amp;quot;-0.24&amp;quot; y=&amp;quot;0.0&amp;quot; z=&amp;quot;0.33&amp;quot; mass-kg=&amp;quot;0.5&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Weight ====&lt;br /&gt;
This is an added weight, something not part of the empty weight of the aircraft, like passengers, cargo, or external stores. The actual value of the mass is not specified here, instead, a mapping to a property is used. This allows external code, such as the panel, to control the weight (loading a given cargo configuration from preference files, dropping bombs at runtime, etc...)&lt;br /&gt;
* '''x,y,z:''' The location of the weight.&lt;br /&gt;
* '''mass-prop:''' The name of the fgfs property containing the mass, in pounds, of this weight.&lt;br /&gt;
* '''size:''' The aerodynamic &amp;quot;size&amp;quot;, in metres, of the object. This is important for external stores, which will cause drag. For reasonably aerodynamic stuff like bombs, the size should be roughly the width of the object. For other stuff, you're on your own. The default is zero, which results in no aerodynamic force (internal cargo).&lt;br /&gt;
* '''solve-weight:''' Subtag of approach and cruise parameters. Used to specify a non-zero setting for a &amp;lt;weight&amp;gt; tag during solution. The default is to assume all weights are zero at the given performance numbers.&lt;br /&gt;
* '''idx:''' Index of the weight in the file (starting with zero).&lt;br /&gt;
* '''weight:''' Weight setting in pounds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
  &amp;lt;weight x=&amp;quot;-0.06471&amp;quot; y=&amp;quot;0.225&amp;quot; z=&amp;quot;-0.2&amp;quot;  mass-prop=&amp;quot;/sim/weight[0]/weight-kg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Controls ===&lt;br /&gt;
==== control-input ====&lt;br /&gt;
This element manages a mapping from fgfs properties (user input) to settable values on the aircraft's objects. Note that the value to be set MUST (!) be valid on the given object type. This is not checked for by the parser, and will cause a runtime crash if you try it. Wing's don't have throttle controls, etc... Note that multiple axes may be set on the same value. They are summed before setting.&lt;br /&gt;
* '''axis:''' The name of the double-valued fgfs property &amp;quot;axis&amp;quot; to use as input, such as &amp;quot;/controls/flight/aileron&amp;quot;.&lt;br /&gt;
* '''control:''' Which control axis to set on the objects. It can have the following values:&lt;br /&gt;
** THROTTLE - The throttle on a jet or propeller. &lt;br /&gt;
** MIXTURE - The mixture on a propeller.&lt;br /&gt;
** REHEAT - The afterburner on a jet&lt;br /&gt;
** PROP - The propeller advance&lt;br /&gt;
** BRAKE - The brake on a gear.&lt;br /&gt;
** STEER - The steering angle on a gear. &lt;br /&gt;
** INCIDENCE - The incidence angle of a wing.&lt;br /&gt;
** FLAP0 - The flap0 deflection of a wing. &lt;br /&gt;
** FLAP1 - The flap1 deflection of a wing. &lt;br /&gt;
** SLAT - The slat extension of a wing. &lt;br /&gt;
** SPOILER - The spoiler extension for a wing. &lt;br /&gt;
** CYCLICAIL - The &amp;quot;aileron&amp;quot; cyclic input of a rotor &lt;br /&gt;
** CYCLICELE - The &amp;quot;elevator&amp;quot; cyclic input of a rotor &lt;br /&gt;
** COLLECTIVE - The collective input of a rotor&lt;br /&gt;
** ROTORENGINEON - If not equal zero the rotor is rotating &lt;br /&gt;
** WINCHRELSPEED - The relative winch speed &lt;br /&gt;
** {... and many more, see [https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/src/FDM/YASim/ControlMap.cpp#l25 ControlMap.cpp] ...}&lt;br /&gt;
* '''invert:''' Negate the value of the property before settling on the object.&lt;br /&gt;
* '''split:''' Applicable to wing control surfaces. Sets the normal value on the left-wing, and a negated value on the right-wing.&lt;br /&gt;
* '''square:''' Squares the value before setting. Useful for controls like a steering that needs a wide range, yet lots of sensitivity in the center. Obviously only applicable to values that have a range of [-1:1] or [0:1]. &lt;br /&gt;
* '''src0/src1/dst0/dst1:''' If present, these define a linear mapping from the source to the output value. Input values in the range src0-src1 are mapped linearly to dst0-dst1, with clamping for input values that lie outside the range.&lt;br /&gt;
&lt;br /&gt;
==== control-output ====&lt;br /&gt;
This can be used to pass the value of a YASim control axis (after all mapping and summing is applied) back to the property tree.&lt;br /&gt;
* '''control:''' Name of the control axis. See above.&lt;br /&gt;
* '''prop:''' Property node to receive the value.&lt;br /&gt;
* '''side:''' Optional, for split controls. Either &amp;quot;right&amp;quot; or &amp;quot;left&amp;quot; &lt;br /&gt;
* '''min/max:''' Clamping applied to output value.&lt;br /&gt;
&lt;br /&gt;
==== control-speed ====&lt;br /&gt;
Some controls (most notably flaps and hydraulics) have maximum slew rates and cannot respond instantly to pilot input. This can be implemented with a control-speed tag, which defines a &amp;quot;transition time&amp;quot; required to slew through the full input range. Note that this tag is semi-deprecated, complicated control input filtering can be done much more robustly from a Nasal script.&lt;br /&gt;
* '''control:''' Name of the control axis. See above.&lt;br /&gt;
* '''transition-time:''' Time in seconds to slew through input range.&lt;br /&gt;
&lt;br /&gt;
==== control-setting ====&lt;br /&gt;
This tag is used to define a particular setting for a control axis inside the &amp;lt;cruise&amp;gt; or &amp;lt;approach&amp;gt; tags, where obviously property input is not available. It can be used, for example, to inform the solver that the approach performance values assume full flaps, etc...&lt;br /&gt;
* '''axis:''' Name of the control input (i.e. a property name)&lt;br /&gt;
* '''value:''' Value of the control axis.&lt;br /&gt;
&lt;br /&gt;
=== Winch and Aerotow ===&lt;br /&gt;
==== hitch ====&lt;br /&gt;
A hitch, can be used for winch-start (in gliders) or aerotow (in gliders and motor aircraft) or for external cargo with helicopter. You can do aerotow over the net via multiplayer (see j3 and bocian as an example).&lt;br /&gt;
* '''name:''' the name of the hitch. must be aerotow if you want to do aerotow via multiplayer. You will find many properties at /sim/hitches/name. Most of them are directly tied to the internal variables, you can modify them as you like. You can add a listener to the property &amp;quot;broken&amp;quot;, e. g. for playing a sound.&lt;br /&gt;
* '''x,y,z:''' The position of the hitch&lt;br /&gt;
* '''force-is-calculated-by-other:''' if you want to simulate aerotowing over the internet, set this value to &amp;quot;1&amp;quot; in the motor aircraft. Don't specify or set this to zero in gliders. In a LAN the time lag might be small enough to set it on both aircraft to &amp;quot;0&amp;quot;. It's intended, that this is done automatically in the future.&lt;br /&gt;
==== tow ====&lt;br /&gt;
The tow used for aerotow or winch. This must be a subelement of an enclosing &amp;lt;hitch&amp;gt; tag.&lt;br /&gt;
* '''length:''' upstretched length in metres&lt;br /&gt;
* '''weight-per-meter:''' in kg/metre&lt;br /&gt;
* '''elastic-constant:''' lower values give higher elasticity&lt;br /&gt;
* '''break-force:''' in N&lt;br /&gt;
* '''mp-auto-connect-period:''' the every x seconds a towed multiplayer aircraft is searched. If found, this tow is connected automatically, parameters are copied from the other aircraft. Should be set only in the motor aircraft, not in the glider&lt;br /&gt;
==== winch ====&lt;br /&gt;
The tow used for aerotow or winch. This must be a subelement of an enclosing &amp;lt;hitch&amp;gt; tag.&lt;br /&gt;
* '''max-tow-length:''' in m&lt;br /&gt;
* '''min-tow-length''': in m&lt;br /&gt;
* '''initial-tow-length:''' in m. The initial tow length also defines the length/search radius used for the mp-autoconnect feature&lt;br /&gt;
* '''max-winch-speed:''' in m/s&lt;br /&gt;
* '''power:''' in kW&lt;br /&gt;
* '''max-force:''' in N&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
&amp;lt;hitch name=&amp;quot;winch&amp;quot; x=&amp;quot;0.0&amp;quot; y=&amp;quot;0.0&amp;quot; z=&amp;quot;0.0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tow length=&amp;quot;50&amp;quot; weight-per-meter=&amp;quot;0.0035&amp;quot; elastic-constant=&amp;quot;40000&amp;quot; break-force=&amp;quot;10000&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;!-- 3mm paracord--&amp;gt;&lt;br /&gt;
    &amp;lt;winch max-tow-length=&amp;quot;1000&amp;quot; min-tow-length=&amp;quot;1&amp;quot; initial-tow-length=&amp;quot;1000&amp;quot; max-winch-speed=&amp;quot;20&amp;quot; power=&amp;quot;2&amp;quot; max-force=&amp;quot;80&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;control-input axis=&amp;quot;/controls/winch/place&amp;quot; control=&amp;quot;PLACEWINCH&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/hitch&amp;gt;&lt;br /&gt;
&amp;lt;hitch name=&amp;quot;aerotow&amp;quot; x=&amp;quot;0.0&amp;quot; y=&amp;quot;0.0&amp;quot; z=&amp;quot;0.0&amp;quot; force-is-calculated-by-other=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tow length=&amp;quot;60&amp;quot; weight-per-meter=&amp;quot;0.0035&amp;quot; elastic-constant=&amp;quot;9000&amp;quot; break-force=&amp;quot;100&amp;quot; mp-auto-connect-period=&amp;quot;0.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;winch max-tow-length=&amp;quot;1000&amp;quot; min-tow-length=&amp;quot;60&amp;quot; initial-tow-length=&amp;quot;60&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;control-input axis=&amp;quot;/controls/aerotow/find-aircraft&amp;quot; control=&amp;quot;FINDAITOW&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/hitch&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Visualization ==&lt;br /&gt;
&lt;br /&gt;
=== Blender visualization tool ===&lt;br /&gt;
&lt;br /&gt;
[[File:Yasim_visualisation_dc6.png|thumb|dc6 FDM in Blender]]To make the programmed aircraft visible it is possible to load and compare it with the 3D model within [[Blender]]. They applaud for this ''very'' useful script goes to M. Franz, thank you very much!&lt;br /&gt;
&lt;br /&gt;
For Blender versions &amp;lt;= 2.4 the script is located in FlightGears source code {{flightgear file|utils/Modeller/yasim_import.py}}.&lt;br /&gt;
&lt;br /&gt;
For Blender versions newer than 2.4, please see [[Blender YASim import]].&lt;br /&gt;
&lt;br /&gt;
The howto, taken from inside the script:&lt;br /&gt;
&lt;br /&gt;
 yasim_import.py loads and visualizes a YASim FDM geometry&lt;br /&gt;
 =========================================================&lt;br /&gt;
 &lt;br /&gt;
 It is recommended to load the model superimposed over a greyed out and immutable copy of the aircraft model:&lt;br /&gt;
 &lt;br /&gt;
   (0) put this script into ~/.blender/scripts/&lt;br /&gt;
   (1) load or import aircraft model (menu -&amp;gt; &amp;quot;File&amp;quot; -&amp;gt; &amp;quot;Import&amp;quot; -&amp;gt; &amp;quot;AC3D (.ac) ...&amp;quot;)&lt;br /&gt;
   (2) create new *empty* scene (menu -&amp;gt; arrow button left of &amp;quot;SCE:scene1&amp;quot; combobox -&amp;gt; &amp;quot;ADD NEW&amp;quot; -&amp;gt; &amp;quot;empty&amp;quot;)&lt;br /&gt;
   (3) rename scene to yasim (not required)&lt;br /&gt;
   (4) link to scene1 (F10 -&amp;gt; &amp;quot;Output&amp;quot; tab -&amp;gt; arrow button left of text entry &amp;quot;No Set Scene&amp;quot; -&amp;gt; &amp;quot;scene1&amp;quot;)&lt;br /&gt;
   (5) now load the YASim config file (menu -&amp;gt; &amp;quot;File&amp;quot; -&amp;gt; &amp;quot;Import&amp;quot; -&amp;gt; &amp;quot;YASim (.xml) ...&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 This is good enough for simple checks. But if you are working on the YASim configuration, then you need a&lt;br /&gt;
 quick and convenient way to reload the file. In that case, continue after (4):&lt;br /&gt;
 &lt;br /&gt;
   (5) switch the button area at the bottom of the blender screen to &amp;quot;Scripts Window&amp;quot; mode (green python snake icon)&lt;br /&gt;
   (6) load the YASim config file (menu -&amp;gt; &amp;quot;Scripts&amp;quot; -&amp;gt; &amp;quot;Import&amp;quot; -&amp;gt; &amp;quot;YASim (.xml) ...&amp;quot;)&lt;br /&gt;
   (7) make the &amp;quot;Scripts Window&amp;quot; area as small as possible by dragging the area separator down&lt;br /&gt;
   (8) optionally split the &amp;quot;3D View&amp;quot; area and switch the right part to the &amp;quot;Outliner&amp;quot;&lt;br /&gt;
   (9) press the &amp;quot;Reload YASim&amp;quot; button in the script area to reload the file&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 If the 3D model is displaced with respect to the FDM model, then the &amp;lt;offsets&amp;gt; values from the&lt;br /&gt;
 model animation XML file should be added as comment to the YASim config file, as a line all by&lt;br /&gt;
 itself, with no spaces surrounding the equal signs. Spaces elsewhere are allowed. For example:&lt;br /&gt;
 &lt;br /&gt;
   &amp;lt;offsets&amp;gt;&lt;br /&gt;
       &amp;lt;x-m&amp;gt;3.45&amp;lt;/x-m&amp;gt;&lt;br /&gt;
       &amp;lt;z-m&amp;gt;-0.4&amp;lt;/z-m&amp;gt;&lt;br /&gt;
       &amp;lt;pitch-deg&amp;gt;5&amp;lt;/pitch-deg&amp;gt;&lt;br /&gt;
   &amp;lt;/offsets&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 becomes:&lt;br /&gt;
 &lt;br /&gt;
   &amp;lt;!-- offsets: x=3.45 z=-0.4 p=5 --&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Possible variables are:&lt;br /&gt;
 &lt;br /&gt;
   x ... &amp;lt;x-m&amp;gt;&lt;br /&gt;
   y ... &amp;lt;y-m&amp;gt;&lt;br /&gt;
   z ... &amp;lt;z-m&amp;gt;&lt;br /&gt;
   h ... &amp;lt;heading-deg&amp;gt;&lt;br /&gt;
   p ... &amp;lt;pitch-deg&amp;gt;&lt;br /&gt;
   r ... &amp;lt;roll-deg&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Of course, absolute FDM coordinates can then no longer directly be read from Blender's 3D view.&lt;br /&gt;
 The cursor coordinates display in the script area, however, shows the coordinates in YASim space.&lt;br /&gt;
 Note that object names don't contain XML indices but element numbers. YASim_hstab#2 is the third&lt;br /&gt;
 hstab in the whole file, not necessarily in its parent XML group. A floating-point part in the&lt;br /&gt;
 object name (e.g. YASim_hstab#2.004) only means that the geometry has been reloaded that often.&lt;br /&gt;
 It's an unavoidable consequence of how Blender deals with meshes.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Elements are displayed as follows:&lt;br /&gt;
 &lt;br /&gt;
   cockpit                             -&amp;gt; monkey head&lt;br /&gt;
   fuselage                            -&amp;gt; blue &amp;quot;tube&amp;quot; (with only 12 sides for less clutter); center at &amp;quot;a&amp;quot;&lt;br /&gt;
   vstab                               -&amp;gt; red with yellow flaps&lt;br /&gt;
   wing/mstab/hstab                    -&amp;gt; green with yellow flaps/spoilers/slats (always 20 cm deep);&lt;br /&gt;
                                          symmetric surfaces are only displayed on the left side&lt;br /&gt;
   thrusters (jet/propeller/thruster)  -&amp;gt; dashed line from center to actionpt;&lt;br /&gt;
                                          arrow from actionpt along thrust vector (always 1 m long);&lt;br /&gt;
                                          propeller circle&lt;br /&gt;
   rotor                               -&amp;gt; radius and rel_len_blade_start circle, direction arrow,&lt;br /&gt;
                                          normal and forward vector, one blade at phi0&lt;br /&gt;
   gear                                -&amp;gt; contact point and compression vector (no arrow head)&lt;br /&gt;
   tank                                -&amp;gt; cube (10 cm side length)&lt;br /&gt;
   weight                              -&amp;gt; inverted cone&lt;br /&gt;
   ballast                             -&amp;gt; cylinder&lt;br /&gt;
   hitch                               -&amp;gt; circle (10 cm diameter)&lt;br /&gt;
   hook                                -&amp;gt; dashed line for up angle, T-line for down angle&lt;br /&gt;
   launchbar                           -&amp;gt; dashed line for up angles, T-line for down angles&lt;br /&gt;
A note about step (0) for Windows users: the mentioned path is inside the folder where Blender lives, something like &amp;lt;code&amp;gt;C:\Program Files\Blender Foundation\Blender\.blender\scripts&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Visualize model in OpenSCAD or FreeCAD ===&lt;br /&gt;
&lt;br /&gt;
There exist a possibility to display the YASim XML elements in the OpenSCAD or FreeCAD tools. This could be extremely useful in the case of UAV aircraft development. &lt;br /&gt;
&lt;br /&gt;
* [https://github.com/ThunderFly-aerospace/YASim2SCAD YASim2SCAD] - This tool converts YASim XML to scad file which could be displayed as an overlay in OpenSCAD or FreeCAD project.&lt;br /&gt;
* [https://gitlab.com/yasimtoscad/yasimtoscad yasimtoscad] - Another  tool to convert YASim XML to scad file which could be displayed as an overlay in OpenSCAD.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Visualization tools ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitwisetech/ysimi YSIMI]  Interactive Tuning Tools for FlightGear's YASIM Flight Dynamics Model&lt;br /&gt;
* [https://github.com/bitwisetech/yasiVers yasiVers] is a tool for visualization of YASim calculations.&lt;br /&gt;
&lt;br /&gt;
== Export of YASim internals to property tree ==&lt;br /&gt;
Ever wondered what is going on inside yasim? See the property tree under /fdm/yasim/&lt;br /&gt;
 &lt;br /&gt;
Some information is static and shows what yasim has compiled from your XML. &lt;br /&gt;
Other information is &amp;quot;run-time&amp;quot; like forces, speed, acceleration, c.g. &lt;br /&gt;
&lt;br /&gt;
If note noted otherwise:&lt;br /&gt;
* expect metric unit (meter, kilogram, newton, ...)&lt;br /&gt;
* expect minimum version 2017.2&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Path !! Description !! Information type !! min. version&lt;br /&gt;
|-&lt;br /&gt;
| accelerations/ || linear and rot. accelerations in aircraft coord. || run time ||&lt;br /&gt;
|-&lt;br /&gt;
| debug/ || misc internals, for now subject to change without notice || run time || 2018.1&lt;br /&gt;
|-&lt;br /&gt;
| forces/ || aerodynamic forces in N || run time ||&lt;br /&gt;
|-&lt;br /&gt;
| velocities/ || linear and rot. velocities in aircraft coord. || run time ||&lt;br /&gt;
|-&lt;br /&gt;
| model/cg-x-range-aft || desired CG range || compile time ||&lt;br /&gt;
|-&lt;br /&gt;
| model/cg-x-range-front || desired CG range || compile time ||&lt;br /&gt;
|-&lt;br /&gt;
| model/cg-x-max || CG hard limit from gear position || compile time ||&lt;br /&gt;
|-&lt;br /&gt;
| model/cg-x-min || CG hard limit from gear position || compile time ||&lt;br /&gt;
|-&lt;br /&gt;
| model/masses || shows the calculated mass points || compile time ||&lt;br /&gt;
|-&lt;br /&gt;
| model/wings || wing parameters || compile time ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
By using the standard command line, we can see what the YASim solver is calculating.  First, open up Command Prompt, enter in the location of yasim.exe, and then the location of the YASim XML file.  For example, here's what you would type in for a standard Windows [[Changelog_2.12|FlightGear 2.12.0]] installation, and viewing the [[F-14_Tomcat|F-14B's]] YASim file.&lt;br /&gt;
{{Note|You can copy &amp;amp; paste the examples into Command Prompt by right-clicking on the title and navigate to Edit &amp;gt; Paste.  Then, click Enter to execute.}} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;C:\Program Files\FlightGear\bin\Win32\yasim.exe&amp;quot; &amp;quot;C:\Program Files\FlightGear\data\Aircraft\f-14b\f-14b-yasim.xml&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The results will give many different values.&lt;br /&gt;
&lt;br /&gt;
* '''Drag Coefficient:''' The drag coefficient of the aircraft.&lt;br /&gt;
* '''Lift Ratio:''' The lift ratio of the aircraft.&lt;br /&gt;
* '''Cruise AoA:''' The cruise AoA, from conditions at [[YASim#cruise|&amp;lt;cruise&amp;gt;]] in the xml file.&lt;br /&gt;
* '''Tail Incidence:''' The incidence angle of the tail, &amp;quot;solved&amp;quot; by YASim as a way to stabilize the aircraft.&lt;br /&gt;
* '''Approach Elevator:''' The approach elevator, from conditions at [[YASim#approach|&amp;lt;approach&amp;gt;]] in the xml file.&lt;br /&gt;
* '''CG:''' Center of gravity of the aircraft in coordinates. Unless it's supposed to be offset, it should always have a Y value of 0.&lt;br /&gt;
&lt;br /&gt;
The YASim standalone solver also has some command line flags that change it's behaviour.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;C:\Program Files\FlightGear\bin\Win32\yasim.exe&amp;quot; &amp;quot;C:\Program Files\FlightGear\data\Aircraft\f-14b\f-14b-yasim.xml&amp;quot; -g -a 1000 -s 490&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''-g:''' Instructs YASim to generate space-separated tabular data instead of the usual solver output. This can be redirected to a file and used in various plotting programs to visualize the actual lift, drag, L/D curves. The columns of the output from left to right are: AoA, Lift, Drag, L/D. (aoa in degrees, lift and drag in G's).&lt;br /&gt;
* '''-a &amp;lt;altitude in meter:&amp;gt;''' Run the solver at the given altitude in meter.&lt;br /&gt;
* '''-s &amp;lt;speed in knots&amp;gt;:''' Also run at the given airspeed in knots.&lt;br /&gt;
&lt;br /&gt;
{{Note|The values generated by this method are for the aircraft taken as a whole, as solved by YASim, so they differ from the values of the wing airfoil.}}&lt;br /&gt;
&lt;br /&gt;
To get the tabular output for the example above at 1000 m and 150 knots, and to redirect this to a file, one would issue:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;C:\Program Files\FlightGear\bin\Win32\yasim.exe&amp;quot; &amp;quot;C:\Program Files\FlightGear\data\Aircraft\f-14b\f-14b-yasim.xml&amp;quot; -g -a 1000 -s 150 &amp;gt; &amp;quot;C:\Program Files\FlightGear\yasim.txt&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== New features and bugfixes in version 2017.2 ==&lt;br /&gt;
&lt;br /&gt;
=== XML parser ===&lt;br /&gt;
==== support for metric and imperial units ====&lt;br /&gt;
To make life easier for aircraft developers, the parser supports new additional attributes with a unit suffix, e.g. speed-kt for knots and speed-kmh for kilometers per hour.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;airplane {mass, mass-lbs, mass-kg}=&amp;quot;12345&amp;quot; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;approach {speed, speed-kt, speed-kmh}=&amp;quot;123&amp;quot; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;cruise {speed, speed-kt, speed-kmh}=&amp;quot;123&amp;quot; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;solve-weight {weight, weight-lbs, weight-kg}=&amp;quot;123&amp;quot; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;jet {mass, mass-lbs, mass-kg}=&amp;quot;1234&amp;quot; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;tank {capacity, capacity-lbs, capacity-kg}=&amp;quot;12345&amp;quot; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;ballast {mass, mass-lbs, mass-kg}=&amp;quot;1234&amp;quot; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|Aircraft using this new attributes will not run on older versions of FlightGear, so it is probably wise to publish those only after a reasonable number of users switched version 2017.2 or newer.}}&lt;br /&gt;
&lt;br /&gt;
==== CG tuning help ====&lt;br /&gt;
{{Note| The feature described in this section is not fully implemented yet, however, it may be of some help already.&lt;br /&gt;
It is currently implemented for the yasim CLI tool only. It does not affect the airplane behaviour while running FlightGear. }}&lt;br /&gt;
&lt;br /&gt;
New attributes have been added to &amp;lt;airplane&amp;gt; to assist tuning the center of gravity (CG).&lt;br /&gt;
The CG position is often expressed relative to the [https://en.wikipedia.org/wiki/Chord_(aeronautics)#Mean_aerodynamic_chord MAC] of the wing in percent. You can specify a desired range for CG in % relative to MAC, it will show up in the output of the yasim CLI tool (see example below):&lt;br /&gt;
&lt;br /&gt;
* cg-min: default 25% (just a guess, better numbers are welcome)&lt;br /&gt;
* cg-max: default 30% (just a guess, better numbers are welcome)&lt;br /&gt;
&lt;br /&gt;
{{Note| By convention 0% is leading edge, 100% is trailing edge, however the absolute values on x-axis are the other way round, e.g. nose is +x, tail is -x }}&lt;br /&gt;
{{warning|The MAC calculation in version 2017.2 works only on the &amp;lt;wing&amp;gt; element. Numbers will be wrong, if your model uses a combination of &amp;lt;wing&amp;gt; and &amp;lt;mstab&amp;gt; to build a wing with two or more sections.&lt;br /&gt;
Section support will be added in version 2018.1}}&lt;br /&gt;
YASim will print the leading edge coordinates of the MAC (x,y) and its length.&lt;br /&gt;
&lt;br /&gt;
'''Example output'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ yasim Citation-II-yasim.xml &lt;br /&gt;
This aircraft uses yasim version '2017.2'                                                                                                                                                                                                                                      &lt;br /&gt;
==========================                                                                                                                                                                                                                                                     &lt;br /&gt;
= YASim solution results =                                                                                                                                                                                                                                                     &lt;br /&gt;
==========================                                                                                                                                                                                                                                                     &lt;br /&gt;
       Iterations: 2210                                                                                                                                                                                                                                                        &lt;br /&gt;
 Drag Coefficient: 12.304669                                                                                                                                                                                                                                                   &lt;br /&gt;
       Lift Ratio: 85.317558                                                                                                                                                                                                                                                   &lt;br /&gt;
       Cruise AoA: 4.016746 deg                                                                                                                                                                                                                                                &lt;br /&gt;
   Tail Incidence: -3.053278 deg                                                                                                                                                                                                                                               &lt;br /&gt;
Approach Elevator: -0.377542                                                                                                                                                                                                                                                   &lt;br /&gt;
                                                                                                                                                                                                                                                                               &lt;br /&gt;
               CG: x:-6.543, y:-0.000, z:0.044                                                                                                                                                                                                                                 &lt;br /&gt;
    Wing MAC (*1): x:-6.00, y:3.83, length:2.0                                                                                                                                                                                                                                 &lt;br /&gt;
    CG-x rel. MAC: 0.272                                                                                                                                                                                                                                                       &lt;br /&gt;
    CG-x  desired: -6.599 &amp;lt; -6.543 &amp;lt; -6.198                                                                                                                                                                                                                                    &lt;br /&gt;
                                                                                                                                                                                                                                                                               &lt;br /&gt;
Inertia tensor [kg*m^2], origo at CG:                                                                                                                                                                                                                                          &lt;br /&gt;
                                                                                                                                                                                                                                                                               &lt;br /&gt;
  18009.289,  -0.000, 7120.470                                                                                                                                                                                                                                                 &lt;br /&gt;
   -0.000, 42459.316,   0.000                                                                                                                                                                                                                                                  &lt;br /&gt;
  7120.470,   0.000, 56980.656                                                                                                                                                                                                                                                 &lt;br /&gt;
                                                                                                                                                                                                                                                                               &lt;br /&gt;
(*1) MAC calculation works on &amp;lt;wing&amp;gt; only! Numbers will be wrong for segmented wings, e.g. &amp;lt;wing&amp;gt;+&amp;lt;mstab&amp;gt;.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Aircraft developer helpers ===&lt;br /&gt;
The command line utility got some new options. For some strange reason, the -a parameter expects altitude in meters instead of ft. This is now visible in the usage message but left unchanged for compatibility.&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;Usage:&lt;br /&gt;
  yasim &amp;lt;aircraft.xml&amp;gt; [-g [-a meters] [-s kts] [-approach | -cruise] ]&lt;br /&gt;
  yasim &amp;lt;aircraft.xml&amp;gt; [-d [-a meters] [-approach | -cruise] ]&lt;br /&gt;
  yasim &amp;lt;aircraft.xml&amp;gt; [-m]&lt;br /&gt;
  -g print lift/drag table: aoa, lift, drag, lift/drag &lt;br /&gt;
  -d print drag over TAS: kts, drag&lt;br /&gt;
     -a set altitude in meters!&lt;br /&gt;
     -s set speed in knots&lt;br /&gt;
  -m print mass distribution table: id, x, y, z, mass&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bugfixes ===&lt;br /&gt;
The following bugfixes require &amp;lt;airplane version=&amp;quot;2017.2&amp;quot;&amp;gt; for backward compatibility &lt;br /&gt;
* Ground effect: corrected the calculation of the height where g.e. ends&lt;br /&gt;
* Stall parameters were set wrong for wings with camber=0&lt;br /&gt;
&lt;br /&gt;
== New features and bugfixes in version 2018.1 ==&lt;br /&gt;
The following is under development and hopefully finds its way into FG version 2018.1&lt;br /&gt;
&lt;br /&gt;
=== Wing Section Support ===&lt;br /&gt;
Many airliners have wings with a geometry that is just a little more complex than what YASim supported initially (tapered wing with some angles like sweep, dihedral, ...), e.g. they have an inboard section and an outboard section that can be described with YASim wing syntax. You can use a wing + a mstab XML element to describe this geometry but it is easier if YASim can just append more wing sections by simply adding more wing XML elements. This is now (Version 2018.1) possible, yasim will simply append sections if it finds more than one wing or hstab in the XML.&lt;br /&gt;
You should use '''&amp;amp;lt;wing append=&amp;quot;1&amp;quot; ... &amp;amp;gt;''' for all but the first wing/hstab declaration. &lt;br /&gt;
{{Note|YASim will ignore the root point (x,y,z), the chord length and the incidence attributes, if you add &amp;quot;append&amp;quot; and calculate those from the previous wing section. }}&lt;br /&gt;
MAC calculation works for the whole wing.&lt;br /&gt;
&lt;br /&gt;
{{warning|Aircrafts using this feature will not work with older versions of flightgear. }}&lt;br /&gt;
To keep the aircraft backward compatible for a while, it is recommended to create a copy of its yasim XML file for development. &lt;br /&gt;
Once you are happy with the CG and wing parameters you can use the output of the YASim CLI tool to modifiy the original XML. &lt;br /&gt;
The tool will output the needed x,y,z etc per wing section to create a XML in old format with (only one) &amp;lt;wing&amp;gt; + &amp;lt;mstab&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== More information from CLI tools ===&lt;br /&gt;
You should configure the maximum take of weight (MTOW) in your XML file by adding either ''mtow-lbs'' or ''mtow-kg'' attribute to the airplane:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &amp;amp;lt;airplane mass=&amp;quot;7500&amp;quot; version=&amp;quot;2018.1&amp;quot; mtow-lbs=&amp;quot;12500&amp;quot;&amp;amp;gt; &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example output'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yasim CRJ700.xml &lt;br /&gt;
==========================&lt;br /&gt;
= YASim solution results =&lt;br /&gt;
==========================&lt;br /&gt;
Iterations        : 1024&lt;br /&gt;
Drag Coefficient  : 17.707&lt;br /&gt;
Lift Ratio        : 145.841&lt;br /&gt;
Cruise AoA        : -0.11 deg&lt;br /&gt;
Tail Incidence    : 3.47 deg&lt;br /&gt;
Approach Elevator : -0.792&lt;br /&gt;
&lt;br /&gt;
CG                : x:-0.046, y:0.000, z:-1.222&lt;br /&gt;
Wing MAC          : (x:0.79, y:4.99), length:3.4 &lt;br /&gt;
hard limit CG-x   : 14.232 m&lt;br /&gt;
soft limit CG-x   : -0.058 m&lt;br /&gt;
CG-x              : -0.046 m&lt;br /&gt;
CG-x rel. MAC     :  25%&lt;br /&gt;
soft limit CG-x   : -0.228 m&lt;br /&gt;
hard limit CG-x   : -0.986 m&lt;br /&gt;
&lt;br /&gt;
wing lever        : -0.012 m&lt;br /&gt;
tail lever        : -13.997 m&lt;br /&gt;
&lt;br /&gt;
max thrust        : 157.18 kN&lt;br /&gt;
thrust/empty      : 0.81&lt;br /&gt;
thrust/mtow       : 0.49&lt;br /&gt;
&lt;br /&gt;
wing span         : 22.64 m&lt;br /&gt;
sweep lead. edge  : 30.2 .. 30.6 deg&lt;br /&gt;
wing area         : 58.70 m^2&lt;br /&gt;
wing load empty   : 336.15 kg/m^2 (Empty 19731 kg)&lt;br /&gt;
wing load MTOW    : 562.18 kg/m^2 (MTOW  32999 kg)&lt;br /&gt;
&lt;br /&gt;
tail span         : 8.533 m&lt;br /&gt;
tail area         : 14.838 m^2&lt;br /&gt;
&lt;br /&gt;
#wing sections: 2&lt;br /&gt;
Section 0 base point (0.450, 1.226, -2.034), chord 5.085, incidence at section root 5.0deg&lt;br /&gt;
Section 1 base point (-0.663, 4.754, -1.942), chord 3.204, incidence at section root 3.0deg&lt;br /&gt;
&lt;br /&gt;
Inertia tensor [kg*m^2], origo at CG:&lt;br /&gt;
&lt;br /&gt;
   195646,       0,  122265&lt;br /&gt;
        0, 1757279,       0&lt;br /&gt;
   122265,       0, 1904528&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variable tail incidence / elevator trim ===&lt;br /&gt;
Small GA aircrafts usually trim with a trim tab on the elevator. For efficiency, airliners normally do not trim the elevator (&amp;quot;flap&amp;quot;) but rotate the whole horizontal stabilizer (tail  wing), e.g. they change the incidence for this wing. While this feature was somehow foreseen, it was not implemented yet, most likely because the &amp;quot;tail incidence&amp;quot; is one of the free variables used by the YASim solver. However, it is now possible to use the control=&amp;quot;INCIDENCE&amp;quot; within the &amp;amp;lt;hstab&amp;amp;gt; to implement an alternative trim '''while maintaining full elevator authority'''. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;hstab ... incidence-min-deg=&amp;quot;-13.0&amp;quot; incidence-max-deg=&amp;quot;2.0&amp;quot;&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;control-input axis=&amp;quot;/controls/flight/hstab-trim&amp;quot; control=&amp;quot;INCIDENCE&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;control-speed control=&amp;quot;INCIDENCE&amp;quot; transition-time=&amp;quot;20.0&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;control-output control=&amp;quot;INCIDENCE&amp;quot;  prop=&amp;quot;/surface-positions/hstab-rad&amp;quot; /&amp;gt;  &lt;br /&gt;
&amp;lt;/hstab&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{Note|The control output of INCIDENCE is the angle in radians, not in degree, as that is the unit internally used by YASim.}}&lt;br /&gt;
{{warning|The OPTIONAL incidence-min-deg and incidence-max-deg set the limits for the solver. You must make sure to select a sufficiently large range or solver will fail. }}&lt;br /&gt;
First experiments with this feature were successful in that the aircraft pitch could be changed as expected but fine tuning will be necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto:Make a helicopter#XML Elements]] &amp;amp;ndash; Rotor and rotorgear YASim elements&lt;br /&gt;
* [[Towing]]&lt;br /&gt;
* [[YASim Development Tools]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* {{cite web&lt;br /&gt;
 | url             = http://www.buckarooshangar.com/flightgear/yasimtut.html&lt;br /&gt;
 | title           = Guide to YASim&lt;br /&gt;
 | first           = Gary R. &amp;quot;Buckaroo&amp;quot;&lt;br /&gt;
 | last            = Neely&lt;br /&gt;
 | authorlink      = http://www.buckarooshangar.com/flightgear/&lt;br /&gt;
 | date            = 2013&lt;br /&gt;
 | accessdate      = April 16, 2020&lt;br /&gt;
 }} - A very helpful guide&lt;br /&gt;
* {{cite web&lt;br /&gt;
 | url             = https://sourceforge.net/projects/dacpei/&lt;br /&gt;
 | title           = DACPEI&lt;br /&gt;
 | author          = pytoche&lt;br /&gt;
 | date            = February 2012&lt;br /&gt;
 | publisher       = SourceForge&lt;br /&gt;
 | accessdate      = April 16, 2020&lt;br /&gt;
 }} - A fixed wing light aircraft WYSIWUG concept design suite that can export an YASim FDM to FlightGear.&lt;br /&gt;
&lt;br /&gt;
{{FDM}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Flight Dynamics Model]]&lt;br /&gt;
&lt;br /&gt;
[[fr:YASim]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Property_tree&amp;diff=143741</id>
		<title>Property tree</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Property_tree&amp;diff=143741"/>
		<updated>2026-03-18T08:48:32Z</updated>

		<summary type="html">&lt;p&gt;Jsb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PropertyTree}}&lt;br /&gt;
The '''property tree''' is considered [[FlightGear]]'s central nervous system and one of its greatest assets. It is the interface to low level, run time state variables via a very intuitive tree-like hierarchy, allowing for FlightGear's behavior to be easily controlled and manipulated at run time.&lt;br /&gt;
&lt;br /&gt;
The concepts and mechanisms behind the property tree may not be immediately obvious to FlightGear beginners. This page is meant to help new users familiarize themselves with the FlightGear property tree.&lt;br /&gt;
&lt;br /&gt;
== The purpose of the property tree ==&lt;br /&gt;
The property system - or property tree - represents most of the internal state of all systems within FlightGear, like for example the flight dynamics models, or the weather simulation. The content of these internal state variables are presented in a hierarchically manner and can easily be accessed through a well known API. A system may present its current state to other systems and let them change its current state by allowing to write to its own properties.&lt;br /&gt;
&lt;br /&gt;
One might think of the property system as a global, normalized communication platform, where subsystems may publish variables and access other subsystem's variables. In addition, ''callbacks'' can be registered to invoke code upon read/write access of properties, which serves as the backbone for a very simple, but powerful, ''signalling mechanism'' in FlightGear. Thus, the property system acts as a routing interface, both between different high-level FG sub-systems and the outside world.  Data that is required by one FG sub-system can be exposed in the property tree, where it can then be read or modified, either by other internal FG sub-systems, or by and for external input/output. &lt;br /&gt;
&lt;br /&gt;
There is some basic property-debugging support to FlightGear and SimGear. In FlightGear, the --trace-read option causes all read access for a property to be traced, and the --trace-write option causes all write access for a property to be traced, both through SG_LOG messages.&lt;br /&gt;
&lt;br /&gt;
=== Examples of use ===&lt;br /&gt;
For example, a left banking joystick input is exposed in the property tree where it is read by the FlightGear FDM sub-system.  The FDM subsystem then in turn outputs an aileron deflection back to the property tree where it is then read by the FG animation subsystem to animate the aileron deflection in the 3D model.&lt;br /&gt;
&lt;br /&gt;
Alternatively the joystick input, once exposed in the property tree, can be read and modified by an external application via the [[FlightGear I/O subsystem]], such as an external FDM. The output from the external FDM can then be fed back to FlightGear by writing its data back to the property tree, once again, via the FlightGear I/O subsystem.&lt;br /&gt;
&lt;br /&gt;
There are several subsystems that implement a full API by extending the property tree, such as the AI traffic system, the multiplayer mode, but also Canvas - basically, setting certain properties (for example via Nasal's setprop()), triggering certain code (through listener callbacks) - with arguments and return values passed through the property tree, which in turn allows arbitrary 3D models to be placed, but also AI traffic to be created / controlled, as well as OpenGL textures to be created and modified and run-time, which is what we use to implement HUDs, GUIs, instruments, MFD avionics, and even liveries or scenery textures (VGDS).&lt;br /&gt;
&lt;br /&gt;
== The organization of the property tree ==&lt;br /&gt;
Naming a property is very much like naming a file in a file system, with levels of hierarchy. For example: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sim/aircraft = A333&lt;br /&gt;
&lt;br /&gt;
/position/&lt;br /&gt;
/position/longitude-deg =	'-122.3576677'	(double)&lt;br /&gt;
/position/latitude-deg =	'37.61372424'	(double)&lt;br /&gt;
/position/altitude-ft =	'28.24418581'	(double)&lt;br /&gt;
/position/altitude-agl-ft =	'22.47049626'	(double)&lt;br /&gt;
&lt;br /&gt;
/controls/seat/eject/initiate&lt;br /&gt;
/controls/electric/APU-generator&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some of these variables are &amp;quot;calculated&amp;quot; within the sim (for example updated regularly, in essence at frame rate), whilst others can be manipulated. Writing a variable is as easy as&lt;br /&gt;
 /* Its my turn to play the sim */&lt;br /&gt;
 set('/controls/seat/eject/initiate', 1)&lt;br /&gt;
&lt;br /&gt;
What makes FlightGear powerful is that a new aircraft can easily be designed with its unique set of properties that somehow affect the simulation. The aircraft model has an xml file of properties that will be used within the property tree.&lt;br /&gt;
&lt;br /&gt;
== Customizing and manipulating the property tree through Nasal ==&lt;br /&gt;
An important feature of the property tree interface is that it can be tailored and new entries added as required through [[Nasal]] scripts, without requiring C++ changes. If you wish to use a custom-written subsystem, such as your own terrain following and avoidance subsystem, for example, and perhaps implemented in [[Nasal]], adding new property tree branches and nodes to handle your unique data presents no problems.&lt;br /&gt;
&lt;br /&gt;
The property tree is read, written, accessed and manipulated in a variety of ways, such as&lt;br /&gt;
* startup arguments via &amp;lt;nowiki&amp;gt;--prop:/sim/foo=bar&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* XML files&lt;br /&gt;
* internal compiled code within FG - the c/c++ code&lt;br /&gt;
* [[Nasal]] scripts - this is javascript-like scripting with read/write to the property tree. This is the way most aircraft are implemented.&lt;br /&gt;
* Using native protocols, implemented in C++ (see {{fg src file|src/Network}}). [[Property Tree/Sockets]]&lt;br /&gt;
* Using the generic protocol, either in/out/bi - this allows send/receive to the FG sim via the [[Generic Protocol]]&lt;br /&gt;
* telnet interface - query and fly the plane on the command line or using a scripted session (see [[Telnet usage]])&lt;br /&gt;
* html interface - access the property tree using a conventional web browser like firefox/safari or chrome&lt;br /&gt;
* using the built in [[Property browser]]&lt;br /&gt;
* using other GUI dialogs&lt;br /&gt;
* using cockpit bindings&lt;br /&gt;
* using joystick bindings etc&lt;br /&gt;
&lt;br /&gt;
So they can come from many places, thus there's no single source file where you'll find ALL properties/types. You will need to look at the corresponding subsystem/component. $FG_SRC/Network is the right pace to look for hardcoded protocols, make sure to also understand their inheritance (the interface being implemented).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== XML and property lists ==&lt;br /&gt;
The property tree maps very nicely to XML. This is convenient for initializing the property tree and saving its state. Values in the tree are typed, but they can also be untyped strings which will be converted to a typed value when read.&lt;br /&gt;
&lt;br /&gt;
PropertyList-encoded XML files are mapped to a/the property tree - typically, such XML files are not manually processed, they are &amp;quot;transparently&amp;quot; processed by FlightGear, loaded and mapped into a Property Tree.&lt;br /&gt;
&lt;br /&gt;
== Network Protocols to access the property tree ==&lt;br /&gt;
In addition to the protocols supported by the FlightGear I/O subsystem, other interfaces are provided by a built-in [[Property Tree/Web Server]] and a built-in [[Telnet usage|Telnet server]], which allow property tree data to be read and modified via these interfaces, in essence using a telnet client or a conventional web browser, at run time.&lt;br /&gt;
&lt;br /&gt;
Note that you can setup as many of these servers as you want, for instance, just to be obscene you could do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 fgfs --httpd=5400 --httpd=5401 --httpd=5402 --telnet=5403 --telnet=5404 --telnet=5405&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now there are six network interfaces running that you can access from anywhere ;-)&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; &amp;quot;can I borrow your ipod please?&amp;quot; &amp;quot;why?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Protocol options ===&lt;br /&gt;
Usually the &amp;quot;best&amp;quot; way depends on your specific circumstances.  Will the two applications be running on the same machine?  If not, do the two machines have a high speed network connection or some slow radio modem type connection?  How much data are you sending and at what rate?  Do you need really tight timing or can you get by with some delays and sloppiness in the communication?&lt;br /&gt;
&lt;br /&gt;
==Dumping the Property Tree to an XML File==&lt;br /&gt;
&lt;br /&gt;
Nasal command &amp;quot;io.write_properties&amp;quot; is used to dump all or part of the property tree to an xml file.  The command can be entered interactively while using the simulator or as part of a script.&lt;br /&gt;
&lt;br /&gt;
To enter the command interactively, select Nasal Console from the Debug menu and enter the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;io.write_properties(getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ &amp;quot;/Export/PropTree.xml&amp;quot;, &amp;quot;/&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will dump the entire property tree, in a file containing more than 50,000 lines&lt;br /&gt;
&lt;br /&gt;
We can also dump only part of the property tree. For example, to dump everything in /instrumentation/kma20, we would use this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;io.write_properties(getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ &amp;quot;/Export/PropTree.xml&amp;quot;, &amp;quot;/instrumentation/kma20&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition to debugging, there are other good reasons for doing a dump of portions of the property tree.&lt;br /&gt;
&lt;br /&gt;
* [[Howto:Create_animation_XML_files_from_Nasal|Creating Animation XML files]]&lt;br /&gt;
* [[State Overlay System|Creating State Overlays for Aircraft]]&lt;br /&gt;
&lt;br /&gt;
== Reference documentation to the property tree ==&lt;br /&gt;
By what was said above, the property tree is not consistent with fixed variables, they are created dynamically, to represent a propeller plane, a Jumbo or even a &amp;quot;Caspian Sea Monster&amp;quot;, or depending on which subsystems are active. Many properties availability may even depend on the startup/runtime settings you are using.&lt;br /&gt;
&lt;br /&gt;
There are a bunch of &amp;quot;common&amp;quot; properties - especially among similar FDMs and aircraft. Obviously, different FDMs/aircraft will use different properties (single piston, helicopter, jet, twin turbine helicopter etc). &lt;br /&gt;
&lt;br /&gt;
You may want to have a look at $FG_ROOT/Docs/README.properties and [[PropertyTree:Reference]]&lt;br /&gt;
&lt;br /&gt;
There are a couple ways that they are set, but a fair amount of them just &amp;quot;appear&amp;quot; without being documented anywhere. There are several places to look for properties; one is in the aircraft files, another is all Nasal files, and the last place (and often most useful!) is grepping (searching) through the C++ code. To determine how a property works and what it does often requires looking through any code that uses it. This is a part of FlightGear that we could certainly document better&lt;br /&gt;
&lt;br /&gt;
== Flight Dynamics Model (FDM) ==&lt;br /&gt;
FlightGear uses a few [[Flight Dynamics Models]], such as&lt;br /&gt;
* [[JSBSim]] &lt;br /&gt;
* [[YASim]] &lt;br /&gt;
These flight dynamics models present themselves differently in the tree, using different variables, in different places. That is what an aircraft can be designed around. Most FDMs use so called tied properties, which are directly mapped to memory in C++, so that they cannot be written to - so that you would need to disable the FDM using the null FDM instead.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[PropertyTree:Reference]]&lt;br /&gt;
* [[Property browser]]&lt;br /&gt;
* [[Property Key Handler]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Property Tree| ]]&lt;br /&gt;
[[Category:Nasal]]&lt;br /&gt;
[[Category:XML]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Property_tree&amp;diff=143740</id>
		<title>Property tree</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Property_tree&amp;diff=143740"/>
		<updated>2026-03-18T08:47:46Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Add link to PropertyTree:Reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PropertyTree}}&lt;br /&gt;
The '''property tree''' is considered [[FlightGear]]'s central nervous system and one of its greatest assets. It is the interface to low level, run time state variables via a very intuitive tree-like hierarchy, allowing for FlightGear's behavior to be easily controlled and manipulated at run time.&lt;br /&gt;
&lt;br /&gt;
The concepts and mechanisms behind the property tree may not be immediately obvious to FlightGear beginners. This page is meant to help new users familiarize themselves with the FlightGear property tree.&lt;br /&gt;
&lt;br /&gt;
== The purpose of the property tree ==&lt;br /&gt;
The property system - or property tree - represents most of the internal state of all systems within FlightGear, like for example the flight dynamics models, or the weather simulation. The content of these internal state variables are presented in a hierarchically manner and can easily be accessed through a well known API. A system may present its current state to other systems and let them change its current state by allowing to write to its own properties.&lt;br /&gt;
&lt;br /&gt;
One might think of the property system as a global, normalized communication platform, where subsystems may publish variables and access other subsystem's variables. In addition, ''callbacks'' can be registered to invoke code upon read/write access of properties, which serves as the backbone for a very simple, but powerful, ''signalling mechanism'' in FlightGear. Thus, the property system acts as a routing interface, both between different high-level FG sub-systems and the outside world.  Data that is required by one FG sub-system can be exposed in the property tree, where it can then be read or modified, either by other internal FG sub-systems, or by and for external input/output. &lt;br /&gt;
&lt;br /&gt;
There is some basic property-debugging support to FlightGear and SimGear. In FlightGear, the --trace-read option causes all read access for a property to be traced, and the --trace-write option causes all write access for a property to be traced, both through SG_LOG messages.&lt;br /&gt;
&lt;br /&gt;
=== Examples of use ===&lt;br /&gt;
For example, a left banking joystick input is exposed in the property tree where it is read by the FlightGear FDM sub-system.  The FDM subsystem then in turn outputs an aileron deflection back to the property tree where it is then read by the FG animation subsystem to animate the aileron deflection in the 3D model.&lt;br /&gt;
&lt;br /&gt;
Alternatively the joystick input, once exposed in the property tree, can be read and modified by an external application via the [[FlightGear I/O subsystem]], such as an external FDM. The output from the external FDM can then be fed back to FlightGear by writing its data back to the property tree, once again, via the FlightGear I/O subsystem.&lt;br /&gt;
&lt;br /&gt;
There are several subsystems that implement a full API by extending the property tree, such as the AI traffic system, the multiplayer mode, but also Canvas - basically, setting certain properties (for example via Nasal's setprop()), triggering certain code (through listener callbacks) - with arguments and return values passed through the property tree, which in turn allows arbitrary 3D models to be placed, but also AI traffic to be created / controlled, as well as OpenGL textures to be created and modified and run-time, which is what we use to implement HUDs, GUIs, instruments, MFD avionics, and even liveries or scenery textures (VGDS).&lt;br /&gt;
&lt;br /&gt;
== The organization of the property tree ==&lt;br /&gt;
Naming a property is very much like naming a file in a file system, with levels of hierarchy. For example: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sim/aircraft = A333&lt;br /&gt;
&lt;br /&gt;
/position/&lt;br /&gt;
/position/longitude-deg =	'-122.3576677'	(double)&lt;br /&gt;
/position/latitude-deg =	'37.61372424'	(double)&lt;br /&gt;
/position/altitude-ft =	'28.24418581'	(double)&lt;br /&gt;
/position/altitude-agl-ft =	'22.47049626'	(double)&lt;br /&gt;
&lt;br /&gt;
/controls/seat/eject/initiate&lt;br /&gt;
/controls/electric/APU-generator&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some of these variables are &amp;quot;calculated&amp;quot; within the sim (for example updated regularly, in essence at frame rate), whilst others can be manipulated. Writing a variable is as easy as&lt;br /&gt;
 /* Its my turn to play the sim */&lt;br /&gt;
 set('/controls/seat/eject/initiate', 1)&lt;br /&gt;
&lt;br /&gt;
What makes FlightGear powerful is that a new aircraft can easily be designed with its unique set of properties that somehow affect the simulation. The aircraft model has an xml file of properties that will be used within the property tree.&lt;br /&gt;
&lt;br /&gt;
== Customizing and manipulating the property tree through Nasal ==&lt;br /&gt;
An important feature of the property tree interface is that it can be tailored and new entries added as required through [[Nasal]] scripts, without requiring C++ changes. If you wish to use a custom-written subsystem, such as your own terrain following and avoidance subsystem, for example, and perhaps implemented in [[Nasal]], adding new property tree branches and nodes to handle your unique data presents no problems.&lt;br /&gt;
&lt;br /&gt;
The property tree is read, written, accessed and manipulated in a variety of ways, such as&lt;br /&gt;
* startup arguments via &amp;lt;nowiki&amp;gt;--prop:/sim/foo=bar&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* XML files&lt;br /&gt;
* internal compiled code within FG - the c/c++ code&lt;br /&gt;
* [[Nasal]] scripts - this is javascript-like scripting with read/write to the property tree. This is the way most aircraft are implemented.&lt;br /&gt;
* Using native protocols, implemented in C++ (see {{fg src file|src/Network}}). [[Property Tree/Sockets]]&lt;br /&gt;
* Using the generic protocol, either in/out/bi - this allows send/receive to the FG sim via the [[Generic Protocol]]&lt;br /&gt;
* telnet interface - query and fly the plane on the command line or using a scripted session (see [[Telnet usage]])&lt;br /&gt;
* html interface - access the property tree using a conventional web browser like firefox/safari or chrome&lt;br /&gt;
* using the built in [[Property browser]]&lt;br /&gt;
* using other GUI dialogs&lt;br /&gt;
* using cockpit bindings&lt;br /&gt;
* using joystick bindings etc&lt;br /&gt;
&lt;br /&gt;
So they can come from many places, thus there's no single source file where you'll find ALL properties/types. You will need to look at the corresponding subsystem/component. $FG_SRC/Network is the right pace to look for hardcoded protocols, make sure to also understand their inheritance (the interface being implemented).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== XML and property lists ==&lt;br /&gt;
The property tree maps very nicely to XML. This is convenient for initializing the property tree and saving its state. Values in the tree are typed, but they can also be untyped strings which will be converted to a typed value when read.&lt;br /&gt;
&lt;br /&gt;
PropertyList-encoded XML files are mapped to a/the property tree - typically, such XML files are not manually processed, they are &amp;quot;transparently&amp;quot; processed by FlightGear, loaded and mapped into a Property Tree.&lt;br /&gt;
&lt;br /&gt;
== Network Protocols to access the property tree ==&lt;br /&gt;
In addition to the protocols supported by the FlightGear I/O subsystem, other interfaces are provided by a built-in [[Property Tree/Web Server]] and a built-in [[Telnet usage|Telnet server]], which allow property tree data to be read and modified via these interfaces, in essence using a telnet client or a conventional web browser, at run time.&lt;br /&gt;
&lt;br /&gt;
Note that you can setup as many of these servers as you want, for instance, just to be obscene you could do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 fgfs --httpd=5400 --httpd=5401 --httpd=5402 --telnet=5403 --telnet=5404 --telnet=5405&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now there are six network interfaces running that you can access from anywhere ;-)&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; &amp;quot;can I borrow your ipod please?&amp;quot; &amp;quot;why?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Protocol options ===&lt;br /&gt;
Usually the &amp;quot;best&amp;quot; way depends on your specific circumstances.  Will the two applications be running on the same machine?  If not, do the two machines have a high speed network connection or some slow radio modem type connection?  How much data are you sending and at what rate?  Do you need really tight timing or can you get by with some delays and sloppiness in the communication?&lt;br /&gt;
&lt;br /&gt;
==Dumping the Property Tree to an XML File==&lt;br /&gt;
&lt;br /&gt;
Nasal command &amp;quot;io.write_properties&amp;quot; is used to dump all or part of the property tree to an xml file.  The command can be entered interactively while using the simulator or as part of a script.&lt;br /&gt;
&lt;br /&gt;
To enter the command interactively, select Nasal Console from the Debug menu and enter the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;io.write_properties(getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ &amp;quot;/Export/PropTree.xml&amp;quot;, &amp;quot;/&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will dump the entire property tree, in a file containing more than 50,000 lines&lt;br /&gt;
&lt;br /&gt;
We can also dump only part of the property tree. For example, to dump everything in /instrumentation/kma20, we would use this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;io.write_properties(getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ &amp;quot;/Export/PropTree.xml&amp;quot;, &amp;quot;/instrumentation/kma20&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition to debugging, there are other good reasons for doing a dump of portions of the property tree.&lt;br /&gt;
&lt;br /&gt;
* [[Howto:Create_animation_XML_files_from_Nasal|Creating Animation XML files]]&lt;br /&gt;
* [[State Overlay System|Creating State Overlays for Aircraft]]&lt;br /&gt;
&lt;br /&gt;
== Reference documentation to the property tree ==&lt;br /&gt;
By what was said above, the property tree is not consistent with fixed variables, they are created dynamically, to represent a propeller plane, a Jumbo or even a &amp;quot;Caspian Sea Monster&amp;quot;, or depending on which subsystems are active. Many properties availability may even depend on the startup/runtime settings you are using.&lt;br /&gt;
&lt;br /&gt;
There are a bunch of &amp;quot;common&amp;quot; properties - especially among similar FDMs and aircraft. Obviously, different FDMs/aircraft will use different properties (single piston, helicopter, jet, twin turbine helicopter etc). &lt;br /&gt;
&lt;br /&gt;
You may want to have a look at $FG_ROOT/Docs/README.properties and [[PropertyTree:Reference]]&lt;br /&gt;
&lt;br /&gt;
There are a couple ways that they are set, but a fair amount of them just &amp;quot;appear&amp;quot; without being documented anywhere. There are several places to look for properties; one is in the aircraft files, another is all Nasal files, and the last place (and often most useful!) is grepping (searching) through the C++ code. To determine how a property works and what it does often requires looking through any code that uses it. This is a part of FlightGear that we could certainly document better&lt;br /&gt;
&lt;br /&gt;
== Flight Dynamics Model (FDM) ==&lt;br /&gt;
FlightGear uses a few [[Flight Dynamics Models]], such as&lt;br /&gt;
* [[JSBSim]] &lt;br /&gt;
* [[YASim]] &lt;br /&gt;
These flight dynamics models present themselves differently in the tree, using different variables, in different places. That is what an aircraft can be designed around. Most FDMs use so called tied properties, which are directly mapped to memory in C++, so that they cannot be written to - so that you would need to disable the FDM using the null FDM instead.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Property browser]]&lt;br /&gt;
* [[Property Key Handler]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Property Tree| ]]&lt;br /&gt;
[[Category:Nasal]]&lt;br /&gt;
[[Category:XML]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=USB-HID&amp;diff=143501</id>
		<title>USB-HID</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=USB-HID&amp;diff=143501"/>
		<updated>2026-01-14T20:12:58Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Linux access rights for devices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[draft]&lt;br /&gt;
&lt;br /&gt;
USB-HID (Human Interface Device) is one of the methods to connect input devices to FlightGear. &lt;br /&gt;
&lt;br /&gt;
==Linux access rights for devices==&lt;br /&gt;
HID devices under linux have usually restricted access rights, e.g. normal users are not allowed to access them directly. As you should not run FlightGear as root user, you most likely need to create a few udev rules to allow normal users to access the device files.&lt;br /&gt;
&lt;br /&gt;
First, use &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; to get a list of all detected USB devices. The output should look similar to this:&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Bus 003 Device 004: ID 294b:1901 Honeycomb Aeronautical Bravo Throttle Quadrant&lt;br /&gt;
Bus 003 Device 006: ID 06a3:0763 Saitek PLC Pro Flight Rudder Pedals&lt;br /&gt;
Bus 003 Device 002: ID 294b:1900 Honeycomb Aeronautical Alpha Flight Controls&lt;br /&gt;
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub&lt;br /&gt;
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Find the lines containing your relevant input devices (joysticks, yoke, throttle, pedals, ...) and note the IDs. The format is &amp;lt;vendor-id&amp;gt;:&amp;lt;device-id&amp;gt;. For simplicity, this example uses only the vendor-id.&lt;br /&gt;
&lt;br /&gt;
On Ubuntu, you can add for example the following file under &amp;lt;code&amp;gt;/etc/udev/rules.d&amp;lt;/code&amp;gt; to allow r/w access to members of the &amp;lt;code&amp;gt;input&amp;lt;/code&amp;gt; user group. Of course, you have to add/modify the lines to match the vendor-ids of your devices and your user id must be a member of the group.&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/udev/rules.d/40-usb-flightgear.rules&lt;br /&gt;
#&lt;br /&gt;
# To add your user to the input group try:&lt;br /&gt;
# sudo usermod --append --groups input &amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Honeycomb&lt;br /&gt;
SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{idVendor}==&amp;quot;294b&amp;quot;, GROUP=&amp;quot;input&amp;quot;, MODE=&amp;quot;0664&amp;quot;&lt;br /&gt;
# saitek&lt;br /&gt;
SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{idVendor}==&amp;quot;06a3&amp;quot;, GROUP=&amp;quot;input&amp;quot;, MODE=&amp;quot;0664&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;To activate the new rules, try &amp;lt;code&amp;gt;udevadm control --reload-rules &amp;amp;&amp;amp; udevadm trigger&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
If this does not help, a reboot will do.&lt;br /&gt;
&lt;br /&gt;
==Developing Configuration files for input devices==&lt;br /&gt;
&lt;br /&gt;
=== Gathering data ===&lt;br /&gt;
Add the following parameters to your FlightGear command line or via the launcher Settings&amp;gt;Additional Settings&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
--log-class=input&lt;br /&gt;
--log-level=debug&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will create a lot of debug output for the input systems in which you can find all events supported by your devices&lt;br /&gt;
&lt;br /&gt;
=== Creating a config file ===&lt;br /&gt;
The configuration files shall be stored in FGDATA/Input/Event/&amp;lt;Vendor&amp;gt;/&amp;lt;Model&amp;gt;.xml &lt;br /&gt;
&lt;br /&gt;
As a starting point you can copy this example. Replace the data as needed.&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;!-- next two must be single word, no special characters! --&amp;gt;&lt;br /&gt;
  &amp;lt;vendor-id&amp;gt;honeycomb&amp;lt;/vendor-id&amp;gt;&lt;br /&gt;
  &amp;lt;model-id&amp;gt;bravo&amp;lt;/model-id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- &lt;br /&gt;
  the name as seen e.g. in lsusb or the debug output of flightgear &lt;br /&gt;
  multiple &amp;lt;name&amp;gt;&amp;lt;/name&amp;gt; lines are allowed to match name variants&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Honeycomb Aeronautical Bravo Throttle Quadrant&amp;lt;/name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- &lt;br /&gt;
  during development, set this to true to get more debug output&lt;br /&gt;
  do not forget to set it to false, when you finalize your config file&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
  &amp;lt;debug-events type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/debug-events&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nasal&amp;gt;&lt;br /&gt;
    &amp;lt;open&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      #print(&amp;quot;Honeycomb Bravo Nasal (event) open&amp;quot;);&lt;br /&gt;
      #bravo = input_helpers.honeycomb.bravo.new(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/open&amp;gt;&lt;br /&gt;
    &amp;lt;close&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      #print(&amp;quot;Honeycomb Bravo Nasal (event) close&amp;quot;);&lt;br /&gt;
      #if (ishash(bravo) and isfunc(bravo['close']))&lt;br /&gt;
      #  bravo.close(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/close&amp;gt;&lt;br /&gt;
  &amp;lt;/nasal&amp;gt;&lt;br /&gt;
  &amp;lt;!-- events shall follow here --&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Example for an axis event:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;event&amp;gt;&lt;br /&gt;
    &amp;lt;desc&amp;gt;Lever 0&amp;lt;/desc&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;abs-x-translate&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;min-range&amp;gt;-1023&amp;lt;/min-range&amp;gt;&lt;br /&gt;
    &amp;lt;max-range&amp;gt;1023&amp;lt;/max-range&amp;gt;&lt;br /&gt;
    &amp;lt;binding&amp;gt;&lt;br /&gt;
      &amp;lt;command&amp;gt;property-scale&amp;lt;/command&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
  &amp;lt;/event&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Example for a button event:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;event&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;button-1&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;desc&amp;gt;AP mode HDG&amp;lt;/desc&amp;gt;&lt;br /&gt;
    &amp;lt;repeatable&amp;gt;false&amp;lt;/repeatable&amp;gt;&lt;br /&gt;
    &amp;lt;binding&amp;gt;&lt;br /&gt;
      &amp;lt;command&amp;gt;property-assign&amp;lt;/command&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/input/honeycomb/bravo/buttons/hdg&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;value&amp;gt;1&amp;lt;/value&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
    &amp;lt;mod-up&amp;gt;&lt;br /&gt;
      &amp;lt;binding&amp;gt;&lt;br /&gt;
        &amp;lt;command&amp;gt;property-assign&amp;lt;/command&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/input/honeycomb/bravo/buttons/hdg&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;value&amp;gt;0&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/binding&amp;gt;&lt;br /&gt;
    &amp;lt;/mod-up&amp;gt;&lt;br /&gt;
  &amp;lt;/event&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Status of OS support==&lt;br /&gt;
Linux: Supported&lt;br /&gt;
&lt;br /&gt;
MacOS: supported?&lt;br /&gt;
&lt;br /&gt;
Windows: not yet supported?&lt;br /&gt;
&lt;br /&gt;
== see also ==&lt;br /&gt;
[[Input helpers]]&lt;br /&gt;
&lt;br /&gt;
[[Honeycomb Input Devices]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Conditions&amp;diff=143498</id>
		<title>Conditions</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Conditions&amp;diff=143498"/>
		<updated>2026-01-14T08:50:05Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Supported elements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Conditions''' (or '''&amp;lt;code&amp;gt;SGCondition&amp;lt;/code&amp;gt;s''') in the SimGear library are a property-based representation of custom conditions based on comparing property values. They can be evaluated from both C++ and Nasal (see &amp;lt;code&amp;gt;$SGSOURCE/simgear/props/condition.hxx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[$FG_ROOT]]/Nasal/props.nas&amp;lt;/code&amp;gt;). Comparison of string-typed properties involves lexicographic ordering, as specified by the C++ operators &amp;lt;tt&amp;gt;&amp;amp;lt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Conditions are supported in&lt;br /&gt;
* All [[bindings]], all [[animations]]&lt;br /&gt;
* State machines&lt;br /&gt;
* Various parts of [[HUD]]s, 2D panels, [[PUI]]/XML dialogs&lt;br /&gt;
* Autopilot / PropertyRule systems&lt;br /&gt;
… and several other places.&lt;br /&gt;
&lt;br /&gt;
== Sample conditions ==&lt;br /&gt;
This is a sample expression for checking if the throttle on the first engine is above half:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;condition&amp;gt;&lt;br /&gt;
  &amp;lt;greater-than&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;value type=&amp;quot;double&amp;quot;&amp;gt;0.5&amp;lt;/value&amp;gt;&lt;br /&gt;
  &amp;lt;/greater-than&amp;gt;&lt;br /&gt;
&amp;lt;/condition&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Supported elements ==&lt;br /&gt;
Each comparison (like &amp;lt;code&amp;gt;less-than&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;greater-than-equals&amp;lt;/code&amp;gt;) requires either two &amp;lt;code&amp;gt;&amp;amp;lt;property&amp;amp;gt;&amp;lt;/code&amp;gt; elements (the first with index=0 and the second with index=1) or a &amp;lt;code&amp;gt;&amp;amp;lt;property&amp;amp;gt;&amp;lt;/code&amp;gt; (considered first) and &amp;lt;code&amp;gt;&amp;amp;lt;value&amp;amp;gt;&amp;lt;/code&amp;gt; (considered second); booleans compare each of their child conditions. A &amp;lt;code&amp;gt;&amp;amp;lt;condition&amp;amp;gt;&amp;lt;/code&amp;gt; element itself functions as an &amp;amp;lt;and&amp;lt;tt&amp;gt;&amp;amp;gt;&amp;lt;/tt&amp;gt; element; that is, it can have several children, all of which must be true to make the whole condition true. Instead of &amp;lt;code&amp;gt;&amp;amp;lt;property&amp;amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;lt;value&amp;amp;gt;&amp;lt;/code&amp;gt;you can also use an &amp;lt;code&amp;gt;&amp;amp;lt;expression&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;and&amp;gt;&lt;br /&gt;
&amp;lt;or&amp;gt;&lt;br /&gt;
&amp;lt;not&amp;gt; &amp;lt;!-- acts like logical inverse of &amp;lt;and&amp;gt;, i.e. accepts child conditions --&amp;gt;&lt;br /&gt;
&amp;lt;equals&amp;gt;&lt;br /&gt;
&amp;lt;not-equals&amp;gt;&lt;br /&gt;
&amp;lt;less-than&amp;gt;&lt;br /&gt;
&amp;lt;greater-than&amp;gt;&lt;br /&gt;
&amp;lt;less-than-equals&amp;gt;&lt;br /&gt;
&amp;lt;greater-than-equals&amp;gt;&lt;br /&gt;
&amp;lt;property&amp;gt; &amp;lt;!-- evaluates boolean value of specified property --&amp;gt;&lt;br /&gt;
&amp;lt;false/&amp;gt; &amp;lt;!-- static false value (&amp;lt;value&amp;gt; does NOT work in conditions !)--&amp;gt;&lt;br /&gt;
&amp;lt;true/&amp;gt;&amp;lt;!-- static true value --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Expressions]]&lt;br /&gt;
* [[PropertyList XML files]]&lt;br /&gt;
&lt;br /&gt;
=== Readme file ===&lt;br /&gt;
* {{readme file|conditions}}&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
* {{simgear source&lt;br /&gt;
| path   = simgear/props/condition.hxx&lt;br /&gt;
| text   = simgear/props/condition.hxx&lt;br /&gt;
}}&lt;br /&gt;
* {{simgear source&lt;br /&gt;
| path   = simgear/props/condition.cxx&lt;br /&gt;
| text   = simgear/props/condition.cxx&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:FlightGear]]&lt;br /&gt;
[[Category:XML]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Expressions&amp;diff=143482</id>
		<title>Expressions</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Expressions&amp;diff=143482"/>
		<updated>2026-01-11T11:56:22Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Table */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
{{-}}&lt;br /&gt;
'''Expressions''' (or '''SGExpressions''') are a feature of the SimGear library and provide a nice way of implementing complex math formulas using XML syntax.&lt;br /&gt;
They are supported in many systems within the FlightGear code.&lt;br /&gt;
&lt;br /&gt;
{{caution|Expressions do not check if your math creates floating point exceptions (like division by zero conditions, taking the square root of a negative number, etc.). This can cause undefined behavior and may result in NaNs or even Cascading NaNs.}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Expressions are supported in&lt;br /&gt;
* [[Autopilot Configuration Reference#Expressions|Autopilot configuration files]]&lt;br /&gt;
* Particle system configuration files&lt;br /&gt;
* Animations (translate, rotate, scale, range, blend)&lt;br /&gt;
* The shader technique&lt;br /&gt;
* [[Conditions]]&lt;br /&gt;
&lt;br /&gt;
== Sample Expressions ==&lt;br /&gt;
This is a sample expression for &amp;lt;code&amp;gt;c = sqrt(a*a + b^2)&amp;lt;/code&amp;gt;. Children/arguments are parsed in the order they appear in in the file (or the order in which they are set via property methods).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;expression&amp;gt;&lt;br /&gt;
  &amp;lt;sqrt&amp;gt;&lt;br /&gt;
    &amp;lt;sum&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/value/a&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/value/a&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/value/b&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;value&amp;gt;2&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/pow&amp;gt;&lt;br /&gt;
    &amp;lt;/sum&amp;gt;&lt;br /&gt;
  &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
&amp;lt;/expression&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supported elements ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;abs&amp;gt; &amp;lt;!-- also: fabs --&amp;gt;&lt;br /&gt;
&amp;lt;acos&amp;gt;&lt;br /&gt;
&amp;lt;asin&amp;gt;&lt;br /&gt;
&amp;lt;atan&amp;gt;&lt;br /&gt;
&amp;lt;atan2&amp;gt;&lt;br /&gt;
&amp;lt;ceil&amp;gt;&lt;br /&gt;
&amp;lt;clip&amp;gt; &amp;lt;!-- &amp;lt;clipMin&amp;gt; &amp;lt;clipMax&amp;gt; --&amp;gt;&lt;br /&gt;
&amp;lt;cos&amp;gt;&lt;br /&gt;
&amp;lt;cosh&amp;gt;&lt;br /&gt;
&amp;lt;difference&amp;gt; &amp;lt;!-- also: dif --&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;exp&amp;gt;&lt;br /&gt;
&amp;lt;floor&amp;gt;&lt;br /&gt;
&amp;lt;log&amp;gt;&lt;br /&gt;
&amp;lt;log10&amp;gt;&lt;br /&gt;
&amp;lt;max&amp;gt;&lt;br /&gt;
&amp;lt;min&amp;gt;&lt;br /&gt;
&amp;lt;mod&amp;gt;&lt;br /&gt;
&amp;lt;pow&amp;gt;&lt;br /&gt;
&amp;lt;product&amp;gt; &amp;lt;!-- also: prod --&amp;gt;&lt;br /&gt;
&amp;lt;property&amp;gt; &amp;lt;!-- Unlike elsewhere, 'prop' does not work in expressions. --&amp;gt;&lt;br /&gt;
&amp;lt;rad2deg&amp;gt;&lt;br /&gt;
&amp;lt;deg2rad&amp;gt;&lt;br /&gt;
&amp;lt;sin&amp;gt;&lt;br /&gt;
&amp;lt;sinh&amp;gt;&lt;br /&gt;
&amp;lt;sqr&amp;gt;&lt;br /&gt;
&amp;lt;sqrt&amp;gt;&lt;br /&gt;
&amp;lt;sum&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt; &amp;lt;!-- &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; value &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; value &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt; --&amp;gt;&lt;br /&gt;
&amp;lt;tan&amp;gt;&lt;br /&gt;
&amp;lt;tanh&amp;gt;&lt;br /&gt;
&amp;lt;value&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Table ===&lt;br /&gt;
The table expression uses the following syntax, similarly to the &amp;lt;interpolation&amp;gt; element:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
	&amp;lt;!-- put an input element here, this can be &amp;lt;property&amp;gt; or any other operation --&amp;gt;&lt;br /&gt;
	&amp;lt;entry&amp;gt;&lt;br /&gt;
		&amp;lt;ind&amp;gt;0.0&amp;lt;/ind&amp;gt; &amp;lt;!-- the value of the input (independent value) --&amp;gt;&lt;br /&gt;
		&amp;lt;dep&amp;gt;0.0&amp;lt;/dep&amp;gt; &amp;lt;!-- the value of the output (dependent value) --&amp;gt;&lt;br /&gt;
	&amp;lt;/entry&amp;gt;&lt;br /&gt;
        ... &amp;lt;!-- you can put as many entries as you want --&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The entries must be sorted by the independent (input) variable strictly ascending. If input is outside the range of the table, output will be determined from the first / last table row.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
The table:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|0.0&lt;br /&gt;
|5.0&lt;br /&gt;
|-&lt;br /&gt;
|0.5&lt;br /&gt;
|7.5&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
| -5.0&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|25.0&lt;br /&gt;
|}&lt;br /&gt;
translates to the following code:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
	&amp;lt;!-- put an input element here, this can be a &amp;lt;property&amp;gt; or any other operation --&amp;gt;&lt;br /&gt;
	&amp;lt;entry&amp;gt;&lt;br /&gt;
		&amp;lt;ind&amp;gt;0.0&amp;lt;/ind&amp;gt;&lt;br /&gt;
		&amp;lt;dep&amp;gt;5.0&amp;lt;/dep&amp;gt;&lt;br /&gt;
	&amp;lt;/entry&amp;gt;&lt;br /&gt;
	&amp;lt;entry&amp;gt;&lt;br /&gt;
		&amp;lt;ind&amp;gt;0.5&amp;lt;/ind&amp;gt;&lt;br /&gt;
		&amp;lt;dep&amp;gt;7.5&amp;lt;/dep&amp;gt;&lt;br /&gt;
	&amp;lt;/entry&amp;gt;&lt;br /&gt;
	&amp;lt;entry&amp;gt;&lt;br /&gt;
		&amp;lt;ind&amp;gt;0.9&amp;lt;/ind&amp;gt;&lt;br /&gt;
		&amp;lt;dep&amp;gt;-5.0&amp;lt;/dep&amp;gt;&lt;br /&gt;
	&amp;lt;/entry&amp;gt;&lt;br /&gt;
	&amp;lt;entry&amp;gt;&lt;br /&gt;
		&amp;lt;ind&amp;gt;1.0&amp;lt;/ind&amp;gt;&lt;br /&gt;
		&amp;lt;dep&amp;gt;25.0&amp;lt;/dep&amp;gt;&lt;br /&gt;
	&amp;lt;/entry&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Quantize continuous input values with nearest-match mode ===&lt;br /&gt;
{{Caution|This feature was added to the development branch (aka 'next') in 01/2026. After some more testing, it may be backported or just become part of the next release.}}As an alternative to interpolating, the &amp;lt;nowiki&amp;gt;&amp;lt;table&amp;gt; expression can also search the nearest match for an input and return a fixed value. This feature was developed to transform a continuous joystick axis reading from a throttle quadrant into discrete flaps setting numbers.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The discrete return values have to be written into the &amp;lt;dep&amp;gt; elements, the &amp;lt;ind&amp;gt; elements mark the reference input value (e.g. js axis reading for a certain flap setting). The &amp;lt;ind&amp;gt; values must be sorted and no duplicates are allowed.&lt;br /&gt;
&lt;br /&gt;
The output will change &amp;quot;half way&amp;quot; between two &amp;lt;ind&amp;gt; values. &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;expression&amp;gt;&lt;br /&gt;
    &amp;lt;table&amp;gt;&lt;br /&gt;
        &amp;lt;!-- event input goes here --&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;&amp;lt;/property&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;mode&amp;gt;nearest&amp;lt;/mode&amp;gt;&lt;br /&gt;
        &amp;lt;entry&amp;gt;&lt;br /&gt;
            &amp;lt;ind&amp;gt;0&amp;lt;/ind&amp;gt;&lt;br /&gt;
            &amp;lt;dep&amp;gt;30&amp;lt;/dep&amp;gt;&lt;br /&gt;
        &amp;lt;/entry&amp;gt;&lt;br /&gt;
        &amp;lt;entry&amp;gt;&lt;br /&gt;
            &amp;lt;ind&amp;gt;0.12&amp;lt;/ind&amp;gt;&lt;br /&gt;
            &amp;lt;dep&amp;gt;25&amp;lt;/dep&amp;gt;&lt;br /&gt;
        &amp;lt;/entry&amp;gt;&lt;br /&gt;
        &amp;lt;entry&amp;gt;&lt;br /&gt;
            &amp;lt;ind&amp;gt;0.30&amp;lt;/ind&amp;gt;&lt;br /&gt;
            &amp;lt;dep&amp;gt;20&amp;lt;/dep&amp;gt;&lt;br /&gt;
        &amp;lt;/entry&amp;gt;&lt;br /&gt;
        &amp;lt;entry&amp;gt;&lt;br /&gt;
            &amp;lt;ind&amp;gt;0.48&amp;lt;/ind&amp;gt;&lt;br /&gt;
            &amp;lt;dep&amp;gt;15&amp;lt;/dep&amp;gt;&lt;br /&gt;
        &amp;lt;/entry&amp;gt;&lt;br /&gt;
        &amp;lt;entry&amp;gt;&lt;br /&gt;
            &amp;lt;ind&amp;gt;0.66&amp;lt;/ind&amp;gt;&lt;br /&gt;
            &amp;lt;dep&amp;gt;5&amp;lt;/dep&amp;gt;&lt;br /&gt;
        &amp;lt;/entry&amp;gt;&lt;br /&gt;
        &amp;lt;entry&amp;gt;&lt;br /&gt;
            &amp;lt;ind&amp;gt;0.83&amp;lt;/ind&amp;gt;&lt;br /&gt;
            &amp;lt;dep&amp;gt;1&amp;lt;/dep&amp;gt;&lt;br /&gt;
        &amp;lt;/entry&amp;gt;&lt;br /&gt;
        &amp;lt;entry&amp;gt;&lt;br /&gt;
            &amp;lt;ind&amp;gt;1.0&amp;lt;/ind&amp;gt;&lt;br /&gt;
            &amp;lt;dep&amp;gt;0&amp;lt;/dep&amp;gt;&lt;br /&gt;
        &amp;lt;/entry&amp;gt;&lt;br /&gt;
    &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/expression&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Clip===&lt;br /&gt;
An expression to limit e.g. rotation:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;expression&amp;gt;&lt;br /&gt;
    &amp;lt;clip&amp;gt;&lt;br /&gt;
      &amp;lt;clipMin&amp;gt;-45&amp;lt;/clipMin&amp;gt;&lt;br /&gt;
      &amp;lt;clipMax&amp;gt;45&amp;lt;/clipMax&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;orientation/pitch-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/clip&amp;gt;&lt;br /&gt;
  &amp;lt;/expression&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hints and tips ==&lt;br /&gt;
=== Rounding ===&lt;br /&gt;
While there is no element for rounding, this workaround can be used for that:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;expression&amp;gt;&lt;br /&gt;
  &amp;lt;floor&amp;gt;&lt;br /&gt;
    &amp;lt;sum&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;your/property/here&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;value&amp;gt;0.5&amp;lt;/value&amp;gt;&lt;br /&gt;
    &amp;lt;/sum&amp;gt;&lt;br /&gt;
  &amp;lt;/floor&amp;gt;&lt;br /&gt;
&amp;lt;/expression&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Conditions]]&lt;br /&gt;
* [[PropertyList XML files]]&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
* {{simgear file|simgear/structure/SGExpression.hxx}}&lt;br /&gt;
* {{simgear file|simgear/structure/SGExpression.cxx}}&lt;br /&gt;
&lt;br /&gt;
[[Category:XML]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Bindings&amp;diff=143481</id>
		<title>Bindings</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Bindings&amp;diff=143481"/>
		<updated>2026-01-11T11:42:26Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Related Content */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Bindings''' define what happens when a user:&lt;br /&gt;
* [[Howto: Make a clickable panel|Clicks an object]] in the [[scenery]] or in an [[aircraft]].&lt;br /&gt;
* Presses a key/button on the keyboard or [[joystick]].&lt;br /&gt;
* Clicks a [[menu]] item&lt;br /&gt;
* Interacts with a dialog (clicking a button, selecting list entries etc)&lt;br /&gt;
&lt;br /&gt;
In other words, '''bindings''' are simply the term for '''actions''' that are associated with certain '''events''' in FlightGear. &lt;br /&gt;
&lt;br /&gt;
There are different types of events supported by various subsystems, but the resulting action that can be triggered will typically involve either a hard-coded command (a so called &amp;lt;code&amp;gt;fgcommand&amp;lt;/code&amp;gt;), or a block of scripted code (using [[Nasal]]). Bindings can be parameterized / customized using properties as arguments that are passed to each binding as a props.Node object.&lt;br /&gt;
And Nasal code can also be registered to become available as a dedicated &amp;lt;code&amp;gt;fgcommand&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
An object, button or key can have multiple bindings assigned to them. The bindings will be executed in the order in which they appear in the XML file. Bindings may contain [[conditions]] to make them conditionally executed. Each binding must specify a command node with its particular type, see below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|Aircraft are free to override key bindings to fullfill their needs. The Space Shuttle for instance has no mixture control, so the m-key switches from translational to rotational hand controller.&lt;br /&gt;
The key only performs as mixture control if the plane has mixture settings and if the plane didn't re-assign the key - so dependent on what plane you try, it may or may not. Usually the aircraft-specific help spells it out.&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://forum.flightgear.org/viewtopic.php?p=298436#p298436 &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re: trouble with m-key &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Thorsten &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Nov 9th, 2016 &lt;br /&gt;
  |added  =  Nov 9th, 2016 &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This article gives a small overview of frequently used bindings. Please refer to {{readme file|commands}} for additional information and refer to &amp;lt;code&amp;gt;$FG_SRC/Main/fg_commands.cxx&amp;lt;/code&amp;gt; for a complete list of available bindings.&lt;br /&gt;
&lt;br /&gt;
All given codes are examples, found on various places in the [[FlightGear]] package.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
Below are some useful commands, some also with their equivalent Nasal call.  A more complete listing can be found in the readme file, {{readme file|commands}}.&lt;br /&gt;
&lt;br /&gt;
To learn more about adding your own custom &amp;lt;code&amp;gt;fgcommands&amp;lt;/code&amp;gt; to the source code, see [[Howto:Add new fgcommands to FlightGear]].&lt;br /&gt;
&lt;br /&gt;
=== replay ===&lt;br /&gt;
Toggles replay.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;replay&amp;lt;/command&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
fgcommand(&amp;quot;replay&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== dialog-close ===&lt;br /&gt;
Closes the active dialog.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;dialog-close&amp;lt;/command&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
fgcommand(&amp;quot;dialog-close&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
To close a specific dialog use for example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
fgcommand(&amp;quot;dialog-close&amp;quot;, props.Node.new({&amp;quot;dialog-name&amp;quot;: &amp;quot;chat-full&amp;quot;}));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== dialog-show ===&lt;br /&gt;
Shows a dialog, which should be present in &amp;lt;tt&amp;gt;''[[$FG_ROOT]]/gui/dialogs''&amp;lt;/tt&amp;gt;. In addition, from FlightGear 2.8, dialog files located in &amp;lt;tt&amp;gt;''&amp;lt;aircraft directory&amp;gt;/gui/dialogs''&amp;lt;/tt&amp;gt; are also loaded. This should be used for dialogs specific to a certain aircraft.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;dialog-show&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;dialog-name&amp;gt;location-in-air&amp;lt;/dialog-name&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
fgcommand(&amp;quot;dialog-show&amp;quot;, props.Node.new({&amp;quot;dialog-name&amp;quot;: &amp;quot;location-in-air&amp;quot;}));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; dialog-name : The name of the dialog, as designated in its XML file.&lt;br /&gt;
&lt;br /&gt;
=== nasal ===&lt;br /&gt;
[[Nasal]] is frequently used for complicated systems, because it can execute virtually any function and allows running previously-defined Nasal functions.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;nasal&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;script&amp;gt;b777.afds.input(0,1);&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; script : The Nasal script to execute.&lt;br /&gt;
: {{inote|Make sure that the script does not conflict with the {{wikipedia|List of XML and HTML character entity references#Predefined entities in XML|predefined XML entities}}. If it does, you can either put it in a {{wikipedia|CDATA|CDATA section}} or use a non-interpreted version (e.g., &amp;lt;code&amp;gt;&amp;amp;amp;gt;&amp;lt;/code&amp;gt; in place of &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;).}}&lt;br /&gt;
&lt;br /&gt;
The {{func link|cmdarg()}} function is often useful in these situations to extract offset values passed to the binding. It returns the specific &amp;lt;tt&amp;gt;&amp;amp;lt;binding&amp;amp;gt;&amp;lt;/tt&amp;gt; node, which contains a &amp;lt;tt&amp;gt;&amp;amp;lt;setting&amp;amp;gt;&amp;lt;/tt&amp;gt; node at runtime if used in a joystick axis that represents the value of that axis.&lt;br /&gt;
&lt;br /&gt;
In joysticks and keyboard keys, the script is run in a specific namespace; please see [[Howto:Understand Namespaces and Methods]] for more information on namespaces.&lt;br /&gt;
&lt;br /&gt;
=== property-adjust ===&lt;br /&gt;
Increases or decreases a property's value with a given step. Maximum and minimum values are optional.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-adjust&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/autopilot/settings/heading-bug-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;step&amp;gt;1&amp;lt;/step&amp;gt;&lt;br /&gt;
  &amp;lt;min&amp;gt;0&amp;lt;/min&amp;gt;&lt;br /&gt;
  &amp;lt;max&amp;gt;360&amp;lt;/max&amp;gt;&lt;br /&gt;
  &amp;lt;wrap&amp;gt;true&amp;lt;/wrap&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; property : Property that will be changed.&lt;br /&gt;
; step     : Amount to increase or decrease the property's value. Defaults to 0.&lt;br /&gt;
; offset   : Offset from the property's current value. If '''step''' is not given, this is multiplied by '''factor'''.&lt;br /&gt;
; factor   : When '''step''' is not given, '''offset''' is multiplied by this. Defaults to 1.&lt;br /&gt;
; min      : The minimum allowed value. Defaults to &amp;quot;no minimum.&amp;quot;&lt;br /&gt;
; max      : The maximum allowed value. Defaults to &amp;quot;no maximum.&amp;quot;&lt;br /&gt;
; wrap     : If true, the value will be wrapped when it passes min or max; both min and max must be present for this to work. Defaults to false.:{{Note|When wrap is set to true, the max parameter must be set to the desired maximum value + step or factor in order to work correctly !}}&lt;br /&gt;
; mask     :This argument accepts three value: &amp;lt;code&amp;gt;integer&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;decimal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; (default). &amp;lt;code&amp;gt;integer&amp;lt;/code&amp;gt; means that &amp;lt;code&amp;gt;step&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;offset * factor&amp;lt;/code&amp;gt; is applied to the part of the property's current value left of the decimal point first. &amp;lt;code&amp;gt;decimal&amp;lt;/code&amp;gt; does the same, but applies it to the part to the right of the decimal point. &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; simply applies it to the whole number. This is especially useful for COM / NAV radio frequency knobs - use &amp;lt;code&amp;gt;integer&amp;lt;/code&amp;gt; for the outer (big) knob and &amp;lt;code&amp;gt;decimal&amp;lt;/code&amp;gt; for the inner (small) knob.&lt;br /&gt;
&lt;br /&gt;
=== property-assign ===&lt;br /&gt;
One of the most important commands. It sets a property to a predefined value or to the value of another property.&amp;lt;ref&amp;gt;{{flightgear source&lt;br /&gt;
| path = src/Main/fg_commands.cxx&lt;br /&gt;
| line = 446&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-assign&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/autopilot/settings/target-speed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;value&amp;gt;0&amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-assign&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;autopilot/input/hdg&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;instrumentation/heading-indicator/hdg-autopilot&amp;lt;/property&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== property-cycle ===&lt;br /&gt;
Cycles between a list of values and assigns one to a property. The value-list can vary in length. If the current value is &amp;lt;code&amp;gt;value1&amp;lt;/code&amp;gt;, it will change to &amp;lt;code&amp;gt;value2&amp;lt;/code&amp;gt;; if it is &amp;lt;code&amp;gt;value2&amp;lt;/code&amp;gt;, it will change to &amp;lt;code&amp;gt;value3&amp;lt;/code&amp;gt;, and so on.  If the current value is not in the list, it will jump to the first one.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-cycle&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/autopilot/autobrake/setting&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;value type=&amp;quot;string&amp;quot;&amp;gt;ARM&amp;lt;/value&amp;gt;&lt;br /&gt;
  &amp;lt;value type=&amp;quot;string&amp;quot;&amp;gt;DISARM&amp;lt;/value&amp;gt;&lt;br /&gt;
  &amp;lt;value type=&amp;quot;string&amp;quot;&amp;gt;OFF&amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As of May 2013, the command supports additional behaviours to simplify use with the new [[Knob_/_slider_animation|knob and slider animations]]. The wrapping behaviour can be disabled by setting &amp;lt;code&amp;gt;&amp;lt;wrap&amp;gt;0&amp;lt;/wrap&amp;gt;&amp;lt;/code&amp;gt;, and the command uses the &amp;lt;code&amp;gt;offset&amp;lt;/code&amp;gt; argument to select a direction of movement. This means a &amp;lt;code&amp;gt;property-cycle&amp;lt;/code&amp;gt; bound to a multi-position knob will function as expected for movement in both directions.&lt;br /&gt;
&lt;br /&gt;
=== property-interpolate ===&lt;br /&gt;
Interpolates to a value with a given rate of change (per second).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-interpolate&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/controls/flight/aileron-trim&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;value type=&amp;quot;double&amp;quot;&amp;gt;0&amp;lt;/value&amp;gt;&lt;br /&gt;
  &amp;lt;rate&amp;gt;0.5&amp;lt;/rate&amp;gt;&amp;lt;!-- 2 seconds to 0 from 1 or -1 --&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of using &amp;lt;code&amp;gt;&amp;lt;rate&amp;gt;&amp;lt;/code&amp;gt;, one could use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;time&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;time&amp;gt;, to specify the time (in seconds) it takes to go to the new value, independent of the current value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-interpolate&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/controls/flight/aileron-trim&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;value type=&amp;quot;double&amp;quot;&amp;gt;0&amp;lt;/value&amp;gt;&lt;br /&gt;
  &amp;lt;time&amp;gt;2&amp;lt;/time&amp;gt;&amp;lt;!-- 2 seconds to 0 from 1, 0.5, -1 etc. --&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also interpolate to a value given by a property.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-interpolate&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/controls/flight/aileron-trim&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/controls/flight/default-aileron-trim&amp;lt;/property&amp;gt;&amp;lt;!-- the value to interpolate to, is 0 --&amp;gt;&lt;br /&gt;
  &amp;lt;rate&amp;gt;0.5&amp;lt;/rate&amp;gt;&amp;lt;!-- 2 seconds to 0 from 1 or -1 --&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== property-multiply ===&lt;br /&gt;
Multiply the value of a property by a given factor.&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-multiply&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/controls/flight/aileron&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;factor&amp;gt;0.5&amp;lt;/factor&amp;gt;&lt;br /&gt;
  &amp;lt;min&amp;gt;-1&amp;lt;/min&amp;gt;&lt;br /&gt;
  &amp;lt;max&amp;gt;1&amp;lt;/max&amp;gt;&lt;br /&gt;
  &amp;lt;mask&amp;gt;all&amp;lt;/mask&amp;gt;&lt;br /&gt;
  &amp;lt;wrap&amp;gt;true&amp;lt;/wrap&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''factor:''' the amount to multiply by.&lt;br /&gt;
*'''min:''' minimum value.&lt;br /&gt;
*'''max:''' maximum value.&lt;br /&gt;
*'''mask:'''&lt;br /&gt;
** '''integer:''' mutiply only left of the decimal point.&lt;br /&gt;
** '''decimal:''' multiply only the right of the decimal point.&lt;br /&gt;
** '''all:''' multiply the entire value.&lt;br /&gt;
*'''wrap:''' true if the value should be wrapped if it passes min/max. It is required to set both min and max in that case.&lt;br /&gt;
&lt;br /&gt;
=== property-randomize ===&lt;br /&gt;
Assigns a random value (between min and max) to a property.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-randomize&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/orientation/pitch-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;min&amp;gt;0&amp;lt;/min&amp;gt;&lt;br /&gt;
  &amp;lt;max&amp;gt;360&amp;lt;/max&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== property-scale ===&lt;br /&gt;
Set the value of a property based on an axis, often used in [[joystick]] configuration files.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-scale&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/controls/flight/aileron&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;offset&amp;gt;0.001&amp;lt;/offset&amp;gt;&lt;br /&gt;
  &amp;lt;factor&amp;gt;-1&amp;lt;/factor&amp;gt;&lt;br /&gt;
  &amp;lt;power&amp;gt;3&amp;lt;/power&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''setting:''' the current input setting (usually a joystick axis from -1 or 0 to 1)&lt;br /&gt;
* '''offset:''' the offset to shift by, before applying the factor.&lt;br /&gt;
* '''factor:''' the factor to multiply by (use negative to reverse).&lt;br /&gt;
* '''squared:''' if true will square the resulting value (same as power=2).&lt;br /&gt;
* '''power:''' the resulting value will be taken to the power of this integer value (overrides squared).&lt;br /&gt;
&lt;br /&gt;
Remember: &amp;lt;code&amp;gt;(property ^ power + offset) * factor = result&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== property-swap ===&lt;br /&gt;
Swaps the values of two properties, useful for radio panels.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-swap&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/instrumentation/comm/frequencies/selected-mhz&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/instrumentation/comm/frequencies/standby-mhz&amp;lt;/property&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== property-toggle ===&lt;br /&gt;
Toggles the value of a property on each click, between &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;(1&amp;lt;/code&amp;gt;) and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-toggle&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/controls/gear/gear-down&amp;lt;/property&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Or - if defined - it toggles between two custom values:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-toggle&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/controls/gear/gear-down&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;value&amp;gt;2&amp;lt;/value&amp;gt;&lt;br /&gt;
  &amp;lt;value&amp;gt;3&amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===request-metar ===&lt;br /&gt;
{{cquote|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
fgcommand(&amp;quot;request-metar&amp;quot;, props.Node.new({&amp;quot;path&amp;quot;: &amp;quot;/foo/mymetar&amp;quot;, &amp;quot;station&amp;quot;: &amp;quot;LOWI&amp;quot;}));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you pass an existing path, the station ID will be updated, and if you pass the same station ID as before, no additional request is made. As usual for metar-properties, there's a time-to-live and valid flags you can check, and the metar refreshes automatically every 900 seconds. You can also write to the station ID directly to change station, update the time-to-live, and wait for the valid signal.&lt;br /&gt;
&lt;br /&gt;
There's also an unregister command ('clear-metar') to cancel the binding into the property tree.&amp;lt;ref&amp;gt;{{cite web |url=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg38372.html|title=&amp;lt;nowiki&amp;gt;[Flightgear-devel] Requesting arbitrary metar&amp;lt;/nowiki&amp;gt;|author=James Turner|date=Sun, 23 Sep 2012 08:56:48 -0700}}&amp;lt;/ref&amp;gt;|James Turner}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Expressions in Bindings ==&lt;br /&gt;
{{Caution|This feature was added to the development branch (aka 'next') in 01/2026. After some more testing, it may be backported or just become part of the next release.}}&lt;br /&gt;
Instead of using one of the commands shown above you can also add an expression to a binding to perform some math on the input raw value, before writing it into the property tree.&lt;br /&gt;
&lt;br /&gt;
Do not add a &amp;lt;command&amp;gt;, just add an &amp;lt;expression&amp;gt; and a &amp;lt;property&amp;gt; were the result should be stored. Inside the expression, an empty property path (&amp;lt;code&amp;gt;&amp;lt;property&amp;gt;&amp;lt;/property&amp;gt;&amp;lt;/code&amp;gt;) refers to the input value of the binding.&lt;br /&gt;
&lt;br /&gt;
=== Example: ===&lt;br /&gt;
We have a lever on a throttle quadrant which initially gives us a floating point number between 0 and 1. Now, if this lever shall drive the flaps, we want to map certain positions to discrete flaps settings. &lt;br /&gt;
To achieve this, we can use a table expression using nearest-match mode.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;event&amp;gt;&lt;br /&gt;
    &amp;lt;desc&amp;gt;Lever 5&amp;lt;/desc&amp;gt;&lt;br /&gt;
    &amp;lt;min-range&amp;gt;-1023&amp;lt;/min-range&amp;gt;&lt;br /&gt;
    &amp;lt;max-range&amp;gt;1023&amp;lt;/max-range&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;abs-z-translate&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;binding&amp;gt;&lt;br /&gt;
        &amp;lt;!-- result of expression goes to property --&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/input/honeycomb/bravo/flaps-boeing&amp;lt;/property&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;expression&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;!-- event input goes here --&amp;gt;&lt;br /&gt;
                &amp;lt;property&amp;gt;&amp;lt;/property&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;mode&amp;gt;nearest&amp;lt;/mode&amp;gt;&lt;br /&gt;
                &amp;lt;entry&amp;gt;&lt;br /&gt;
                    &amp;lt;ind&amp;gt;0&amp;lt;/ind&amp;gt;&lt;br /&gt;
                    &amp;lt;dep&amp;gt;30&amp;lt;/dep&amp;gt;&lt;br /&gt;
                &amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;entry&amp;gt;&lt;br /&gt;
                    &amp;lt;ind&amp;gt;0.12&amp;lt;/ind&amp;gt;&lt;br /&gt;
                    &amp;lt;dep&amp;gt;25&amp;lt;/dep&amp;gt;&lt;br /&gt;
                &amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;entry&amp;gt;&lt;br /&gt;
                    &amp;lt;ind&amp;gt;0.30&amp;lt;/ind&amp;gt;&lt;br /&gt;
                    &amp;lt;dep&amp;gt;20&amp;lt;/dep&amp;gt;&lt;br /&gt;
                &amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;entry&amp;gt;&lt;br /&gt;
                    &amp;lt;ind&amp;gt;0.48&amp;lt;/ind&amp;gt;&lt;br /&gt;
                    &amp;lt;dep&amp;gt;15&amp;lt;/dep&amp;gt;&lt;br /&gt;
                &amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;entry&amp;gt;&lt;br /&gt;
                    &amp;lt;ind&amp;gt;0.66&amp;lt;/ind&amp;gt;&lt;br /&gt;
                    &amp;lt;dep&amp;gt;5&amp;lt;/dep&amp;gt;&lt;br /&gt;
                &amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;entry&amp;gt;&lt;br /&gt;
                    &amp;lt;ind&amp;gt;0.83&amp;lt;/ind&amp;gt;&lt;br /&gt;
                    &amp;lt;dep&amp;gt;1&amp;lt;/dep&amp;gt;&lt;br /&gt;
                &amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;entry&amp;gt;&lt;br /&gt;
                    &amp;lt;ind&amp;gt;1.0&amp;lt;/ind&amp;gt;&lt;br /&gt;
                    &amp;lt;dep&amp;gt;0&amp;lt;/dep&amp;gt;&lt;br /&gt;
                &amp;lt;/entry&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/expression&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/event&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Content ==&lt;br /&gt;
=== Wiki ===&lt;br /&gt;
* [[Conditions]]&lt;br /&gt;
* [[Expressions]]&lt;br /&gt;
* [[Howto:Make a clickable panel]]&lt;br /&gt;
* [[Howto:Reassign keyboard bindings]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* {{forum link|t=37443|title=Order of multiple bindings}}&lt;br /&gt;
* {{forum link|t=37447|title=Amending to key bindings}} - Partially about indices (&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;binding n=&amp;quot;&amp;lt;index&amp;gt;&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;) for bindings.&lt;br /&gt;
&lt;br /&gt;
=== Readme file ===&lt;br /&gt;
* {{readme file|commands}}&lt;br /&gt;
&lt;br /&gt;
=== Source ===&lt;br /&gt;
Note that many commands are defined elsewhere. The readme file has a more complete listing.&lt;br /&gt;
&lt;br /&gt;
* {{flightgear source|path=src/Main/fg_commands.hxx}}&lt;br /&gt;
* {{flightgear source|path=src/Main/fg_commands.cxx}}&lt;br /&gt;
&lt;br /&gt;
* {{simgear source|path=simgear/structure/commands.hxx}}&lt;br /&gt;
* {{simgear source|path=simgear/structure/commands.cxx}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:XML]]&lt;br /&gt;
[[Category:FlightGear keyboard]]&lt;br /&gt;
[[Category:Joysticks and Yokes]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Bindings&amp;diff=143480</id>
		<title>Bindings</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Bindings&amp;diff=143480"/>
		<updated>2026-01-11T11:41:46Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Add section &amp;quot;Using Expressions in Bindings&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Bindings''' define what happens when a user:&lt;br /&gt;
* [[Howto: Make a clickable panel|Clicks an object]] in the [[scenery]] or in an [[aircraft]].&lt;br /&gt;
* Presses a key/button on the keyboard or [[joystick]].&lt;br /&gt;
* Clicks a [[menu]] item&lt;br /&gt;
* Interacts with a dialog (clicking a button, selecting list entries etc)&lt;br /&gt;
&lt;br /&gt;
In other words, '''bindings''' are simply the term for '''actions''' that are associated with certain '''events''' in FlightGear. &lt;br /&gt;
&lt;br /&gt;
There are different types of events supported by various subsystems, but the resulting action that can be triggered will typically involve either a hard-coded command (a so called &amp;lt;code&amp;gt;fgcommand&amp;lt;/code&amp;gt;), or a block of scripted code (using [[Nasal]]). Bindings can be parameterized / customized using properties as arguments that are passed to each binding as a props.Node object.&lt;br /&gt;
And Nasal code can also be registered to become available as a dedicated &amp;lt;code&amp;gt;fgcommand&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
An object, button or key can have multiple bindings assigned to them. The bindings will be executed in the order in which they appear in the XML file. Bindings may contain [[conditions]] to make them conditionally executed. Each binding must specify a command node with its particular type, see below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|Aircraft are free to override key bindings to fullfill their needs. The Space Shuttle for instance has no mixture control, so the m-key switches from translational to rotational hand controller.&lt;br /&gt;
The key only performs as mixture control if the plane has mixture settings and if the plane didn't re-assign the key - so dependent on what plane you try, it may or may not. Usually the aircraft-specific help spells it out.&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://forum.flightgear.org/viewtopic.php?p=298436#p298436 &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re: trouble with m-key &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Thorsten &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Nov 9th, 2016 &lt;br /&gt;
  |added  =  Nov 9th, 2016 &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This article gives a small overview of frequently used bindings. Please refer to {{readme file|commands}} for additional information and refer to &amp;lt;code&amp;gt;$FG_SRC/Main/fg_commands.cxx&amp;lt;/code&amp;gt; for a complete list of available bindings.&lt;br /&gt;
&lt;br /&gt;
All given codes are examples, found on various places in the [[FlightGear]] package.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
Below are some useful commands, some also with their equivalent Nasal call.  A more complete listing can be found in the readme file, {{readme file|commands}}.&lt;br /&gt;
&lt;br /&gt;
To learn more about adding your own custom &amp;lt;code&amp;gt;fgcommands&amp;lt;/code&amp;gt; to the source code, see [[Howto:Add new fgcommands to FlightGear]].&lt;br /&gt;
&lt;br /&gt;
=== replay ===&lt;br /&gt;
Toggles replay.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;replay&amp;lt;/command&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
fgcommand(&amp;quot;replay&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== dialog-close ===&lt;br /&gt;
Closes the active dialog.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;dialog-close&amp;lt;/command&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
fgcommand(&amp;quot;dialog-close&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
To close a specific dialog use for example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
fgcommand(&amp;quot;dialog-close&amp;quot;, props.Node.new({&amp;quot;dialog-name&amp;quot;: &amp;quot;chat-full&amp;quot;}));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== dialog-show ===&lt;br /&gt;
Shows a dialog, which should be present in &amp;lt;tt&amp;gt;''[[$FG_ROOT]]/gui/dialogs''&amp;lt;/tt&amp;gt;. In addition, from FlightGear 2.8, dialog files located in &amp;lt;tt&amp;gt;''&amp;lt;aircraft directory&amp;gt;/gui/dialogs''&amp;lt;/tt&amp;gt; are also loaded. This should be used for dialogs specific to a certain aircraft.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;dialog-show&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;dialog-name&amp;gt;location-in-air&amp;lt;/dialog-name&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
fgcommand(&amp;quot;dialog-show&amp;quot;, props.Node.new({&amp;quot;dialog-name&amp;quot;: &amp;quot;location-in-air&amp;quot;}));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; dialog-name : The name of the dialog, as designated in its XML file.&lt;br /&gt;
&lt;br /&gt;
=== nasal ===&lt;br /&gt;
[[Nasal]] is frequently used for complicated systems, because it can execute virtually any function and allows running previously-defined Nasal functions.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;nasal&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;script&amp;gt;b777.afds.input(0,1);&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; script : The Nasal script to execute.&lt;br /&gt;
: {{inote|Make sure that the script does not conflict with the {{wikipedia|List of XML and HTML character entity references#Predefined entities in XML|predefined XML entities}}. If it does, you can either put it in a {{wikipedia|CDATA|CDATA section}} or use a non-interpreted version (e.g., &amp;lt;code&amp;gt;&amp;amp;amp;gt;&amp;lt;/code&amp;gt; in place of &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;).}}&lt;br /&gt;
&lt;br /&gt;
The {{func link|cmdarg()}} function is often useful in these situations to extract offset values passed to the binding. It returns the specific &amp;lt;tt&amp;gt;&amp;amp;lt;binding&amp;amp;gt;&amp;lt;/tt&amp;gt; node, which contains a &amp;lt;tt&amp;gt;&amp;amp;lt;setting&amp;amp;gt;&amp;lt;/tt&amp;gt; node at runtime if used in a joystick axis that represents the value of that axis.&lt;br /&gt;
&lt;br /&gt;
In joysticks and keyboard keys, the script is run in a specific namespace; please see [[Howto:Understand Namespaces and Methods]] for more information on namespaces.&lt;br /&gt;
&lt;br /&gt;
=== property-adjust ===&lt;br /&gt;
Increases or decreases a property's value with a given step. Maximum and minimum values are optional.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-adjust&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/autopilot/settings/heading-bug-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;step&amp;gt;1&amp;lt;/step&amp;gt;&lt;br /&gt;
  &amp;lt;min&amp;gt;0&amp;lt;/min&amp;gt;&lt;br /&gt;
  &amp;lt;max&amp;gt;360&amp;lt;/max&amp;gt;&lt;br /&gt;
  &amp;lt;wrap&amp;gt;true&amp;lt;/wrap&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; property : Property that will be changed.&lt;br /&gt;
; step     : Amount to increase or decrease the property's value. Defaults to 0.&lt;br /&gt;
; offset   : Offset from the property's current value. If '''step''' is not given, this is multiplied by '''factor'''.&lt;br /&gt;
; factor   : When '''step''' is not given, '''offset''' is multiplied by this. Defaults to 1.&lt;br /&gt;
; min      : The minimum allowed value. Defaults to &amp;quot;no minimum.&amp;quot;&lt;br /&gt;
; max      : The maximum allowed value. Defaults to &amp;quot;no maximum.&amp;quot;&lt;br /&gt;
; wrap     : If true, the value will be wrapped when it passes min or max; both min and max must be present for this to work. Defaults to false.:{{Note|When wrap is set to true, the max parameter must be set to the desired maximum value + step or factor in order to work correctly !}}&lt;br /&gt;
; mask     :This argument accepts three value: &amp;lt;code&amp;gt;integer&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;decimal&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; (default). &amp;lt;code&amp;gt;integer&amp;lt;/code&amp;gt; means that &amp;lt;code&amp;gt;step&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;offset * factor&amp;lt;/code&amp;gt; is applied to the part of the property's current value left of the decimal point first. &amp;lt;code&amp;gt;decimal&amp;lt;/code&amp;gt; does the same, but applies it to the part to the right of the decimal point. &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; simply applies it to the whole number. This is especially useful for COM / NAV radio frequency knobs - use &amp;lt;code&amp;gt;integer&amp;lt;/code&amp;gt; for the outer (big) knob and &amp;lt;code&amp;gt;decimal&amp;lt;/code&amp;gt; for the inner (small) knob.&lt;br /&gt;
&lt;br /&gt;
=== property-assign ===&lt;br /&gt;
One of the most important commands. It sets a property to a predefined value or to the value of another property.&amp;lt;ref&amp;gt;{{flightgear source&lt;br /&gt;
| path = src/Main/fg_commands.cxx&lt;br /&gt;
| line = 446&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-assign&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/autopilot/settings/target-speed-kt&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;value&amp;gt;0&amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-assign&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;autopilot/input/hdg&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;instrumentation/heading-indicator/hdg-autopilot&amp;lt;/property&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== property-cycle ===&lt;br /&gt;
Cycles between a list of values and assigns one to a property. The value-list can vary in length. If the current value is &amp;lt;code&amp;gt;value1&amp;lt;/code&amp;gt;, it will change to &amp;lt;code&amp;gt;value2&amp;lt;/code&amp;gt;; if it is &amp;lt;code&amp;gt;value2&amp;lt;/code&amp;gt;, it will change to &amp;lt;code&amp;gt;value3&amp;lt;/code&amp;gt;, and so on.  If the current value is not in the list, it will jump to the first one.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-cycle&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/autopilot/autobrake/setting&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;value type=&amp;quot;string&amp;quot;&amp;gt;ARM&amp;lt;/value&amp;gt;&lt;br /&gt;
  &amp;lt;value type=&amp;quot;string&amp;quot;&amp;gt;DISARM&amp;lt;/value&amp;gt;&lt;br /&gt;
  &amp;lt;value type=&amp;quot;string&amp;quot;&amp;gt;OFF&amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As of May 2013, the command supports additional behaviours to simplify use with the new [[Knob_/_slider_animation|knob and slider animations]]. The wrapping behaviour can be disabled by setting &amp;lt;code&amp;gt;&amp;lt;wrap&amp;gt;0&amp;lt;/wrap&amp;gt;&amp;lt;/code&amp;gt;, and the command uses the &amp;lt;code&amp;gt;offset&amp;lt;/code&amp;gt; argument to select a direction of movement. This means a &amp;lt;code&amp;gt;property-cycle&amp;lt;/code&amp;gt; bound to a multi-position knob will function as expected for movement in both directions.&lt;br /&gt;
&lt;br /&gt;
=== property-interpolate ===&lt;br /&gt;
Interpolates to a value with a given rate of change (per second).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-interpolate&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/controls/flight/aileron-trim&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;value type=&amp;quot;double&amp;quot;&amp;gt;0&amp;lt;/value&amp;gt;&lt;br /&gt;
  &amp;lt;rate&amp;gt;0.5&amp;lt;/rate&amp;gt;&amp;lt;!-- 2 seconds to 0 from 1 or -1 --&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of using &amp;lt;code&amp;gt;&amp;lt;rate&amp;gt;&amp;lt;/code&amp;gt;, one could use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;time&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;time&amp;gt;, to specify the time (in seconds) it takes to go to the new value, independent of the current value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-interpolate&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/controls/flight/aileron-trim&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;value type=&amp;quot;double&amp;quot;&amp;gt;0&amp;lt;/value&amp;gt;&lt;br /&gt;
  &amp;lt;time&amp;gt;2&amp;lt;/time&amp;gt;&amp;lt;!-- 2 seconds to 0 from 1, 0.5, -1 etc. --&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also interpolate to a value given by a property.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-interpolate&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/controls/flight/aileron-trim&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/controls/flight/default-aileron-trim&amp;lt;/property&amp;gt;&amp;lt;!-- the value to interpolate to, is 0 --&amp;gt;&lt;br /&gt;
  &amp;lt;rate&amp;gt;0.5&amp;lt;/rate&amp;gt;&amp;lt;!-- 2 seconds to 0 from 1 or -1 --&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== property-multiply ===&lt;br /&gt;
Multiply the value of a property by a given factor.&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-multiply&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/controls/flight/aileron&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;factor&amp;gt;0.5&amp;lt;/factor&amp;gt;&lt;br /&gt;
  &amp;lt;min&amp;gt;-1&amp;lt;/min&amp;gt;&lt;br /&gt;
  &amp;lt;max&amp;gt;1&amp;lt;/max&amp;gt;&lt;br /&gt;
  &amp;lt;mask&amp;gt;all&amp;lt;/mask&amp;gt;&lt;br /&gt;
  &amp;lt;wrap&amp;gt;true&amp;lt;/wrap&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''factor:''' the amount to multiply by.&lt;br /&gt;
*'''min:''' minimum value.&lt;br /&gt;
*'''max:''' maximum value.&lt;br /&gt;
*'''mask:'''&lt;br /&gt;
** '''integer:''' mutiply only left of the decimal point.&lt;br /&gt;
** '''decimal:''' multiply only the right of the decimal point.&lt;br /&gt;
** '''all:''' multiply the entire value.&lt;br /&gt;
*'''wrap:''' true if the value should be wrapped if it passes min/max. It is required to set both min and max in that case.&lt;br /&gt;
&lt;br /&gt;
=== property-randomize ===&lt;br /&gt;
Assigns a random value (between min and max) to a property.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-randomize&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/orientation/pitch-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;min&amp;gt;0&amp;lt;/min&amp;gt;&lt;br /&gt;
  &amp;lt;max&amp;gt;360&amp;lt;/max&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== property-scale ===&lt;br /&gt;
Set the value of a property based on an axis, often used in [[joystick]] configuration files.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-scale&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/controls/flight/aileron&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;offset&amp;gt;0.001&amp;lt;/offset&amp;gt;&lt;br /&gt;
  &amp;lt;factor&amp;gt;-1&amp;lt;/factor&amp;gt;&lt;br /&gt;
  &amp;lt;power&amp;gt;3&amp;lt;/power&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''setting:''' the current input setting (usually a joystick axis from -1 or 0 to 1)&lt;br /&gt;
* '''offset:''' the offset to shift by, before applying the factor.&lt;br /&gt;
* '''factor:''' the factor to multiply by (use negative to reverse).&lt;br /&gt;
* '''squared:''' if true will square the resulting value (same as power=2).&lt;br /&gt;
* '''power:''' the resulting value will be taken to the power of this integer value (overrides squared).&lt;br /&gt;
&lt;br /&gt;
Remember: &amp;lt;code&amp;gt;(property ^ power + offset) * factor = result&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== property-swap ===&lt;br /&gt;
Swaps the values of two properties, useful for radio panels.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-swap&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/instrumentation/comm/frequencies/selected-mhz&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/instrumentation/comm/frequencies/standby-mhz&amp;lt;/property&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== property-toggle ===&lt;br /&gt;
Toggles the value of a property on each click, between &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;(1&amp;lt;/code&amp;gt;) and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-toggle&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/controls/gear/gear-down&amp;lt;/property&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Or - if defined - it toggles between two custom values:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;property-toggle&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;property&amp;gt;/controls/gear/gear-down&amp;lt;/property&amp;gt;&lt;br /&gt;
  &amp;lt;value&amp;gt;2&amp;lt;/value&amp;gt;&lt;br /&gt;
  &amp;lt;value&amp;gt;3&amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===request-metar ===&lt;br /&gt;
{{cquote|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
fgcommand(&amp;quot;request-metar&amp;quot;, props.Node.new({&amp;quot;path&amp;quot;: &amp;quot;/foo/mymetar&amp;quot;, &amp;quot;station&amp;quot;: &amp;quot;LOWI&amp;quot;}));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you pass an existing path, the station ID will be updated, and if you pass the same station ID as before, no additional request is made. As usual for metar-properties, there's a time-to-live and valid flags you can check, and the metar refreshes automatically every 900 seconds. You can also write to the station ID directly to change station, update the time-to-live, and wait for the valid signal.&lt;br /&gt;
&lt;br /&gt;
There's also an unregister command ('clear-metar') to cancel the binding into the property tree.&amp;lt;ref&amp;gt;{{cite web |url=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg38372.html|title=&amp;lt;nowiki&amp;gt;[Flightgear-devel] Requesting arbitrary metar&amp;lt;/nowiki&amp;gt;|author=James Turner|date=Sun, 23 Sep 2012 08:56:48 -0700}}&amp;lt;/ref&amp;gt;|James Turner}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Expressions in Bindings ==&lt;br /&gt;
{{Caution|This feature was added to the development branch (aka 'next') in 01/2026. After some more testing, it may be backported or just become part of the next release.}}&lt;br /&gt;
Instead of using one of the commands shown above you can also add an expression to a binding to perform some math on the input raw value, before writing it into the property tree.&lt;br /&gt;
&lt;br /&gt;
Do not add a &amp;lt;command&amp;gt;, just add an &amp;lt;expression&amp;gt; and a &amp;lt;property&amp;gt; were the result should be stored. Inside the expression, an empty property path (&amp;lt;code&amp;gt;&amp;lt;property&amp;gt;&amp;lt;/property&amp;gt;&amp;lt;/code&amp;gt;) refers to the input value of the binding.&lt;br /&gt;
&lt;br /&gt;
=== Example: ===&lt;br /&gt;
We have a lever on a throttle quadrant which initially gives us a floating point number between 0 and 1. Now, if this lever shall drive the flaps, we want to map certain positions to discrete flaps settings. &lt;br /&gt;
To achieve this, we can use a table expression using nearest-match mode.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;event&amp;gt;&lt;br /&gt;
    &amp;lt;desc&amp;gt;Lever 5&amp;lt;/desc&amp;gt;&lt;br /&gt;
    &amp;lt;min-range&amp;gt;-1023&amp;lt;/min-range&amp;gt;&lt;br /&gt;
    &amp;lt;max-range&amp;gt;1023&amp;lt;/max-range&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;abs-z-translate&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;binding&amp;gt;&lt;br /&gt;
        &amp;lt;!-- result of expression goes to property --&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/input/honeycomb/bravo/flaps-boeing&amp;lt;/property&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;expression&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;!-- event input goes here --&amp;gt;&lt;br /&gt;
                &amp;lt;property&amp;gt;&amp;lt;/property&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;mode&amp;gt;nearest&amp;lt;/mode&amp;gt;&lt;br /&gt;
                &amp;lt;entry&amp;gt;&lt;br /&gt;
                    &amp;lt;ind&amp;gt;0&amp;lt;/ind&amp;gt;&lt;br /&gt;
                    &amp;lt;dep&amp;gt;30&amp;lt;/dep&amp;gt;&lt;br /&gt;
                &amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;entry&amp;gt;&lt;br /&gt;
                    &amp;lt;ind&amp;gt;0.12&amp;lt;/ind&amp;gt;&lt;br /&gt;
                    &amp;lt;dep&amp;gt;25&amp;lt;/dep&amp;gt;&lt;br /&gt;
                &amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;entry&amp;gt;&lt;br /&gt;
                    &amp;lt;ind&amp;gt;0.30&amp;lt;/ind&amp;gt;&lt;br /&gt;
                    &amp;lt;dep&amp;gt;20&amp;lt;/dep&amp;gt;&lt;br /&gt;
                &amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;entry&amp;gt;&lt;br /&gt;
                    &amp;lt;ind&amp;gt;0.48&amp;lt;/ind&amp;gt;&lt;br /&gt;
                    &amp;lt;dep&amp;gt;15&amp;lt;/dep&amp;gt;&lt;br /&gt;
                &amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;entry&amp;gt;&lt;br /&gt;
                    &amp;lt;ind&amp;gt;0.66&amp;lt;/ind&amp;gt;&lt;br /&gt;
                    &amp;lt;dep&amp;gt;5&amp;lt;/dep&amp;gt;&lt;br /&gt;
                &amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;entry&amp;gt;&lt;br /&gt;
                    &amp;lt;ind&amp;gt;0.83&amp;lt;/ind&amp;gt;&lt;br /&gt;
                    &amp;lt;dep&amp;gt;1&amp;lt;/dep&amp;gt;&lt;br /&gt;
                &amp;lt;/entry&amp;gt;&lt;br /&gt;
                &amp;lt;entry&amp;gt;&lt;br /&gt;
                    &amp;lt;ind&amp;gt;1.0&amp;lt;/ind&amp;gt;&lt;br /&gt;
                    &amp;lt;dep&amp;gt;0&amp;lt;/dep&amp;gt;&lt;br /&gt;
                &amp;lt;/entry&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/expression&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/event&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Content ==&lt;br /&gt;
=== Wiki ===&lt;br /&gt;
* [[Conditions]]&lt;br /&gt;
* [[Howto:Make a clickable panel]]&lt;br /&gt;
* [[Howto:Reassign keyboard bindings]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* {{forum link|t=37443|title=Order of multiple bindings}}&lt;br /&gt;
* {{forum link|t=37447|title=Amending to key bindings}} - Partially about indices (&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;binding n=&amp;quot;&amp;lt;index&amp;gt;&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;) for bindings.&lt;br /&gt;
&lt;br /&gt;
=== Readme file ===&lt;br /&gt;
* {{readme file|commands}}&lt;br /&gt;
&lt;br /&gt;
=== Source ===&lt;br /&gt;
Note that many commands are defined elsewhere. The readme file has a more complete listing.&lt;br /&gt;
&lt;br /&gt;
* {{flightgear source|path=src/Main/fg_commands.hxx}}&lt;br /&gt;
* {{flightgear source|path=src/Main/fg_commands.cxx}}&lt;br /&gt;
&lt;br /&gt;
* {{simgear source|path=simgear/structure/commands.hxx}}&lt;br /&gt;
* {{simgear source|path=simgear/structure/commands.cxx}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:XML]]&lt;br /&gt;
[[Category:FlightGear keyboard]]&lt;br /&gt;
[[Category:Joysticks and Yokes]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Nasal_library/string&amp;diff=143440</id>
		<title>Nasal library/string</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Nasal_library/string&amp;diff=143440"/>
		<updated>2026-01-09T15:15:03Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* string.squeeze(s,length) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
{{Nasal Navigation}}&lt;br /&gt;
== String Handling ==&lt;br /&gt;
This page contains description of functions available in &amp;quot;$FG_ROOT\data\Nasal\strings.nas&amp;quot;.&lt;br /&gt;
For string related functions in Nasal also see [[Nasal_library|Nasal library]] page.&lt;br /&gt;
UTF8 specific functions are from Nasal core library.&lt;br /&gt;
&lt;br /&gt;
== One Character Functions ==&lt;br /&gt;
=== string.isalnum() ===&lt;br /&gt;
&lt;br /&gt;
Checks whether the character is an ASCII alphanumeric character (either a letter `A–Z`/`a–z` or a digit `0–9`).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.isalnum();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.isalpha() ===&lt;br /&gt;
&lt;br /&gt;
Checks whether the character is an ASCII alphabetic letter (either uppercase `A–Z` or lowercase `a–z`).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.isalpha();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.isascii() ===&lt;br /&gt;
&lt;br /&gt;
Checks whether the character code is a valid ASCII value (in the range 0–127).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.isascii();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.isblank() ===&lt;br /&gt;
&lt;br /&gt;
Checks whether the given character code represents a blank character (a space or a horizontal tab).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.isblank();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.iscntrl() ===&lt;br /&gt;
&lt;br /&gt;
Checks whether the given character code represents an ASCII control character (in the range 1–31 or 127).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.iscntrl();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.isdigit() ===&lt;br /&gt;
&lt;br /&gt;
Checks whether the character represents a decimal digit (0–9).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.isdigit();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.isgraph() ===&lt;br /&gt;
&lt;br /&gt;
Checks whether the character is a graphical character, meaning any visible character that is either alphanumeric or punctuation, excluding whitespace.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.isgraph();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.islower() ===&lt;br /&gt;
&lt;br /&gt;
Checks whether the character is a lowercase ASCII letter (`a–z`).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.islower();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.isprint() ===&lt;br /&gt;
&lt;br /&gt;
Checks whether the character is printable, meaning it is either a visible graphical character or a space character.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.isprint();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.ispunct() ===&lt;br /&gt;
&lt;br /&gt;
Checks whether the given character code represents a punctuation character (based on standard ASCII punctuation ranges).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.ispunct();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.isspace() ===&lt;br /&gt;
&lt;br /&gt;
Checks whether the character is a whitespace character (space, tab, newline, vertical tab, form feed, or carriage return).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.isspace();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.isupper() ===&lt;br /&gt;
&lt;br /&gt;
Checks whether the character is an uppercase ASCII letter (A–Z).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.isupper();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.isxdigit() ===&lt;br /&gt;
&lt;br /&gt;
Checks whether the character represents a valid hexadecimal digit (0–9, a–f, or A–F).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.isxdigit();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.isxspace() ===&lt;br /&gt;
&lt;br /&gt;
Checks whether the character is an extended whitespace character — includes all standard whitespace characters (space, tab, vertical tab, form feed, carriage return) plus the newline character, making it an extended version of isspace().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.isxspace();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.toupper() ===&lt;br /&gt;
&lt;br /&gt;
Converts a lowercase ASCII letter to its corresponding uppercase letter; if the character is not lowercase, it is returned unchanged.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.toupper();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.tolower() ===&lt;br /&gt;
&lt;br /&gt;
Converts an uppercase ASCII letter to its corresponding lowercase letter; if the character is not uppercase, it is returned unchanged.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.tolower();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== String Functions ==&lt;br /&gt;
=== string.icmp(a,b) ===&lt;br /&gt;
Case insensitive string compare function.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.icmp(a,b);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.imatch(a,b) ===&lt;br /&gt;
Case insensitive match function.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.imatch(a,b);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
*string.imatch(&amp;quot;alpha&amp;quot;,&amp;quot;beta&amp;quot;) -&amp;gt; 0&lt;br /&gt;
*string.imatch(&amp;quot;alpha&amp;quot;,&amp;quot;alpha&amp;quot;) -&amp;gt; 1&lt;br /&gt;
*string.imatch(&amp;quot;&amp;quot;,&amp;quot;alpha&amp;quot;) -&amp;gt; 0&lt;br /&gt;
*string.imatch(&amp;quot;&amp;quot;,&amp;quot;&amp;quot;) -&amp;gt; 1&lt;br /&gt;
&lt;br /&gt;
=== string.join(sep,list) ===&lt;br /&gt;
Join all elements of a list inserting a separator between every two of them. See [[Nasal_library#split()|split()]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.join(sep,list);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.lc(str) ===&lt;br /&gt;
Return string converted to lower case letters.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.lc(str);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.match(str, patt) ===&lt;br /&gt;
Check if string &amp;lt;str&amp;gt; matches shell style pattern &amp;lt;patt&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
# Rules:&lt;br /&gt;
# ?   stands for any single character&lt;br /&gt;
# *   stands for any number (including zero) of arbitrary characters&lt;br /&gt;
# \   escapes the next character and makes it stand for itself; that is:&lt;br /&gt;
#     \? stands for a question mark (not the &amp;quot;any single character&amp;quot; placeholder)&lt;br /&gt;
# []  stands for a group of characters:&lt;br /&gt;
#     [abc]      stands for letters a, b or c&lt;br /&gt;
#     [^abc]     stands for any character but a, b, and c  (^ as first character -&amp;gt; inversion)&lt;br /&gt;
#     [1-4]      stands for digits 1 to 4 (1, 2, 3, 4)&lt;br /&gt;
#     [1-4-]     stands for digits 1 to 4, and the minus&lt;br /&gt;
#     [-1-4]     same as above&lt;br /&gt;
#     [1-3-6]    stands for digits 1 to 3, minus, and 6&lt;br /&gt;
#     [1-3-6-9]  stands for digits 1 to 3, minus, and 6 to 9&lt;br /&gt;
#     [][]       stands for the closing and the opening bracket (']' must be first!)&lt;br /&gt;
#     [^^]       stands for all characters but the caret symbol&lt;br /&gt;
#     [\/]       stands for a backslash or a slash  (the backslash isn't an&lt;br /&gt;
#                escape character in a [] character group)&lt;br /&gt;
#&lt;br /&gt;
#     Note that a minus can't be a range delimiter, as in [a--e],&lt;br /&gt;
#     which would be interpreted as any of a, e, or minus.&lt;br /&gt;
#&lt;br /&gt;
# Example:&lt;br /&gt;
&lt;br /&gt;
string.match(name, &amp;quot;*[0-9].xml&amp;quot;); ... true if 'name' ends with digit followed by &amp;quot;.xml&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== string.normpath(path) ===&lt;br /&gt;
Removes superfluous slashes, empty and &amp;quot;.&amp;quot; elements,&lt;br /&gt;
expands all &amp;quot;..&amp;quot; elements keeping relative paths,&lt;br /&gt;
and turns all backslashes into slashes.&lt;br /&gt;
The result will start with a slash if it started with a slash or backslash, it will end without slash.                                                 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.normpath(path);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
See also [[Nasal_library#resolvepath|resolvepath()]] function, which can be used to test if a file exists.&lt;br /&gt;
&lt;br /&gt;
=== string.replace(str,old,new) ===&lt;br /&gt;
Replace all occurrences of 'old' by 'new'.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.replace(str,old,new);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== string.scanf(test,format,result) ===&lt;br /&gt;
Simple scanf function. Takes an input string, a pattern, and a vector. &lt;br /&gt;
It returns 0 if the format didn't match, and appends all found elements to the given vector. &lt;br /&gt;
&lt;br /&gt;
Return values:                                                                                &lt;br /&gt;
 -1 string matched format ending with % (i.e. more chars than format cared about)&lt;br /&gt;
  0 string didn't match format                                                   &lt;br /&gt;
  1 string matched, but would still match if the right chars were added          &lt;br /&gt;
  2 string matched, and would not if any character would be added                &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var r = string.scanf(&amp;quot;comm3freq123.456&amp;quot;, &amp;quot;comm%ufreq%f&amp;quot;, var result = []);    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The result vector will be set to [3, 123.456].&lt;br /&gt;
&lt;br /&gt;
=== string.squeeze(s,length) ===&lt;br /&gt;
Shorten string s to length by replacing characters in the middle by '...'. Works for length &amp;gt;= 7  &lt;br /&gt;
&lt;br /&gt;
(since 2020.4 / next as of 03.08.2024)  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
var r = string.squeeze(&amp;quot;ABCDEFGH&amp;quot;, 7);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
r now contains the string &amp;quot;AB...GH&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== string.trim(str,lr[,func]) === &lt;br /&gt;
Trim spaces at the left (lr &amp;lt; 0), at the right (lr &amp;gt; 0), or both (lr = 0) is default.&lt;br /&gt;
An optional function argument defines which characters should be trimmed:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.trim(a);                                    # trim spaces             &lt;br /&gt;
string.trim(a, 1, string.isdigit);                 # trim digits at the right&lt;br /&gt;
string.trim(a, 0, func(c) c == `\\` or c == `/`);  # trim slashes/backslashes&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== string.uc(str) ===&lt;br /&gt;
Return string converted to upper case letters.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.uc(str);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== string.compileTemplate(template,type=nil) ===&lt;br /&gt;
Get a function out of a string template for fast insertion of template parameters. &lt;br /&gt;
This allows to use the same templates as with most available tile mapping engines (eg. Leaflet, Polymaps). &lt;br /&gt;
Return a callable function object on success, and nil if parsing the templated fails.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
string.compileTemplate(template);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Example (Build MapQuest tile url):                                &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
 var makeUrl = string.compileTemplate(                          &lt;br /&gt;
   &amp;quot;http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg&amp;quot;    &lt;br /&gt;
 );                                                             &lt;br /&gt;
 print( makeUrl({x: 5, y: 4, z: 3}) );                          &lt;br /&gt;
&lt;br /&gt;
Output:   http://otile1.mqcdn.com/tiles/1.0.0/map/3/5/4.jpg&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UTF8 String Functions (Core) ==&lt;br /&gt;
=== utf8.chstr(unicode) ===&lt;br /&gt;
Returns a string containing the UTF8 representation of the specified unicode character value. &lt;br /&gt;
=== utf8.strc(string, index) ===&lt;br /&gt;
Returns the unicode character at the specified index within the UTF8 string. Dies on encoding error or overrun. &lt;br /&gt;
=== utf8.substr(string, start, len=nil) ===&lt;br /&gt;
As for regular substr(), but the indices are of UTF8 characters intead of bytes. Dies on encoding error or overflow. &lt;br /&gt;
=== utf8.size(string) ===&lt;br /&gt;
As for regular size() when called on a string, but returns the number of UTF8 unicode characters instead of bytes. Dies on encoding error. &lt;br /&gt;
=== utf8.validate(string, replace=`?`) ===&lt;br /&gt;
Checks the string for UTF8 validity. At every byte position where an encoding error is found, it replaces that byte with the specified replacement character (default is `?`). Note that the second argument is a number, not a string.&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Expressions&amp;diff=143275</id>
		<title>Expressions</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Expressions&amp;diff=143275"/>
		<updated>2025-12-16T19:36:12Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Add remark to Table&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
{{-}}&lt;br /&gt;
'''Expressions''' (or '''SGExpressions''') are a feature of the SimGear library and provide a nice way of implementing complex math formulas using XML syntax.&lt;br /&gt;
They are supported in many systems within the FlightGear code.&lt;br /&gt;
&lt;br /&gt;
{{caution|Expressions do not check if your math creates floating point exceptions (like division by zero conditions, taking the square root of a negative number, etc.). This can cause undefined behavior and may result in NaNs or even Cascading NaNs.}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Expressions are supported in&lt;br /&gt;
* [[Autopilot Configuration Reference#Expressions|Autopilot configuration files]]&lt;br /&gt;
* Particle system configuration files&lt;br /&gt;
* Animations (translate, rotate, scale, range, blend)&lt;br /&gt;
* The shader technique&lt;br /&gt;
* [[Conditions]]&lt;br /&gt;
&lt;br /&gt;
== Sample Expressions ==&lt;br /&gt;
This is a sample expression for &amp;lt;code&amp;gt;c = sqrt(a*a + b^2)&amp;lt;/code&amp;gt;. Children/arguments are parsed in the order they appear in in the file (or the order in which they are set via property methods).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;expression&amp;gt;&lt;br /&gt;
  &amp;lt;sqrt&amp;gt;&lt;br /&gt;
    &amp;lt;sum&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/value/a&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/value/a&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/value/b&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;value&amp;gt;2&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/pow&amp;gt;&lt;br /&gt;
    &amp;lt;/sum&amp;gt;&lt;br /&gt;
  &amp;lt;/sqrt&amp;gt;&lt;br /&gt;
&amp;lt;/expression&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supported elements ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;abs&amp;gt; &amp;lt;!-- also: fabs --&amp;gt;&lt;br /&gt;
&amp;lt;acos&amp;gt;&lt;br /&gt;
&amp;lt;asin&amp;gt;&lt;br /&gt;
&amp;lt;atan&amp;gt;&lt;br /&gt;
&amp;lt;atan2&amp;gt;&lt;br /&gt;
&amp;lt;ceil&amp;gt;&lt;br /&gt;
&amp;lt;clip&amp;gt; &amp;lt;!-- &amp;lt;clipMin&amp;gt; &amp;lt;clipMax&amp;gt; --&amp;gt;&lt;br /&gt;
&amp;lt;cos&amp;gt;&lt;br /&gt;
&amp;lt;cosh&amp;gt;&lt;br /&gt;
&amp;lt;difference&amp;gt; &amp;lt;!-- also: dif --&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;exp&amp;gt;&lt;br /&gt;
&amp;lt;floor&amp;gt;&lt;br /&gt;
&amp;lt;log&amp;gt;&lt;br /&gt;
&amp;lt;log10&amp;gt;&lt;br /&gt;
&amp;lt;max&amp;gt;&lt;br /&gt;
&amp;lt;min&amp;gt;&lt;br /&gt;
&amp;lt;mod&amp;gt;&lt;br /&gt;
&amp;lt;pow&amp;gt;&lt;br /&gt;
&amp;lt;product&amp;gt; &amp;lt;!-- also: prod --&amp;gt;&lt;br /&gt;
&amp;lt;property&amp;gt; &amp;lt;!-- Unlike elsewhere, 'prop' does not work in expressions. --&amp;gt;&lt;br /&gt;
&amp;lt;rad2deg&amp;gt;&lt;br /&gt;
&amp;lt;deg2rad&amp;gt;&lt;br /&gt;
&amp;lt;sin&amp;gt;&lt;br /&gt;
&amp;lt;sinh&amp;gt;&lt;br /&gt;
&amp;lt;sqr&amp;gt;&lt;br /&gt;
&amp;lt;sqrt&amp;gt;&lt;br /&gt;
&amp;lt;sum&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt; &amp;lt;!-- &amp;lt;entry&amp;gt;&amp;lt;ind&amp;gt; value &amp;lt;/ind&amp;gt;&amp;lt;dep&amp;gt; value &amp;lt;/dep&amp;gt;&amp;lt;/entry&amp;gt; --&amp;gt;&lt;br /&gt;
&amp;lt;tan&amp;gt;&lt;br /&gt;
&amp;lt;tanh&amp;gt;&lt;br /&gt;
&amp;lt;value&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Table ===&lt;br /&gt;
The table expression uses the following syntax, similarly to the &amp;lt;interpolation&amp;gt; element:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
	&amp;lt;!-- put an input element here, this can be &amp;lt;property&amp;gt; or any other operation --&amp;gt;&lt;br /&gt;
	&amp;lt;entry&amp;gt;&lt;br /&gt;
		&amp;lt;ind&amp;gt;0.0&amp;lt;/ind&amp;gt; &amp;lt;!-- the value of the input (independent value) --&amp;gt;&lt;br /&gt;
		&amp;lt;dep&amp;gt;0.0&amp;lt;/dep&amp;gt; &amp;lt;!-- the value of the output (dependent value) --&amp;gt;&lt;br /&gt;
	&amp;lt;/entry&amp;gt;&lt;br /&gt;
        ... &amp;lt;!-- you can put as many entries as you want --&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The entries must be sorted by the independent (input) variable strictly ascending. If input is outside the range of the table, output will be determined from the first / last table row.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
The table:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|0.0&lt;br /&gt;
|5.0&lt;br /&gt;
|-&lt;br /&gt;
|0.5&lt;br /&gt;
|7.5&lt;br /&gt;
|-&lt;br /&gt;
|0.9&lt;br /&gt;
| -5.0&lt;br /&gt;
|-&lt;br /&gt;
|1.0&lt;br /&gt;
|25.0&lt;br /&gt;
|}&lt;br /&gt;
translates to the following code:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
	&amp;lt;!-- put an input element here, this can be a &amp;lt;property&amp;gt; or any other operation --&amp;gt;&lt;br /&gt;
	&amp;lt;entry&amp;gt;&lt;br /&gt;
		&amp;lt;ind&amp;gt;0.0&amp;lt;/ind&amp;gt;&lt;br /&gt;
		&amp;lt;dep&amp;gt;5.0&amp;lt;/dep&amp;gt;&lt;br /&gt;
	&amp;lt;/entry&amp;gt;&lt;br /&gt;
	&amp;lt;entry&amp;gt;&lt;br /&gt;
		&amp;lt;ind&amp;gt;0.5&amp;lt;/ind&amp;gt;&lt;br /&gt;
		&amp;lt;dep&amp;gt;7.5&amp;lt;/dep&amp;gt;&lt;br /&gt;
	&amp;lt;/entry&amp;gt;&lt;br /&gt;
	&amp;lt;entry&amp;gt;&lt;br /&gt;
		&amp;lt;ind&amp;gt;0.9&amp;lt;/ind&amp;gt;&lt;br /&gt;
		&amp;lt;dep&amp;gt;-5.0&amp;lt;/dep&amp;gt;&lt;br /&gt;
	&amp;lt;/entry&amp;gt;&lt;br /&gt;
	&amp;lt;entry&amp;gt;&lt;br /&gt;
		&amp;lt;ind&amp;gt;1.0&amp;lt;/ind&amp;gt;&lt;br /&gt;
		&amp;lt;dep&amp;gt;25.0&amp;lt;/dep&amp;gt;&lt;br /&gt;
	&amp;lt;/entry&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Clip===&lt;br /&gt;
An expression to limit e.g. rotation:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;expression&amp;gt;&lt;br /&gt;
    &amp;lt;clip&amp;gt;&lt;br /&gt;
      &amp;lt;clipMin&amp;gt;-45&amp;lt;/clipMin&amp;gt;&lt;br /&gt;
      &amp;lt;clipMax&amp;gt;45&amp;lt;/clipMax&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;orientation/pitch-deg&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/clip&amp;gt;&lt;br /&gt;
  &amp;lt;/expression&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hints and tips ==&lt;br /&gt;
=== Rounding ===&lt;br /&gt;
While there is no element for rounding, this workaround can be used for that:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;expression&amp;gt;&lt;br /&gt;
  &amp;lt;floor&amp;gt;&lt;br /&gt;
    &amp;lt;sum&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;your/property/here&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;value&amp;gt;0.5&amp;lt;/value&amp;gt;&lt;br /&gt;
    &amp;lt;/sum&amp;gt;&lt;br /&gt;
  &amp;lt;/floor&amp;gt;&lt;br /&gt;
&amp;lt;/expression&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Conditions]]&lt;br /&gt;
* [[PropertyList XML files]]&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
* {{simgear file|simgear/structure/SGExpression.hxx}}&lt;br /&gt;
* {{simgear file|simgear/structure/SGExpression.cxx}}&lt;br /&gt;
&lt;br /&gt;
[[Category:XML]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Actions&amp;diff=143156</id>
		<title>Actions</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Actions&amp;diff=143156"/>
		<updated>2025-12-03T21:57:11Z</updated>

		<summary type="html">&lt;p&gt;Jsb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page drafts a new feature not implemented at the time of writing (12-2025). It shall aid the planing and development of the feature.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
FlightGear is a very flexible and modular system. Often there is more than one way to control a certain aspects of the simulator or the simulated aircraft. &lt;br /&gt;
&lt;br /&gt;
One important element are '''[[bindings]]''' which are used in several places to link some ''event'' (key pressed, joystick button, click to 3D cockpit element, ...) to a ''[[Commands|command]]'' (e.g. pause the simulation, retract landing gear, ...).&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
Actions are essentially a named binding, with some extra information + state:&lt;br /&gt;
&lt;br /&gt;
# can be enabled / disabled&lt;br /&gt;
# have a unique identifier, e.g. 'toggle COM1 frequency'&lt;br /&gt;
# Can be modified, optionally (so aircraft can redefine what a standard action such 'toggle active COM frequency' does in their cockpit)&lt;br /&gt;
# can have UI prompts (description / tooltip text)&lt;br /&gt;
&lt;br /&gt;
This feature is targeted for &amp;lt;code&amp;gt;next&amp;lt;/code&amp;gt;, but could potentially be back-ported, since it needs to be done backwards compatibly anyway.&lt;br /&gt;
&lt;br /&gt;
https://gitlab.com/groups/flightgear/-/epics/18&lt;br /&gt;
&lt;br /&gt;
=== Use cases ===&lt;br /&gt;
&lt;br /&gt;
* Places, where &amp;lt;binding&amp;gt; is already in use like&lt;br /&gt;
** Mapping of input events from hardware devices like keyboard, mouse, joystick, yoke, rudder pedals, throttle quadrant, MCDU, custom made cockpit hardware ...&lt;br /&gt;
** 3D cockpit elements (&amp;quot;pick animation&amp;quot;)&lt;br /&gt;
* Multi-player events&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Actions&amp;diff=143155</id>
		<title>Actions</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Actions&amp;diff=143155"/>
		<updated>2025-12-03T21:55:45Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Initial stub&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page drafts a new feature not implemented at the time of writing (12-2025). It shall aid the planing and development of the feature.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
FlightGear is a very flexible and modular system. Often there is more than one way to control a certain aspects of the simulator or the simulated aircraft. &lt;br /&gt;
&lt;br /&gt;
One important element are '''[[bindings]]''' which are used in several places to link some ''event'' (key pressed, joystick button, click to 3D cockpit element, ...) to a ''[[Commands|command]]'' (e.g. pause the simulation, retract landing gear, ...).&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
Actions are essentially a named binding, with some extra information + state:&lt;br /&gt;
&lt;br /&gt;
# can be enabled / disabled&lt;br /&gt;
# have a unique identifier, e.g. 'toggle COM1 frequency'&lt;br /&gt;
# Can be modified, optionally (so aircraft can redefine what a standard action such 'toggle active COM frequency' does in their cockpit)&lt;br /&gt;
# can have UI prompts (description / tooltip text)&lt;br /&gt;
&lt;br /&gt;
This feature is targeted for &amp;lt;code&amp;gt;next&amp;lt;/code&amp;gt;, but could potentially be back-ported, since it needs to be done backwards compatibly anyway.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;Actions are essentially a named binding, with some extra information + state:&lt;br /&gt;
&lt;br /&gt;
can be enabled / disabled&lt;br /&gt;
&lt;br /&gt;
have a unique identifier, e.g. 'toggle COM1 frequency'&lt;br /&gt;
&lt;br /&gt;
Can be modified, optionally (so aircraft can redefine what a standard action such 'toggle active COM frequency' does in their cockpit)&lt;br /&gt;
&lt;br /&gt;
can have UI prompts (description / tooltip text)&lt;br /&gt;
&lt;br /&gt;
This feature is targeted for &amp;lt;code&amp;gt;next&amp;lt;/code&amp;gt;, but could potentially be back-ported, since it needs to be done backwards compatibly anyway.&lt;br /&gt;
&lt;br /&gt;
https://gitlab.com/groups/flightgear/-/epics/18&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Use cases ===&lt;br /&gt;
&lt;br /&gt;
* Places, where &amp;lt;binding&amp;gt; is already in use like&lt;br /&gt;
** Mapping of input events from hardware devices like keyboard, mouse, joystick, yoke, rudder pedals, throttle quadrant, MCDU, custom made cockpit hardware ...&lt;br /&gt;
** 3D cockpit elements (&amp;quot;pick animation&amp;quot;)&lt;br /&gt;
* Multi-player events&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Nasal_library/props&amp;diff=142854</id>
		<title>Nasal library/props</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Nasal_library/props&amp;diff=142854"/>
		<updated>2025-11-01T19:26:25Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* alias() */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Nasal Navigation|nocat=1}}&lt;br /&gt;
This page contains documentation for the '''&amp;lt;code&amp;gt;props&amp;lt;/code&amp;gt; namespace''' in [[Nasal]]. This namespace provides APIs for working with property trees (including the main [[Property Tree]]) via {{API Link|simgear|class|SGPropertyNode}}. The &amp;lt;code&amp;gt;props&amp;lt;/code&amp;gt; namespace is sourced from {{fgdata file|Nasal/props.nas}} and {{flightgear file|src/Scripting/nasal-props.cxx}}.&lt;br /&gt;
&lt;br /&gt;
== Class ==&lt;br /&gt;
=== Node ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|mode = class&lt;br /&gt;
|text = The main class, used widely for manipulating property trees.&lt;br /&gt;
}}&lt;br /&gt;
==== new() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.new([values]);&lt;br /&gt;
|text = Constructor function. Returns a new &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = values&lt;br /&gt;
|param1text = An optional hash that will be the initial property structure.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
props.dump(node);&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    a: 1,&lt;br /&gt;
    b: [&amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;],&lt;br /&gt;
    c: {&lt;br /&gt;
        d: 1 * 4&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== addChild() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.addChild(name[, min_idx[, append]]);&lt;br /&gt;
|version = 2.10&lt;br /&gt;
|commit = {{fgdata commit|a15d58|t=commit}}&lt;br /&gt;
|text = Add a new, blank child to the node. Returns the newly-created node.&lt;br /&gt;
|param1 = name&lt;br /&gt;
|param1text = The name of the node as a string.&lt;br /&gt;
|param2 = min_idx&lt;br /&gt;
|param2text = This specifies the minimum index to add the new one to. This takes precedence over '''append'''. Defaults to 0.&lt;br /&gt;
|param3 = append&lt;br /&gt;
|param3text = If there is already one or more children with the same name and this argument is 1 (true), the new child will be added after the child with the highest index. If 0 (false), the new child will be added at the lowest available index with the limit of '''min_idx'''. Defaults to 1 (true).&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 1);&lt;br /&gt;
props.dump(node); # a[1]&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 1);&lt;br /&gt;
props.dump(node); # a[1]&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 0, 0);&lt;br /&gt;
props.dump(node); # a[1] and a[0]&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 1);&lt;br /&gt;
props.dump(node); # a[1]&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 0, 1);&lt;br /&gt;
props.dump(node); # a[1] and a[2]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== addChildren() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.addChildren(name, count[, min_idx[, append]]);&lt;br /&gt;
|version = 2.10&lt;br /&gt;
|commit = {{fgdata commit|7f1117|t=commit}}&lt;br /&gt;
|text = Adds multiple children with the same name to this node. Returns &amp;lt;code&amp;gt;'''nil&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param1 = name&lt;br /&gt;
|param1text = The name of the nodes as a string.&lt;br /&gt;
|param2 = count&lt;br /&gt;
|param2text = Number of new children to add.&lt;br /&gt;
|param3 = min_idx&lt;br /&gt;
|param3text = Performs the same function as in &amp;lt;code&amp;gt;[[#addChild.28.29|Node.addChild()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param4 = append&lt;br /&gt;
|param4text = Performs the same function as in &amp;lt;code&amp;gt;[[#addChild.28.29|Node.addChild()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2);&lt;br /&gt;
props.dump(node); # a[0] and a[1]&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2, 1);&lt;br /&gt;
props.dump(node); # a[1] and a[2]&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 2);&lt;br /&gt;
props.dump(node); # a[2]&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2, 0, 0);&lt;br /&gt;
props.dump(node); # a[2], a[0], and a[1]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== adjustValue() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.adjustValue(delta);&lt;br /&gt;
|text = Adds delta (numeric) to current value respecting the node type. &lt;br /&gt;
|param1 = delta&lt;br /&gt;
|param1text = Numeric value (can be negative) to add to current node value.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== alias() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.alias(node, chainListener=0);&lt;br /&gt;
|text = Aliases this node to another one. Returns 1 on success and 0 on failure.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = The node to alias to. Can be one of:&lt;br /&gt;
* A path to a property in the [[Property Tree]] as a string.&lt;br /&gt;
* A &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost.&lt;br /&gt;
* A &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.alias(&amp;quot;/position/altitude-ft&amp;quot;);&lt;br /&gt;
props.dump(node); # equals the current altitude&lt;br /&gt;
|example2 = var node1 = props.Node.new();&lt;br /&gt;
node1.setDoubleValue(2.34);&lt;br /&gt;
var node2 = props.Node.new();&lt;br /&gt;
node2.alias(node1);&lt;br /&gt;
props.dump(node2); # equals 2.34&lt;br /&gt;
|param2=chainListener|param2text=Specify if listeners should work on aliased properties or not. Current default is false forbackwards compatability.}}&lt;br /&gt;
&lt;br /&gt;
==== clearValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.clearValue();&lt;br /&gt;
|text = Clears the value and type of the node.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(2.34);&lt;br /&gt;
props.dump(node); # prints &amp;quot;{DOUBLE} = 2.35&amp;quot;&lt;br /&gt;
node.clearValue();&lt;br /&gt;
props.dump(node); # prints &amp;quot;{NONE} = nil&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== decrement() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.decrement(n = 1);&lt;br /&gt;
|text = Decrements integer property by n (default: n = 1)&lt;br /&gt;
|param1 = n&lt;br /&gt;
|param1text = Value to subtract, will be converted to int, defaults to 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== equals() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.equals(node);&lt;br /&gt;
|version = 2.12&lt;br /&gt;
|commit = {{fgdata commit|d80722|t=commit}}&lt;br /&gt;
|text = Checks whether the node refers to the same one as another. Returns 1 (true) if it is, and 0 (false) if otherwise.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = Node to check against. May be either a &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost or a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object.&lt;br /&gt;
|example1 = var n = props.Node.new();&lt;br /&gt;
var a = n;&lt;br /&gt;
print(a.equals(n)); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getAliasTarget() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getAliasTarget();&lt;br /&gt;
|text = Returns the alias target of a node as another &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|example1 = setprop(&amp;quot;/test&amp;quot;, 2.35);&lt;br /&gt;
var node = props.Node.new();&lt;br /&gt;
node.alias(&amp;quot;/test&amp;quot;);&lt;br /&gt;
var tgt = node.getAliasTarget();&lt;br /&gt;
print(tgt.getPath()); # prints &amp;quot;/test&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getAttribute() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getAttribute([rel_path, ]name);&lt;br /&gt;
props.Node.getAttribute();&lt;br /&gt;
|text = Returns an attribute. If no arguments are given, the function will return an integer specifying the attributes set for the node (see {{simgear file|simgear/props/props.hxx|l=767}} for a list). A list of attributes are below&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! String !! Return value&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} last {{!!}} The highest used attribute code (should be 128). See for {{simgear file|simgear/props/props.hxx|l=767}} the codes.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} children {{!!}} Number of child nodes.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} listeners {{!!}} Number of listeners connected to this node.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} references {{!!}} Number of times the node has previously been referenced.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} tied {{!!}} Whether the node is tied.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} alias {{!!}} Whether the node is aliased.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} readable {{!!}} Whether the node can be read.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} writable {{!!}} Whether the node can be written to.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} archive {{!!}} Whether the node will be saved when the &amp;quot;save&amp;quot; [[fgcommands|fgcommand]] is triggered.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} trace-read {{!!}} Whether the reading of the node will be logged when &amp;lt;code&amp;gt;--log-level=info&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} trace-write {{!!}} Whether the writing to the node will be logged when &amp;lt;code&amp;gt;--log-level=info&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} userarchive {{!!}} Whether the node will be saved to the [[FlightGear configuration via XML#autosave.xml|autosave file]] (only works for actual properties).&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} preserve {{!!}} Whether the value of node will be preserved during resets (only works for actual properties).&lt;br /&gt;
{{!}}}&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = name&lt;br /&gt;
|param2text = Attribute as a string. See the above table for a full list.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
var child = node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
print(node.getAttribute(&amp;quot;children&amp;quot;)); # prints &amp;quot;1&amp;quot;&lt;br /&gt;
|example2text = Example using relative path&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
var child = node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
print(node.getAttribute(&amp;quot;a&amp;quot;, &amp;quot;readable&amp;quot;)); # prints &amp;quot;1&amp;quot; (node can be read from)&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
var node2 = props.Node.new();&lt;br /&gt;
node2.alias(node);&lt;br /&gt;
print(node2.getAttribute(&amp;quot;alias&amp;quot;)); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
|example4 = print(props.globals.getNode(&amp;quot;/sim/signals/fdm-initialized&amp;quot;).getAttribute(&amp;quot;listeners&amp;quot;)); # prints the number of listeners&lt;br /&gt;
|example5 = print(props.globals.getNode(&amp;quot;/sim/time/elapsed-sec&amp;quot;).getAttribute(&amp;quot;tied&amp;quot;)); # prints &amp;quot;1&amp;quot; (true), meaning it is tied&lt;br /&gt;
|example6 = var node = props.Node.new();&lt;br /&gt;
print(node.getAttribute(&amp;quot;writable&amp;quot;)); # prints &amp;quot;1&amp;quot; (true), meaning the node can be written to&lt;br /&gt;
|example7text = Example using no arguments&lt;br /&gt;
|example7 = var node = props.Node.new();&lt;br /&gt;
print(node.getAttribute()); # prints &amp;quot;3&amp;quot; (true), meaning the node can be read from (1) and written to (2)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getBoolValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getBoolValue();&lt;br /&gt;
|text = Returns the value of a node converted to a boolean. If the node is a number type, 0  will return false, while 1 will return true. If the node is a string or unspecified type and the value is &amp;lt;code&amp;gt;&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt;, false will be returned. Otherwise, true will be returned. Remember that boolean values are represented in Nasal as 1 (true) and 0 (false).&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(1);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setBoolValue(0);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;false&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(1.23);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setDoubleValue(-1.23);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setDoubleValue(0.0);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;false&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setIntValue(2);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setIntValue(-2);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setIntValue(0);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;false&amp;quot;&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setValue(&amp;quot;Hello, World!&amp;quot;);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setValue(&amp;quot;false&amp;quot;);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;false&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getChild() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getChild(rel_path[, idx[, create]]);&lt;br /&gt;
|text = Returns a child of a node as another &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Relative path to the child node as a string.&lt;br /&gt;
|param2 = idx&lt;br /&gt;
|param2text = Optional index for the child node as an integer.&lt;br /&gt;
|param3 = create&lt;br /&gt;
|param3text = If set to 1 (true), a new child will be created if it does not exist. If set to 0 (false), the function will not create a new child and the function will return &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; if no child exists. Defaults to 0.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
var c = node.getChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 3);&lt;br /&gt;
node.getNode(&amp;quot;a[1]&amp;quot;).setDoubleValue(2.35);&lt;br /&gt;
var c = node.getChild(&amp;quot;a&amp;quot;, 1);&lt;br /&gt;
print(c.getValue()); # prints &amp;quot;2.35&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
var c = node.getChild(&amp;quot;a&amp;quot;, 1, 1);&lt;br /&gt;
props.dump(node); # new child a[1] will have appeared&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getChildren() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getChildren([name]);&lt;br /&gt;
|text = Returns a vector of child nodes, optionally those with a certain name, as &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; instances.&lt;br /&gt;
|param1 = name&lt;br /&gt;
|param1text = Optional name of the child nodes as a string. If not given, all children will be returned.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 3);&lt;br /&gt;
node.addChildren(&amp;quot;b&amp;quot;, 3);&lt;br /&gt;
debug.dump(node.getChildren()); # all child nodes in the vector&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 3);&lt;br /&gt;
node.addChildren(&amp;quot;b&amp;quot;, 3);&lt;br /&gt;
debug.dump(node.getChildren(&amp;quot;b&amp;quot;)); # only children with the name &amp;quot;b&amp;quot; in the vector&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getIndex() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getIndex();&lt;br /&gt;
|text = Returns the index of a node as an integer.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 3);&lt;br /&gt;
print(node.getChild(&amp;quot;a&amp;quot;, 1).getIndex()); # prints &amp;quot;1&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;b&amp;quot;);&lt;br /&gt;
print(node.getChild(&amp;quot;b&amp;quot;).getIndex()); # prints &amp;quot;0&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getName() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getName();&lt;br /&gt;
|text = Returns the name of the node as a string.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
var c = node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
debug.dump(c.getName()); # prints &amp;quot;a&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 3);&lt;br /&gt;
debug.dump(node.getChild(&amp;quot;a&amp;quot;, 2).getName()); # prints &amp;quot;a&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getNode() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getNode(rel_path[, create]);&lt;br /&gt;
|text = Returns a subnode as another &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Relative path to the subnode as a string.&lt;br /&gt;
|param2 = create&lt;br /&gt;
|param2text = If 1 (true), the node will be created if it does not exist. If 0 (false) and the node does not exist, the function will return &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt;. Default to 0 (false).&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: &amp;quot;Hello, World!&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
print(node.getNode(&amp;quot;c/d&amp;quot;).getValue()); # prints &amp;quot;Hello, World!&amp;quot;&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {}&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
node.getNode(&amp;quot;c/d&amp;quot;, 1).setDoubleValue(2.35);&lt;br /&gt;
props.dump(node); # c/d now exists&lt;br /&gt;
|example3 = var ac = props.globals.getNode(&amp;quot;sim/aircraft&amp;quot;);&lt;br /&gt;
print(&amp;quot;Current aircraft is: &amp;quot;, ac.getValue());&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getParent() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getParent();&lt;br /&gt;
|text = Returns the parent of a node, or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; if there is no parent.&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: &amp;quot;Hello, World!&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
props.dump(node.getNode(&amp;quot;c/d&amp;quot;).getParent()); # dumps &amp;quot;c&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
debug.dump(node.getParent()); # prints nil&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getPath() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getPath();&lt;br /&gt;
|text = Returns the path of the node as a string.&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: &amp;quot;Hello, World!&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
print(node.getNode(&amp;quot;c/d&amp;quot;).getPath()); # prints &amp;quot;/c/d&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getType() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getType();&lt;br /&gt;
|text = Returns node's type as a string. It should be one of &amp;quot;NONE&amp;quot;, &amp;quot;ALIAS&amp;quot;, &amp;quot;BOOL&amp;quot;, &amp;quot;INT&amp;quot;, &amp;quot;LONG&amp;quot; (long integer), &amp;quot;FLOAT&amp;quot;, &amp;quot;DOUBLE&amp;quot;, &amp;quot;STRING&amp;quot;, &amp;quot;VEC3D&amp;quot;, &amp;quot;VEC4D&amp;quot;, &amp;quot;UNSPECIFIED&amp;quot;.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
print(node.getType()); # prints &amp;quot;NONE&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setIntValue(12);&lt;br /&gt;
print(node.getType()); # prints &amp;quot;INT&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setValue([0.4, 0.2, 1]);&lt;br /&gt;
debug.dump(node.getValue()); # prints &amp;quot;[0.4, 0.2, 1]&amp;quot;&lt;br /&gt;
print(node.getType()); # prints &amp;quot;VEC3D&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getValue([rel_path]);&lt;br /&gt;
|text = {{hatnote|See also {{func link|getBoolValue()|page=this}}.}}&lt;br /&gt;
&lt;br /&gt;
Returns the value of the node.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path to a subnode as a string, which may contain '/' characters. If the subnode does not exist, we return nil.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(2.35);&lt;br /&gt;
print(node.getValue()); # prints &amp;quot;2.35&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setValue(&amp;quot;Hi&amp;quot;);&lt;br /&gt;
print(node.getValue()); # prints &amp;quot;Hi&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;).setValue(&amp;quot;Hi&amp;quot;);&lt;br /&gt;
print(node.getValue(&amp;quot;a&amp;quot;)); # prints &amp;quot;Hi&amp;quot;&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setValue([0, 0.5, 1]);&lt;br /&gt;
debug.dump(node.getValue()); # prints &amp;quot;[0, 0.5, 1]&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getValues() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getValues();&lt;br /&gt;
|text = Returns the node tree as a hash, with all the various subnodes, etc. If the node has no children, the result is equivalent to {{func link|getValue()|page=this}}. Subnodes that are indexed will be combined into one key and their values placed in a vector (see example 2).&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;string&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;number&amp;quot;: 1.2,&lt;br /&gt;
    &amp;quot;subnode&amp;quot;: {&lt;br /&gt;
        &amp;quot;idx-node&amp;quot;: [1, 2, 3]&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
node.addChild(&amp;quot;bool&amp;quot;).setBoolValue(1);&lt;br /&gt;
props.dump(node); # dump to node tree&lt;br /&gt;
debug.dump(node.getValues()); # dump the node converted to hash&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: [1, 2, 3]&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
props.dump(node); # a[0] = 1, a[1] = 2, a[2] = 3&lt;br /&gt;
debug.dump(node.getValues()); # a: [1, 2, 3]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== increment() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.increment(n = 1);&lt;br /&gt;
|text = Increments integer property by n (default: n = 1)&lt;br /&gt;
|param1 = n&lt;br /&gt;
|param1text = Value to add, will be converted to int, defaults to 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== initNode() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.initNode([path[, value[, type[, force]]]]);&lt;br /&gt;
|text = Initializes a node if it doesn't exist and returns that node as a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object.&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Optional path to a subnode as a string. If not given, the node itself will be initialized.&lt;br /&gt;
|param2 = value&lt;br /&gt;
|param2text = Optional default value to initialize the node with.&lt;br /&gt;
|param3 = type&lt;br /&gt;
|param3text = Optional string that will set the type of the node. Must be one of &amp;lt;code&amp;gt;&amp;quot;DOUBLE&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;INT&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;BOOL&amp;quot;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;quot;STRING&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param4 = force&lt;br /&gt;
|param4text = If set to 1 (true), the node's type will be forced to change.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
var a = node.initNode(&amp;quot;a&amp;quot;);&lt;br /&gt;
props.dump(a);&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
var a = node.initNode(&amp;quot;a&amp;quot;, &amp;quot;Hi&amp;quot;);&lt;br /&gt;
props.dump(a);&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
var a = node.initNode(&amp;quot;a&amp;quot;, 1.25, &amp;quot;INT&amp;quot;);&lt;br /&gt;
props.dump(a); # a = 1&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;).setBoolValue(0);&lt;br /&gt;
props.dump(node.getChild(&amp;quot;a&amp;quot;)); # a = 0 (type: bool)&lt;br /&gt;
var a = node.initNode(&amp;quot;a&amp;quot;, 1.25, &amp;quot;INT&amp;quot;, 1);&lt;br /&gt;
props.dump(a); # a = 0 (type: int)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== isInt() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.isInt();&lt;br /&gt;
|text = Returns true (1) if node '''type''' is &amp;quot;INT&amp;quot; or &amp;quot;LONG&amp;quot; (long integer) otherwise false (0).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== isNumeric() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.isNumeric();&lt;br /&gt;
|text = Returns true (1) if node '''type''' is &amp;quot;INT&amp;quot;, &amp;quot;LONG&amp;quot;, &amp;quot;FLOAT&amp;quot; or &amp;quot;DOUBLE&amp;quot; otherwise false (0).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== remove() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.remove();&lt;br /&gt;
|text = Removes the node and returns the removed node.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.getChild(&amp;quot;a&amp;quot;).remove();&lt;br /&gt;
props.dump(node); # child &amp;quot;a&amp;quot; does not exist anymore&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== removeAllChildren() ====&lt;br /&gt;
{{Caution|Be careful when  using this API in conjunction with the Canvas system and element specific properties, for details please see [[Howto:Canvas Path Benchmarking]]}}&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.removeAllChildren();&lt;br /&gt;
|version = 3.2&lt;br /&gt;
|commit = {{fgdata commit|4766ed|t=commit}}&lt;br /&gt;
|text = Removes all child nodes and returns the node.&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: 2,&lt;br /&gt;
    &amp;quot;c&amp;quot;: 3&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.removeAllChildren();&lt;br /&gt;
props.dump(node); # all children have been removed&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== removeChild() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.removeChild(rel_path, idx);&lt;br /&gt;
|text = Removes a given child node child nodes and returns the node.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Relative path to a subnode as a string.&lt;br /&gt;
|param2 = idx&lt;br /&gt;
|param2text = Index of the subnode to remove as an integer.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.removeChild(&amp;quot;a&amp;quot;, 0);&lt;br /&gt;
props.dump(node); # child &amp;quot;a&amp;quot; has been removed&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.removeChild(&amp;quot;a&amp;quot;, 0);&lt;br /&gt;
props.dump(node); # just a[1] remains&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== removeChildren() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.removeChildren([name]);&lt;br /&gt;
|text = Removes all children with a specified name. If no arguments are given, all children will be removed (see also {{func link|removeAllChildren()|page=this}}).&lt;br /&gt;
|param1 = name&lt;br /&gt;
|param1text = Optional name of children to remove as a string.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2);&lt;br /&gt;
node.addChildren(&amp;quot;b&amp;quot;, 2);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.removeChildren(&amp;quot;a&amp;quot;);&lt;br /&gt;
props.dump(node); # just children named &amp;quot;b&amp;quot; remain&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2);&lt;br /&gt;
node.addChildren(&amp;quot;b&amp;quot;, 2);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.removeChildren();&lt;br /&gt;
props.dump(node); # all children removed&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setAttribute() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setAttribute([rel_path, ]attr, value);&lt;br /&gt;
props.Node.setAttribute(attrs);&lt;br /&gt;
|text = Sets an attribute or multiple attributes. A list of attributes and their codes are below. For a brand new node, the default attributes are ''readable'' and ''writable''. Returns an integer specifying the old attributes.&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! String !! Description&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} readable {{!!}} Whether the node can be read.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} writable {{!!}} Whether the node can be written to.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} archive {{!!}} Whether the node will be saved when the &amp;quot;save&amp;quot; [[fgcommands|fgcommand]] is triggered.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} trace-read {{!!}} Whether the reading of the node will be logged when &amp;lt;code&amp;gt;--log-level=info&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} trace-write {{!!}} Whether the writing to the node will be logged when &amp;lt;code&amp;gt;--log-level=info&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} userarchive {{!!}} Whether the node will be saved to the [[FlightGear configuration via XML#autosave.xml|autosave file]] (only works for actual properties).&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} preserve {{!!}} Whether the value of node will be preserved during resets (only works for actual properties).&lt;br /&gt;
{{!}}}&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = attr&lt;br /&gt;
|param2text = Name of attribute to set as a string. See above.&lt;br /&gt;
|param3 = value&lt;br /&gt;
|param3text = Boolean value to set the property to.&lt;br /&gt;
|param4 = attrs&lt;br /&gt;
|param4text = When the function is used in its second form, this argument is used. This argument should be an integer specifying which arguments are set to true. See {{simgear file|simgear/props/props.hxx|l=767}} for the full list of codes. Simply add codes of the desired attributes together.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setAttribute(&amp;quot;trace-write&amp;quot;, 1);&lt;br /&gt;
node.setIntValue(12); # will be traced&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setAttribute(&amp;quot;readable&amp;quot;, 0);&lt;br /&gt;
var val = node.getValue();&lt;br /&gt;
debug.dump(val); # prints &amp;quot;nil&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
node.setAttribute(&amp;quot;a&amp;quot;, &amp;quot;trace-write&amp;quot;, 1);&lt;br /&gt;
node.getChild(&amp;quot;a&amp;quot;).setIntValue(12); # will be traced&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setAttribute(35); # read + write + trace-write&lt;br /&gt;
node.setIntValue(12); # will be traced&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setBoolValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setBoolValue([rel_path, ]value);&lt;br /&gt;
|text = {{note|For setting the values of [[Property Tree]] nodes, it is recommended to use {{func link|setprop()}} if possible, due to performance differences.}}&lt;br /&gt;
&lt;br /&gt;
Sets a node to a boolean value. If the node has no type, it will be set to a bool type. If the node is already a number type, it will be set to either 1 or 0. If it is a string, it will be set to either &amp;quot;true&amp;quot; or &amp;quot;false&amp;quot;. Returns 1 (true) if the operation was successful.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = value&lt;br /&gt;
|param2text = Value to set the node to, will be interpreted into a boolean. If it is &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt;, it will be false. If it is a string, it will be false. If it is a number, 0 will be false, while other numbers will be true. All other cases will be interpreted as 0.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(nil);&lt;br /&gt;
props.dump(node); # node = 0 (false)&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(&amp;quot;Hi&amp;quot;);&lt;br /&gt;
props.dump(node); # node = 1 (true)&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(0);&lt;br /&gt;
props.dump(node); # node = 0 (false)&lt;br /&gt;
node.setBoolValue(1.25);&lt;br /&gt;
props.dump(node); # node = 1 (true)&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setValue(&amp;quot;String&amp;quot;);&lt;br /&gt;
props.dump(node); # node = &amp;quot;String&amp;quot; (type: string)&lt;br /&gt;
node.setBoolValue(1);&lt;br /&gt;
props.dump(node); # node = &amp;quot;true&amp;quot;&lt;br /&gt;
|example5 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(12.32);&lt;br /&gt;
props.dump(node); # node = 12.32 (type: double)&lt;br /&gt;
node.setBoolValue(1);&lt;br /&gt;
props.dump(node); # node = 1&lt;br /&gt;
|example6 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
node.setBoolValue(&amp;quot;a&amp;quot;, 1);&lt;br /&gt;
props.dump(node); # /a = 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setDoubleValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setDoubleValue([rel_path, ]value);&lt;br /&gt;
|text = {{note|For setting the values of [[Property Tree]] nodes, it is recommended to use {{func link|setprop()}} if possible, due to performance differences.}}&lt;br /&gt;
&lt;br /&gt;
Sets a node to a double value. If the node has no type, it will be set to a double type. If the node is a bool, values different from zero will be interpreted as true. If the node is a string, the value will be converted to a string. If the node is an integer type, it will be truncated to the closest integer to zero. Returns 1 (true) if the operation was successful.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = value&lt;br /&gt;
|param2text = Value to set the node to, will be interpreted into a double number. It must be a valid number or a string that can be converted to a number.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(1.1);&lt;br /&gt;
props.dump(node); # node = 1.1 (type: double)&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(&amp;quot;1.1&amp;quot;);&lt;br /&gt;
props.dump(node); # node = 1.1 (type: double)&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(1);&lt;br /&gt;
node.setDoubleValue(&amp;quot;1.1&amp;quot;);&lt;br /&gt;
props.dump(node); # node = 1 (type: bool)&lt;br /&gt;
node.setDoubleValue(0.0);&lt;br /&gt;
props.dump(node); # node = 0 (type: bool)&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setIntValue(1);&lt;br /&gt;
node.setDoubleValue(1.1);&lt;br /&gt;
props.dump(node); # node = 1 (type: int)&lt;br /&gt;
node.setDoubleValue(&amp;quot;-1.1&amp;quot;);&lt;br /&gt;
props.dump(node); # node = -1 (type: int)&lt;br /&gt;
|example5 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
node.setDoubleValue(&amp;quot;a&amp;quot;, 12.2);&lt;br /&gt;
props.dump(node); # /a = 12.2&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setIntValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setIntValue([rel_path, ]value);&lt;br /&gt;
|text = {{note|For setting the values of [[Property Tree]] nodes, it is recommended to use {{func link|setprop()}} if possible, due to performance differences.}}&lt;br /&gt;
&lt;br /&gt;
Sets a node to an integer value. If the node has no type, it will be set to a integer type. If the node is a bool, values different from zero will be interpreted as true. If the node is a string, the value will be converted to a string. Returns 1 (true) if the operation was successful.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = value&lt;br /&gt;
|param2text = Value to set the node to, will be interpreted into a integer. It must be a valid number or a string that can be converted to a number. If the number is a double, it will be truncated to the closest integer to zero.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setIntValue(12);&lt;br /&gt;
props.dump(node); # node = 12&lt;br /&gt;
node.setIntValue(&amp;quot;6&amp;quot;);&lt;br /&gt;
props.dump(node); # node = 6&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setIntValue(12.2);&lt;br /&gt;
props.dump(node); # node = 12&lt;br /&gt;
node.setIntValue(-12.2);&lt;br /&gt;
props.dump(node); # node = 12&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(1);&lt;br /&gt;
node.setIntValue(12.5);&lt;br /&gt;
props.dump(node); # node = 1 (type: bool)&lt;br /&gt;
node.setIntValue(0);&lt;br /&gt;
props.dump(node); # node = 0 (type: bool)&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setValue(&amp;quot;Hi&amp;quot;);&lt;br /&gt;
node.setIntValue(12);&lt;br /&gt;
props.dump(node); # node = &amp;quot;12&amp;quot; (type: string)&lt;br /&gt;
|example5 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
node.setIntValue(&amp;quot;a&amp;quot;, 12);&lt;br /&gt;
props.dump(node); # /a = 12&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setValue([rel_path, ]value);&lt;br /&gt;
|text = {{hatnote|See also {{func link|setBoolValue()|page=this}}, {{func link|setDoubleValue()|page=this}}, and {{func link|setIntValue()|page=this}}.}}&lt;br /&gt;
&lt;br /&gt;
{{note|For setting the values of [[Property Tree]] nodes, it is recommended to use {{func link|setprop()}} if possible, due to performance differences.}}&lt;br /&gt;
&lt;br /&gt;
Sets a node to a given value. See table below for conversions and effects. Note that vec3d and vec4d types are not fully integrated into SGPropertyNode. Returns 1 (true) if the operation was successful.&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}} colspan=&amp;quot;2&amp;quot; style=&amp;quot;text-align:right&amp;quot; {{!}} '''value''' type → &lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; {{!}} Number&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; {{!}} String &lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; {{!}} Vector&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} style=&amp;quot;text-align:left&amp;quot; {{!}} Current node&amp;lt;br&amp;gt;type ↓&lt;br /&gt;
{{!}} style=&amp;quot;text-align:right&amp;quot; {{!}} Result ↘&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} None/unspecified&lt;br /&gt;
{{!}}&lt;br /&gt;
* Type set to &amp;lt;code&amp;gt;double&amp;lt;/code&amp;gt;&lt;br /&gt;
* Node set to '''value'''.&lt;br /&gt;
{{!}}&lt;br /&gt;
* Type set to &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt;&lt;br /&gt;
* Node set to '''value'''.&lt;br /&gt;
{{!}}&lt;br /&gt;
* Type set to &amp;lt;code&amp;gt;vec*d&amp;lt;/code&amp;gt;&lt;br /&gt;
* Node set to '''value'''.&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} Bool&lt;br /&gt;
{{!}}&lt;br /&gt;
* If '''value''' != 0, node set to true.&lt;br /&gt;
* If '''value''' == 0, node set to false.&lt;br /&gt;
{{!}}&lt;br /&gt;
* If '''value''' == &amp;quot;true&amp;quot;, node set to true.&lt;br /&gt;
* If '''value''' can be converted to an integer,&amp;lt;br&amp;gt;and != 0, node set to true.&lt;br /&gt;
{{!}} Node set to true.&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} Integer&lt;br /&gt;
{{!}} Node set to truncated '''value'''&lt;br /&gt;
{{!}} Node set to '''value ''' converted and truncated to an integer.&lt;br /&gt;
{{!}} Node set to 1.&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} Double&lt;br /&gt;
{{!}} Node set to '''value'''.&lt;br /&gt;
{{!}} Node set to '''value''' converted to number.&lt;br /&gt;
{{!}} Throws an error (vector is not a number).&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} String&lt;br /&gt;
{{!}} Node set to '''value''' converted to string. {{!!}} Node set to '''value'''. {{!!}} Node not set.&lt;br /&gt;
{{!}}}&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = value&lt;br /&gt;
|param2text = Value to set the node to. Must be a string, a valid number, or a vector consisting of 3 or 4 numbers. See table above for conversions and effects.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setValue(&amp;quot;Hi&amp;quot;);&lt;br /&gt;
props.dump(node); # node = &amp;quot;Hi&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
node.setValue(&amp;quot;a&amp;quot;, &amp;quot;Hi&amp;quot;);&lt;br /&gt;
props.dump(node); # \a = &amp;quot;Hi&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setValue([0.4, 0.2, 1]);&lt;br /&gt;
debug.dump(node.getValue()); # prints &amp;quot;[0.4, 0.2, 1]&amp;quot;&lt;br /&gt;
print(node.getType()); # prints &amp;quot;VEC3D&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setValues() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setValues(val);&lt;br /&gt;
|text = {{hatnote|See also {{func link|getValues()|page=this}}.}}&lt;br /&gt;
&lt;br /&gt;
Sets the nodes property tree from a Nasal hash. Scalars will become nodes in the tree and hashes will become named subnodes. Vectors will be converted into indexed nodes, with the values in the vector becoming their values (see examples below).&lt;br /&gt;
|param1 = val&lt;br /&gt;
|param1text = A hash that will become the property tree.&lt;br /&gt;
|example1 = var val = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 100 # &amp;quot;a&amp;quot; will become the subnode's name, and 100 its value&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new();&lt;br /&gt;
node.setValues(val);&lt;br /&gt;
props.dump(node); # dump tree&lt;br /&gt;
|example2 = var val = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: [1, 2, 3]&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new();&lt;br /&gt;
node.setValues(val);&lt;br /&gt;
props.dump(node); # dump tree&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== unalias() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.unalias();&lt;br /&gt;
|text = Un-aliases the node and returns it to a blank state. Returns 1 on success and 0 on failure (e.g., when used on a tied property).&lt;br /&gt;
|example2 = var node1 = props.Node.new();&lt;br /&gt;
node1.setDoubleValue(2.35);&lt;br /&gt;
var node2 = props.Node.new();&lt;br /&gt;
node2.alias(node1);&lt;br /&gt;
&lt;br /&gt;
props.dump(node2); # equals 2.35&lt;br /&gt;
node2.unalias();&lt;br /&gt;
props.dump(node2); # no value or type&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== toggleBoolValue() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = toggleBoolValue();&lt;br /&gt;
|text = Toggle a boolean property. You have to make sure the property is of type bool!&lt;br /&gt;
|example1 = var b = props.Node.new().initNode(&amp;quot;/_test/bool&amp;quot;, 1, &amp;quot;BOOL&amp;quot;);&lt;br /&gt;
print(&amp;quot;bool &amp;quot;, b.getValue());&lt;br /&gt;
b.toggleBoolValue();&lt;br /&gt;
print(&amp;quot;after toggleBoolValue &amp;quot;, b.getValue());&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
=== compileCondition() ===&lt;br /&gt;
{{see also|Conditions}}&lt;br /&gt;
&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.compileCondition(node);&lt;br /&gt;
|version = 3.2&lt;br /&gt;
|commit = {{fgdata commit|43f8ce|t=commit}}&lt;br /&gt;
|text = Compiles a [[conditions|condition]] property branch and returns a &amp;lt;code&amp;gt;Condition&amp;lt;/code&amp;gt; ghost object or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; on error. This ghost will contain a &amp;lt;code&amp;gt;test()&amp;lt;/code&amp;gt; function that will return the result of the condition as either 1 (true) or 0 (false).&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = Either a props.Node containing the condition, or a string specifying a place in the [[Property Tree]] where there is a condition branch.&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;equals&amp;quot;: {&lt;br /&gt;
        &amp;quot;property&amp;quot;: '/test',&lt;br /&gt;
        &amp;quot;value&amp;quot;: 12&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 12);&lt;br /&gt;
&lt;br /&gt;
var cond = props.compileCondition(node);&lt;br /&gt;
print(cond.test()); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 15);&lt;br /&gt;
print(cond.test()); # prints &amp;quot;0&amp;quot; (false)&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    &amp;quot;equals&amp;quot;: {&lt;br /&gt;
        &amp;quot;property&amp;quot;: '/test',&lt;br /&gt;
        &amp;quot;value&amp;quot;: 12&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
props.globals.getNode(&amp;quot;test2/condition&amp;quot;, 1).setValues(tree); # place it in the Property Tree&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 12);&lt;br /&gt;
&lt;br /&gt;
var cond = props.compileCondition(node);&lt;br /&gt;
print(cond.test()); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 15);&lt;br /&gt;
print(cond.test()); # prints &amp;quot;0&amp;quot; (false)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== condition() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.condition(node);&lt;br /&gt;
|text = Evaluates a [[conditions|condition]] property branch and returns the result as a boolean.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = Either a props.Node containing the condition, or a string specifying a place in the [[Property Tree]] where there is a condition branch.&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;equals&amp;quot;: {&lt;br /&gt;
        &amp;quot;property&amp;quot;: '/test',&lt;br /&gt;
        &amp;quot;value&amp;quot;: 12&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 12);&lt;br /&gt;
&lt;br /&gt;
print(props.condition(node)); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 15);&lt;br /&gt;
print(props.condition(node)); # prints &amp;quot;0&amp;quot; (false)&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    &amp;quot;equals&amp;quot;: {&lt;br /&gt;
        &amp;quot;property&amp;quot;: '/test',&lt;br /&gt;
        &amp;quot;value&amp;quot;: 12&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
props.globals.getNode(&amp;quot;test2/condition&amp;quot;, 1).setValues(tree); # place it in the Property Tree&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 12);&lt;br /&gt;
&lt;br /&gt;
print(props.condition(node)); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 15);&lt;br /&gt;
print(props.condition(node)); # prints &amp;quot;0&amp;quot; (false)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== copy() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.copy(src, dest[, attr]);&lt;br /&gt;
|text = Copies the property tree of the source into the destination node. Note that aliased properties will not be copied.&lt;br /&gt;
|param1 = src&lt;br /&gt;
|param1text = Source &amp;lt;code&amp;gt;props.Node object&amp;lt;/code&amp;gt; to copy from.&lt;br /&gt;
|param2 = dest&lt;br /&gt;
|param2text = Destination &amp;lt;code&amp;gt;props.Node object&amp;lt;/code&amp;gt; to copy to.&lt;br /&gt;
|param3 = attr&lt;br /&gt;
|param3text = If set to 1 (true), attributes will also be copied. Defaults to 0 (false).&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1.5,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: [1, 2, 3]&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var src = props.Node.new(tree);&lt;br /&gt;
var dest = props.Node.new();&lt;br /&gt;
props.copy(src, dest);&lt;br /&gt;
props.dump(dest);&lt;br /&gt;
|example2 = var src = props.Node.new();&lt;br /&gt;
var a = src.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
a.setAttribute(&amp;quot;trace-write&amp;quot;, 1);&lt;br /&gt;
a.setIntValue(12);&lt;br /&gt;
var dest = props.Node.new();&lt;br /&gt;
props.copy(src, dest, 1);&lt;br /&gt;
print(dest.getNode(&amp;quot;a&amp;quot;).getAttribute(&amp;quot;trace-write&amp;quot;)); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== dump() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.dump(node);&lt;br /&gt;
|text = Recursively dump the state of a node into the console, showing value and type of each node. Note that as of 10/2016, the value of vec*d type nodes cannot be dumped.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = Node to dump.&lt;br /&gt;
|example1 = var node = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 12,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: [1, 2, 3]&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
props.dump(node); # dump into console&lt;br /&gt;
|example2 = # Dump the entire Property Tree&lt;br /&gt;
# Warning! This is an intensive operation!&lt;br /&gt;
props.dump(props.globals);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== getNode() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.getNode();&lt;br /&gt;
|version = 3.2&lt;br /&gt;
|commit = {{fgdata commit|807062|t=commit}}&lt;br /&gt;
|text = Shortcut for &amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot; inline&amp;gt;props.globals.getNode()&amp;lt;/syntaxhighlight&amp;gt;. See {{func link|getNode()||Node|page=this}} for full documentation.&lt;br /&gt;
|example1 = print(&amp;quot;Current aircraft is: &amp;quot;, props.getNode(&amp;quot;/sim/aircraft&amp;quot;).getValue());&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== nodeList() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.nodeList(arg[, arg[, ...]]);&lt;br /&gt;
|text = Converts its arguments into a vector of node objects if possible and returns that vector. &lt;br /&gt;
|param1 = arg&lt;br /&gt;
|param1text = Object to operate on. Must be a node object, string, vector, hash, function, or &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost. Vectors and hashes must contain any of the other acceptable types, functions must return any of the other types, strings will be assumed to be paths to global properties, and ghosts will be converted into node objects. There may be any number of arguments.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
var f = func(){&lt;br /&gt;
    var n = props.Node.new();&lt;br /&gt;
    return n._g;&lt;br /&gt;
}&lt;br /&gt;
var list = props.nodeList(node,&lt;br /&gt;
    &amp;quot;/sim/aircraft&amp;quot;,&lt;br /&gt;
    [&amp;quot;/sim/fg-root&amp;quot;],&lt;br /&gt;
    { &amp;quot;path&amp;quot;: &amp;quot;/sim/fg-home&amp;quot; },&lt;br /&gt;
    f&lt;br /&gt;
);&lt;br /&gt;
debug.dump(list); # dump list&lt;br /&gt;
|example2 = var root = &amp;quot;/sim/version/&amp;quot;;&lt;br /&gt;
var info = [&lt;br /&gt;
    root ~ &amp;quot;build-id&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;build-number&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;flightgear&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;hla-support&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;openscenegraph&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;revision&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;simgear&amp;quot;&lt;br /&gt;
];&lt;br /&gt;
info = props.nodeList(info); # turn into list of nodes&lt;br /&gt;
foreach(var n; info){&lt;br /&gt;
    print(n.getValue()); # dump info&lt;br /&gt;
}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== runBinding() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.runBinding(node[, module]);&lt;br /&gt;
|text = Runs a [[Bindings|binding]] element in a node object. Returns 1 (true) on success and 0 (false) on failure.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = A {{tag|binding}} element as a node object.&lt;br /&gt;
|param2 = module&lt;br /&gt;
|param2text = Optional string specifying a module to run Nasal scripts in if the command is &amp;lt;code&amp;gt;nasal&amp;lt;/code&amp;gt;. This argument will not override any {{tag|module}} element in the '''node'''&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;command&amp;quot;: &amp;quot;dialog-show&amp;quot;,&lt;br /&gt;
    &amp;quot;dialog-name&amp;quot;: &amp;quot;map&amp;quot; # open map&lt;br /&gt;
};&lt;br /&gt;
var binding = props.Node.new(tree);&lt;br /&gt;
props.runBinding(binding);&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    &amp;quot;command&amp;quot;: &amp;quot;nasal&amp;quot;,&lt;br /&gt;
    &amp;quot;script&amp;quot;: 'print(pi)' # prints value of math.pi&lt;br /&gt;
};&lt;br /&gt;
var binding = props.Node.new(tree);&lt;br /&gt;
props.runBinding(binding, &amp;quot;math&amp;quot;);&lt;br /&gt;
|example3 = var tree = {&lt;br /&gt;
    &amp;quot;command&amp;quot;: &amp;quot;nasal&amp;quot;,&lt;br /&gt;
    &amp;quot;script&amp;quot;: 'print(pi)', # prints value of math.pi&lt;br /&gt;
    &amp;quot;module&amp;quot;: &amp;quot;math&amp;quot; # this is used&lt;br /&gt;
};&lt;br /&gt;
var binding = props.Node.new(tree);&lt;br /&gt;
props.runBinding(binding, &amp;quot;debug&amp;quot;);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== setAll() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.setAll(base, child, value);&lt;br /&gt;
|text = Sets indexed subnodes in the Property Tree with the same name to the same value.&lt;br /&gt;
|param1 = base&lt;br /&gt;
|param1text = Base path to the nodes.&lt;br /&gt;
|param2 = child&lt;br /&gt;
|param2text = Path to child nodes.&lt;br /&gt;
|param3 = value&lt;br /&gt;
|param3text = Value to set the subnodes to.&lt;br /&gt;
|example1 = # apply 50% throttle to all engines&lt;br /&gt;
props.setAll(&amp;quot;/controls/engines/engine&amp;quot;, &amp;quot;throttle&amp;quot;, 0.5);&lt;br /&gt;
|example2 = var nodes = props.globals.addChildren(&amp;quot;/test&amp;quot;, 3);&lt;br /&gt;
foreach(var node; nodes){&lt;br /&gt;
    node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
props.setAll(&amp;quot;/test&amp;quot;, &amp;quot;a&amp;quot;, &amp;quot;Hi&amp;quot;); # set all children (test[*]/a) to &amp;quot;Hi&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== wrap() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.wrap(node);&lt;br /&gt;
|text = Turns &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghosts, either in a vector or single, into &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; objects.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost or vector of such ghosts.&lt;br /&gt;
|example1 = var ghost = canvas._newCanvasGhost();&lt;br /&gt;
var node = props.wrap(ghost._node_ghost);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
|example2 = var vector = [canvas._newCanvasGhost()._node_ghost, props.Node.new()._g];&lt;br /&gt;
var nodes = props.wrap(vector);&lt;br /&gt;
foreach(var node; nodes){&lt;br /&gt;
    props.dump(node);&lt;br /&gt;
    print(&amp;quot;----&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== wrapNode() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.wrapNode(node);&lt;br /&gt;
|text = Turns a &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost into a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost to convert.&lt;br /&gt;
|example1 = var ghost = canvas._newCanvasGhost();&lt;br /&gt;
var node = props.wrapNode(ghost._node_ghost);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Variable ==&lt;br /&gt;
=== globals ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.globals;&lt;br /&gt;
|text = Exposes the [[Property Tree]] as a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
|example1 = print(&amp;quot;Current aircraft: &amp;quot;, props.globals.getNode(&amp;quot;/sim/aircraft&amp;quot;).getValue());&lt;br /&gt;
|example2text = Alternative using {{func link|getprop()}}.&lt;br /&gt;
|example2 = print(&amp;quot;Current aircraft: &amp;quot;, getprop(&amp;quot;/sim/aircraft&amp;quot;));&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Nasal namespaces}}&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Honeycomb_Input_Devices&amp;diff=142513</id>
		<title>Honeycomb Input Devices</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Honeycomb_Input_Devices&amp;diff=142513"/>
		<updated>2025-09-12T19:14:28Z</updated>

		<summary type="html">&lt;p&gt;Jsb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides information about the input devices available from ''[https://flyhoneycomb.com Honeycomb Aeronautical]'' and their integration into FlightGear.&lt;br /&gt;
&lt;br /&gt;
== Alpha Lite Flight Controls (Yoke) ==&lt;br /&gt;
Classic yoke designed for GA aircrafts like the C172 or PA28. Left side with 4-way hat switch,  2-way rocker switch (e.g. trim switch) and two buttons (e.g. PTT and AP disconnect). Right side has two buttons and a 2-way rocker switche (e.g. rudder trim). &lt;br /&gt;
&lt;br /&gt;
'''Integration'''&lt;br /&gt;
&lt;br /&gt;
to do&lt;br /&gt;
&lt;br /&gt;
== Alpha Flight Controls (Yoke) ==&lt;br /&gt;
The Alpha Flight Control is basically the same as the Alpha lite but with additional switches for e.g. battery, alternator, several lights and starter 'key' on the unit. Furthermore, the 2-way rocker switches on each side of the yoke are split &lt;br /&gt;
&lt;br /&gt;
'''Integration'''&lt;br /&gt;
&lt;br /&gt;
Partly done&lt;br /&gt;
&lt;br /&gt;
== Bravo lite Throttle Quadrant ==&lt;br /&gt;
Four lever throttle quadrant with trim wheel, parking brake switch, gear lever and gear indication lights.&lt;br /&gt;
&lt;br /&gt;
'''Integration'''&lt;br /&gt;
&lt;br /&gt;
to do&lt;br /&gt;
&lt;br /&gt;
== Bravo Throttle Quadrant ==&lt;br /&gt;
Very flexible throttle quadrant with six replaceable levers, gear lever, autopilot control panel, flap switch, annunciator panel and seven configurable switches. Shipped with lever sets for single and dual engine GA aircraft (throttle, mixture, propeller) as well as commercial jets (e.g. Boeing, CRJ).&lt;br /&gt;
&lt;br /&gt;
Separate throttle pack with Airbus style levers is sold separately.&lt;br /&gt;
&lt;br /&gt;
'''Integration'''&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Feature&lt;br /&gt;
!Status&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|Gear lever&lt;br /&gt;
|done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Gear indicator&lt;br /&gt;
|done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Trim wheel&lt;br /&gt;
|done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Thrust levers&lt;br /&gt;
|done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reversers&lt;br /&gt;
|wip&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|TOGA, AT disconnect&lt;br /&gt;
|wip&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Switches&lt;br /&gt;
|wip&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|AP mode control panel&lt;br /&gt;
|needs discussion&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Annunciator panel&lt;br /&gt;
|partly done, needs discussion&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Charlie Rudder Pedals ==&lt;br /&gt;
Rudder pedals with L/R break.&lt;br /&gt;
&lt;br /&gt;
'''Integration'''&lt;br /&gt;
&lt;br /&gt;
{{Done}}&lt;br /&gt;
&lt;br /&gt;
== Foxtrott Aviation Stick ==&lt;br /&gt;
Joystick / Sidestick with several buttons and switches e.g. for aircraft lights, AP, radio, etc&lt;br /&gt;
&lt;br /&gt;
'''Integration'''&lt;br /&gt;
&lt;br /&gt;
to do&lt;br /&gt;
&lt;br /&gt;
== Sierra TPM Module ==&lt;br /&gt;
Throttle, Propeller, Mixture for a GA aircraft like the C172. Also contains a trim wheel, parking brake, flap switch,gear lever and gear indication lights.&lt;br /&gt;
&lt;br /&gt;
'''Integration'''&lt;br /&gt;
&lt;br /&gt;
to do&lt;br /&gt;
&lt;br /&gt;
== see also ==&lt;br /&gt;
[[USB-HID]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Honeycomb_Input_Devices&amp;diff=142499</id>
		<title>Honeycomb Input Devices</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Honeycomb_Input_Devices&amp;diff=142499"/>
		<updated>2025-09-09T20:38:46Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Add sections for new devices&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Work in progress)&lt;br /&gt;
&lt;br /&gt;
This page shall provide information about the input devices available from Honeycomb Aeronautical and their integration into FlightGear.&lt;br /&gt;
&lt;br /&gt;
== Alpha Lite Flight Controls (Yoke) ==&lt;br /&gt;
Classic yoke designed for GA aircrafts like the C172 or PA28. Left side with 4-way switch, double 2-way rocker switch (e.g. trim switch) and two buttons (e.g. PTT and AP disconnect). Right side has two buttons and double 2-way rocker switche (e.g. rudder trim). &lt;br /&gt;
&lt;br /&gt;
=== Integration ===&lt;br /&gt;
to do&lt;br /&gt;
&lt;br /&gt;
== Alpha Flight Controls (Yoke) ==&lt;br /&gt;
The Alpha Flight Control is basically the same as the Alpha lite but with additional switches for e.g. battery, alternator, several lights and starter 'key' on the unit. &lt;br /&gt;
&lt;br /&gt;
=== Integration ===&lt;br /&gt;
Partly done&lt;br /&gt;
&lt;br /&gt;
== Bravo lite Throttle Quadrant ==&lt;br /&gt;
Four lever throttle quadrant with trim wheel, parking brake switch, gear lever and gear indication lights.&lt;br /&gt;
&lt;br /&gt;
=== Integration ===&lt;br /&gt;
to do&lt;br /&gt;
&lt;br /&gt;
== Bravo Throttle Quadrant ==&lt;br /&gt;
Very flexible throttle quadrant with six replaceable levers, gear lever, autopilot control panel, flap switch, annunciator panel and seven configurable switches. Shipped with lever sets for single and dual engine GA aircraft (throttle, mixture, propeller) as well as commercial jets (e.g. Boeing, CRJ).&lt;br /&gt;
&lt;br /&gt;
Separate throttle pack with Airbus style levers is sold separately.&lt;br /&gt;
&lt;br /&gt;
=== Integration ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Feature&lt;br /&gt;
!Status&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|Gear lever&lt;br /&gt;
|done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Gear indicator&lt;br /&gt;
|done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Trim wheel&lt;br /&gt;
|done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Thrust levers&lt;br /&gt;
|done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reversers&lt;br /&gt;
|wip&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|TOGA, AT disconnect&lt;br /&gt;
|wip&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Switches&lt;br /&gt;
|wip&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|AP mode control panel&lt;br /&gt;
|needs discussion&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Annunciator panel&lt;br /&gt;
|partly done, needs discussion&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Charlie Rudder Pedals ==&lt;br /&gt;
Rudder pedals with L/R break.&lt;br /&gt;
&lt;br /&gt;
=== Integration ===&lt;br /&gt;
{{Done}}&lt;br /&gt;
&lt;br /&gt;
== Foxtrott Aviation Stick ==&lt;br /&gt;
Joystick / Sidestick with several buttons and switches e.g. for aircraft lights, AP, radio, etc&lt;br /&gt;
&lt;br /&gt;
=== Integration ===&lt;br /&gt;
to do&lt;br /&gt;
&lt;br /&gt;
== Sierra TPM Module ==&lt;br /&gt;
Throttle, Propeller, Mixture for a GA aircraft like the C172. Also contains a trim wheel, parking brake, flap switch,gear lever and gear indication lights.&lt;br /&gt;
&lt;br /&gt;
=== Integration ===&lt;br /&gt;
to do&lt;br /&gt;
&lt;br /&gt;
== see also ==&lt;br /&gt;
[[USB-HID]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Input_helpers&amp;diff=142475</id>
		<title>Input helpers</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Input_helpers&amp;diff=142475"/>
		<updated>2025-09-06T20:14:45Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Fix typos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This page is about Nasal script code for input devices like joysticks, yokes, throttle quadrants and pedals. While small scripts can be easily added directly into joystick &amp;lt;binding&amp;gt;, larger code blocks should be organized a bit differently. &lt;br /&gt;
&lt;br /&gt;
As always: &amp;quot;do not repeat yourself&amp;quot; = to make everyones live easier, code should not be copy&amp;amp;pasted but put into a &amp;quot;central&amp;quot; place as functions or classes and be called whenever, wherever needed. This way maintenance has to be done only in one place.&lt;br /&gt;
&lt;br /&gt;
== input_helpers namespace ==&lt;br /&gt;
Input helper code should be stored in FGDATA/Nasal/input_helpers/&amp;lt;vendorname&amp;gt;.nas&lt;br /&gt;
&lt;br /&gt;
To avoid clashes, there should be one file per vendor and in each of these files a namespace (hash) for this vendor shall be created.&lt;br /&gt;
&lt;br /&gt;
See honeycomb.nas for an example:&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
# &lt;br /&gt;
# Helpers for Honeycomb input devices&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# !!! Abbreviated sample !!! &lt;br /&gt;
# Check FGDATA repository for latest full version&lt;br /&gt;
&lt;br /&gt;
# namespace&lt;br /&gt;
var honeycomb = {};&lt;br /&gt;
&lt;br /&gt;
# Helper for the Honeycomb Alpha Yoke&lt;br /&gt;
honeycomb[&amp;quot;alpha&amp;quot;] = {&lt;br /&gt;
    new: func(cfgnode) {&lt;br /&gt;
        var m = {&lt;br /&gt;
            parents: [me, input_helpers.config_manager.new(cfgnode)],&lt;br /&gt;
        };&lt;br /&gt;
        return m;&lt;br /&gt;
    },&lt;br /&gt;
    # abreviated file&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== config_manager - supporting config variants for a device ==&lt;br /&gt;
The &amp;lt;code&amp;gt;input_helpers.config_manager&amp;lt;/code&amp;gt; class is designed to allow configuration variants for an input device to be defined within a single XML config file.&lt;br /&gt;
&lt;br /&gt;
Why? Take the Honeycomb Bravo throttle quadrant as an example. It supports six levers with replaceable lever &amp;quot;heads&amp;quot;, one set for airliners and another one for GA single and dual engine models, so you can configure the hardware with levers from single throttle/mixture up to four jet engines.&lt;br /&gt;
&lt;br /&gt;
Now, you need a way to tell FlightGear, what levers you put onto your throttle quadrant and how to interprete the lever inputs. To avoid juggling with XML files, we simply put the limited number of variants into the XML and let the config_manager do the rest.&lt;br /&gt;
&lt;br /&gt;
If XML files containing &amp;lt;config-variants&amp;gt; are loaded during startup, config_manager will show a popup hint about this fact and open a dialog to select the desired config variant. &lt;br /&gt;
&lt;br /&gt;
The selection is added to aircraft.data and thus is safed per aircraft for convenience.&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!-- shortened version for illustration only --&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;vendor-id&amp;gt;honeycomb&amp;lt;/vendor-id&amp;gt;&lt;br /&gt;
  &amp;lt;model-id&amp;gt;bravo&amp;lt;/model-id&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Honeycomb Aeronautical Bravo Throttle Quadrant&amp;lt;/name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;debug-events type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/debug-events&amp;gt;&lt;br /&gt;
  &amp;lt;hid-debug-raw type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/hid-debug-raw&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
  we need &amp;lt;nasal&amp;gt; to load the config_manager or a vendor&lt;br /&gt;
  specific derived class of it&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
  &amp;lt;nasal&amp;gt;&lt;br /&gt;
    &amp;lt;open&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      print(&amp;quot;Honeycomb Bravo Nasal (event) open&amp;quot;);&lt;br /&gt;
      bravo = input_helpers.honeycomb.bravo.new(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/open&amp;gt;&lt;br /&gt;
    &amp;lt;close&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      print(&amp;quot;Honeycomb Bravo Nasal (event) close&amp;quot;);&lt;br /&gt;
      if (ishash(bravo) and isfunc(bravo['close']))&lt;br /&gt;
        bravo.close(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/close&amp;gt;&lt;br /&gt;
  &amp;lt;/nasal&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
  now we can add &amp;lt;config-variants&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
  &amp;lt;config-variants&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
&amp;lt;!-- id must be a single word, no special chars, useable as hash key in Nasal --&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;jet2&amp;lt;/id&amp;gt; &lt;br /&gt;
&amp;lt;!-- text for the GUI dialog --&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Airliner (two engines)&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
  add property mappings for this variant. &lt;br /&gt;
  &amp;lt;input&amp;gt; is used in the &amp;lt;event&amp;gt; elements&lt;br /&gt;
  &amp;lt;output&amp;gt; is the target property input will be aliased to&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flight/speed-brake&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/reverser&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/reverser&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[5]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flaps-lever-continuous&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;tm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Mixture&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;tpm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Prop/Mixture&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/propeller-pitch&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;   &lt;br /&gt;
  &amp;lt;/config-variants&amp;gt;&lt;br /&gt;
&amp;lt;!-- events cut; see latest version in FGDATA repository --&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== see also ==&lt;br /&gt;
[[USB-HID]]&lt;br /&gt;
&lt;br /&gt;
[[Honeycomb Input Devices]]&lt;br /&gt;
[[Category:Nasal]]&lt;br /&gt;
[[Category:Joysticks and Yokes]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=USB-HID&amp;diff=141702</id>
		<title>USB-HID</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=USB-HID&amp;diff=141702"/>
		<updated>2025-04-04T10:48:14Z</updated>

		<summary type="html">&lt;p&gt;Jsb: add 'see also' section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[draft]&lt;br /&gt;
&lt;br /&gt;
USB-HID (Human Interface Device) is one of the methods to connect input devices to FlightGear. &lt;br /&gt;
&lt;br /&gt;
==Linux access rights for devices==&lt;br /&gt;
HID devices under linux have usually restricted access rights, e.g. normal users are not allowed to access them directly. As you should not run FlightGear as root user, you most likely need to create a few udev rules to allow normal users to access the device files.&lt;br /&gt;
&lt;br /&gt;
First, use &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; to get a list of all detected USB devices. The output should look similar to this:&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Bus 003 Device 004: ID 294b:1901 Honeycomb Aeronautical Bravo Throttle Quadrant&lt;br /&gt;
Bus 003 Device 006: ID 06a3:0763 Saitek PLC Pro Flight Rudder Pedals&lt;br /&gt;
Bus 003 Device 002: ID 294b:1900 Honeycomb Aeronautical Alpha Flight Controls&lt;br /&gt;
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub&lt;br /&gt;
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Find the lines containing your relevant input devices (joysticks, yoke, throttle, pedals, ...) and note the IDs. The format is &amp;lt;vendor-id&amp;gt;:&amp;lt;device-id&amp;gt;. For simplicity, this example uses only the vendor-id.&lt;br /&gt;
&lt;br /&gt;
On Ubuntu, you can add for example the following file under &amp;lt;code&amp;gt;/etc/udev/rules.d&amp;lt;/code&amp;gt; to allow r/w access to members of the &amp;lt;code&amp;gt;input&amp;lt;/code&amp;gt; user group. Of course, you have to add/modify the lines to match the vendor-ids of your devices.&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/udev/rules.d/40-usb-flightgear.rules&lt;br /&gt;
#&lt;br /&gt;
# To add your user to the input group try:&lt;br /&gt;
# sudo usermod --append --groups input &amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Honeycomb&lt;br /&gt;
SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{idVendor}==&amp;quot;294b&amp;quot;, GROUP=&amp;quot;input&amp;quot;, MODE=&amp;quot;0664&amp;quot;&lt;br /&gt;
# saitek&lt;br /&gt;
SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{idVendor}==&amp;quot;06a3&amp;quot;, GROUP=&amp;quot;input&amp;quot;, MODE=&amp;quot;0664&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;To activate the new rules, try &amp;lt;code&amp;gt;udevadm control --reload-rules &amp;amp;&amp;amp; udevadm trigger&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
If this does not help, a reboot will do.&lt;br /&gt;
&lt;br /&gt;
==Developing Configuration files for input devices==&lt;br /&gt;
&lt;br /&gt;
=== Gathering data ===&lt;br /&gt;
Add the following parameters to your FlightGear command line or via the launcher Settings&amp;gt;Additional Settings&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
--log-class=input&lt;br /&gt;
--log-level=debug&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will create a lot of debug output for the input systems in which you can find all events supported by your devices&lt;br /&gt;
&lt;br /&gt;
=== Creating a config file ===&lt;br /&gt;
The configuration files shall be stored in FGDATA/Input/Event/&amp;lt;Vendor&amp;gt;/&amp;lt;Model&amp;gt;.xml &lt;br /&gt;
&lt;br /&gt;
As a starting point you can copy this example. Replace the data as needed.&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;!-- next two must be single word, no special characters! --&amp;gt;&lt;br /&gt;
  &amp;lt;vendor-id&amp;gt;honeycomb&amp;lt;/vendor-id&amp;gt;&lt;br /&gt;
  &amp;lt;model-id&amp;gt;bravo&amp;lt;/model-id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- &lt;br /&gt;
  the name as seen e.g. in lsusb or the debug output of flightgear &lt;br /&gt;
  multiple &amp;lt;name&amp;gt;&amp;lt;/name&amp;gt; lines are allowed to match name variants&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Honeycomb Aeronautical Bravo Throttle Quadrant&amp;lt;/name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- &lt;br /&gt;
  during development, set this to true to get more debug output&lt;br /&gt;
  do not forget to set it to false, when you finalize your config file&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
  &amp;lt;debug-events type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/debug-events&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nasal&amp;gt;&lt;br /&gt;
    &amp;lt;open&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      #print(&amp;quot;Honeycomb Bravo Nasal (event) open&amp;quot;);&lt;br /&gt;
      #bravo = input_helpers.honeycomb.bravo.new(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/open&amp;gt;&lt;br /&gt;
    &amp;lt;close&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      #print(&amp;quot;Honeycomb Bravo Nasal (event) close&amp;quot;);&lt;br /&gt;
      #if (ishash(bravo) and isfunc(bravo['close']))&lt;br /&gt;
      #  bravo.close(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/close&amp;gt;&lt;br /&gt;
  &amp;lt;/nasal&amp;gt;&lt;br /&gt;
  &amp;lt;!-- events shall follow here --&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Example for an axis event:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;event&amp;gt;&lt;br /&gt;
    &amp;lt;desc&amp;gt;Lever 0&amp;lt;/desc&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;abs-x-translate&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;min-range&amp;gt;-1023&amp;lt;/min-range&amp;gt;&lt;br /&gt;
    &amp;lt;max-range&amp;gt;1023&amp;lt;/max-range&amp;gt;&lt;br /&gt;
    &amp;lt;binding&amp;gt;&lt;br /&gt;
      &amp;lt;command&amp;gt;property-scale&amp;lt;/command&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
  &amp;lt;/event&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Example for a button event:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;event&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;button-1&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;desc&amp;gt;AP mode HDG&amp;lt;/desc&amp;gt;&lt;br /&gt;
    &amp;lt;repeatable&amp;gt;false&amp;lt;/repeatable&amp;gt;&lt;br /&gt;
    &amp;lt;binding&amp;gt;&lt;br /&gt;
      &amp;lt;command&amp;gt;property-assign&amp;lt;/command&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/input/honeycomb/bravo/buttons/hdg&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;value&amp;gt;1&amp;lt;/value&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
    &amp;lt;mod-up&amp;gt;&lt;br /&gt;
      &amp;lt;binding&amp;gt;&lt;br /&gt;
        &amp;lt;command&amp;gt;property-assign&amp;lt;/command&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/input/honeycomb/bravo/buttons/hdg&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;value&amp;gt;0&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/binding&amp;gt;&lt;br /&gt;
    &amp;lt;/mod-up&amp;gt;&lt;br /&gt;
  &amp;lt;/event&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Status of OS support==&lt;br /&gt;
Linux: Supported&lt;br /&gt;
&lt;br /&gt;
MacOS: supported?&lt;br /&gt;
&lt;br /&gt;
Windows: not yet supported?&lt;br /&gt;
&lt;br /&gt;
== see also ==&lt;br /&gt;
[[Input helpers]]&lt;br /&gt;
&lt;br /&gt;
[[Honeycomb Input Devices]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Input_helpers&amp;diff=141701</id>
		<title>Input helpers</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Input_helpers&amp;diff=141701"/>
		<updated>2025-04-04T10:47:07Z</updated>

		<summary type="html">&lt;p&gt;Jsb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This page is about Nasal script code for input devices like joysticks, yokes, throttle quadrands and pedals.&lt;br /&gt;
&lt;br /&gt;
While small scripts can be easily added directly into joystick &amp;lt;binding&amp;gt;, larger code blocks should be organized a bit differently. As always: &amp;quot;do not repeat yourself&amp;quot;. This means, to make everyones live easier, code should not be copy&amp;amp;pasted but put into a &amp;quot;central&amp;quot; place as functions or classes and be called whenever, wherever needed. This way, maintenance has to be done only in one place.&lt;br /&gt;
&lt;br /&gt;
== input_helpers namespace ==&lt;br /&gt;
Input helper code should be stored in FGDATA/Nasal/input_helpers/&amp;lt;myvendor&amp;gt;.nas&lt;br /&gt;
&lt;br /&gt;
To avoid clashes, there should be one file per vendor and in each of these files a namespace (hash) for this vendor shall be created.&lt;br /&gt;
&lt;br /&gt;
See honeycomb.nas for an example:&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
# &lt;br /&gt;
# Helpers for Honeycomb input devices&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# !!! Abbreviated sample !!! &lt;br /&gt;
# Check FGDATA repository for latest full version&lt;br /&gt;
&lt;br /&gt;
# namespace&lt;br /&gt;
var honeycomb = {};&lt;br /&gt;
&lt;br /&gt;
# Helper for the Honeycomb Alpha Yoke&lt;br /&gt;
honeycomb[&amp;quot;alpha&amp;quot;] = {&lt;br /&gt;
    new: func(cfgnode) {&lt;br /&gt;
        var m = {&lt;br /&gt;
            parents: [me, input_helpers.config_manager.new(cfgnode)],&lt;br /&gt;
        };&lt;br /&gt;
        return m;&lt;br /&gt;
    },&lt;br /&gt;
    # abreviated file&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== config_manager - supporting config variants for a device ==&lt;br /&gt;
The &amp;lt;code&amp;gt;input_helpers.config_manager&amp;lt;/code&amp;gt; class is designed to allow configuration variants for an input device to be defined within a single XML config file.&lt;br /&gt;
&lt;br /&gt;
Why? Take the Honeycomb Bravo throttle quadrant as an example. It supports six levers with replaceable lever &amp;quot;heads&amp;quot;, one set for airliners and another one for GA single and dual engine models, so you can configure the hardware with levers from single throttle/mixture up to four jet engines.&lt;br /&gt;
&lt;br /&gt;
Now, you need a way to tell FlightGear, what levers you put onto your throttle quadrant and how to interprete the lever inputs. To avoid juggling with XML files, we simply put the limited number of variants into the XML and let the config_manager do the rest.&lt;br /&gt;
&lt;br /&gt;
If XML files containing &amp;lt;config-variants&amp;gt; are loaded during startup, config_manager will show a popup hint about this fact and open a dialog to select the desired config variant. &lt;br /&gt;
&lt;br /&gt;
The selection is added to aircraft.data and thus is safed per aircraft for convenience.&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!-- shortened version for illustration only --&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;vendor-id&amp;gt;honeycomb&amp;lt;/vendor-id&amp;gt;&lt;br /&gt;
  &amp;lt;model-id&amp;gt;bravo&amp;lt;/model-id&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Honeycomb Aeronautical Bravo Throttle Quadrant&amp;lt;/name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;debug-events type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/debug-events&amp;gt;&lt;br /&gt;
  &amp;lt;hid-debug-raw type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/hid-debug-raw&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
  we need &amp;lt;nasal&amp;gt; to load the config_manager or a vendor&lt;br /&gt;
  specific derived class of it&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
  &amp;lt;nasal&amp;gt;&lt;br /&gt;
    &amp;lt;open&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      print(&amp;quot;Honeycomb Bravo Nasal (event) open&amp;quot;);&lt;br /&gt;
      bravo = input_helpers.honeycomb.bravo.new(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/open&amp;gt;&lt;br /&gt;
    &amp;lt;close&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      print(&amp;quot;Honeycomb Bravo Nasal (event) close&amp;quot;);&lt;br /&gt;
      if (ishash(bravo) and isfunc(bravo['close']))&lt;br /&gt;
        bravo.close(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/close&amp;gt;&lt;br /&gt;
  &amp;lt;/nasal&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
  now we can add &amp;lt;config-variants&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
  &amp;lt;config-variants&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
&amp;lt;!-- id must be a single word, no special chars, useable as hash key in Nasal --&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;jet2&amp;lt;/id&amp;gt; &lt;br /&gt;
&amp;lt;!-- text for the GUI dialog --&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Airliner (two engines)&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
  add property mappings for this variant. &lt;br /&gt;
  &amp;lt;input&amp;gt; is used in the &amp;lt;event&amp;gt; elements&lt;br /&gt;
  &amp;lt;output&amp;gt; is the target property input will be aliased to&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flight/speed-brake&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/reverser&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/reverser&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[5]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flaps-lever-continuous&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;tm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Mixture&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;tpm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Prop/Mixture&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/propeller-pitch&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;   &lt;br /&gt;
  &amp;lt;/config-variants&amp;gt;&lt;br /&gt;
&amp;lt;!-- events cut; see latest version in FGDATA repository --&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== see also ==&lt;br /&gt;
[[USB-HID]]&lt;br /&gt;
&lt;br /&gt;
[[Honeycomb Input Devices]]&lt;br /&gt;
[[Category:Nasal]]&lt;br /&gt;
[[Category:Joysticks and Yokes]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Honeycomb_Input_Devices&amp;diff=141700</id>
		<title>Honeycomb Input Devices</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Honeycomb_Input_Devices&amp;diff=141700"/>
		<updated>2025-04-04T10:26:29Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Initial draft&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Work in progress)&lt;br /&gt;
&lt;br /&gt;
This page shall provide information about the input devices available from Honeycomb Aeronautical and their integration into FlightGear.&lt;br /&gt;
&lt;br /&gt;
== Honeycomb Alpha Yoke ==&lt;br /&gt;
Classic yoke designed for GA aircrafts like the C172 or PA28 with switches for e.g. battery, alternator, lights, starter 'key'. &lt;br /&gt;
&lt;br /&gt;
=== Integration ===&lt;br /&gt;
Partly done&lt;br /&gt;
&lt;br /&gt;
== Honeycomb Bravo Throttle Quadrant ==&lt;br /&gt;
Very flexible throttle quadrant with six replaceable levers, gear lever, autopilot control panel, flap switch, annunciator panel and seven configurable switches. Shipped with lever sets for single and dual engine GA aircraft (throttle, mixture, propeller) as well as commercial jets (e.g. Boeing, CRJ).&lt;br /&gt;
&lt;br /&gt;
Separate throttle pack with Airbus style levers is sold separately.&lt;br /&gt;
&lt;br /&gt;
=== Integration ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Feature&lt;br /&gt;
!Status&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|Gear lever&lt;br /&gt;
|done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Gear indicator&lt;br /&gt;
|done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Trim wheel&lt;br /&gt;
|done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Thrust levers&lt;br /&gt;
|done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reversers&lt;br /&gt;
|wip&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|TOGA, AT disconnect&lt;br /&gt;
|wip&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Switches&lt;br /&gt;
|wip&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|AP mode control panel&lt;br /&gt;
|needs discussion&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Annunciator panel&lt;br /&gt;
|partly done, needs discussion&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Honeycomb Charlie Rudder Pedals ==&lt;br /&gt;
Rudder pedals with L/R break.&lt;br /&gt;
&lt;br /&gt;
=== Integration ===&lt;br /&gt;
{{Done}}&lt;br /&gt;
&lt;br /&gt;
== see also ==&lt;br /&gt;
[[USB-HID]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=141643</id>
		<title>Aircraft properties reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=141643"/>
		<updated>2025-03-31T15:27:35Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Electric */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PropertyTree}}&lt;br /&gt;
&lt;br /&gt;
This is a generic '''aircraft properties reference'''.  There are many properties that are very common in aircraft, and many of them are present even in a very simple aircraft.  However, a complete description that matches all the properties is very unlikely to be written, as aircraft can be very different from each other.&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|2}}&lt;br /&gt;
&lt;br /&gt;
== What are properties? ==&lt;br /&gt;
{{main article|Property tree}}&lt;br /&gt;
=== The property tree ===&lt;br /&gt;
Most parts of FlightGear communicate with each other through key-value pair properties in the [[property tree]].  The properties represent both the input from the pilot, the values determining the position and velocity of the aircraft, the values used for animating the aircraft, and pretty much anything else.&lt;br /&gt;
&lt;br /&gt;
While many properties will be common between most aircraft, many properties will also be different between aircraft.  This becomes obvious if one consider the many different configurations (aircraft/helicopter/car, control surface and landing gear layout, number and locations of engines, etc) and propulsions systems (types of engines, types of fuels etc.) an aircraft can have.  There are also different flight dynamic models (FDMs) that have different needs.  In addition many properties will by necessity be aircraft specific, though developers should make a conscious effort to have properties map to more common ones if that is possible.&lt;br /&gt;
&lt;br /&gt;
=== Where are the properties defined? ===&lt;br /&gt;
There are a couple ways that the properties are set, but a fair amount of them just &amp;quot;appear&amp;quot; without being documented anywhere.  There are several places to look for properties.  One is in the aircraft files, starting from the aircraft specific [[aircraft-set.xml]] file, another is the [[Nasal]] files, and the last place (and often most useful!) is &amp;quot;grepping&amp;quot; (searching) through the C++ code.&lt;br /&gt;
&lt;br /&gt;
To determine how a property works and what it does often requires looking through any code that uses it.  This is a part of FlightGear that we could certainly document better&lt;br /&gt;
&lt;br /&gt;
== The serviceable and operable properties ==&lt;br /&gt;
Many systems, instruments, etc. have either or both of the properties &amp;lt;code&amp;gt;serviceable&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;operable&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;serviceable&amp;lt;/code&amp;gt; property is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; when something is functional and have not failed. Setting it to false would make it fail.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;operable&amp;lt;/code&amp;gt; property is set to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; when something both is serviceable and have power. Unfortunately it is a tied property and you can not assign a [[Nasal library#setlistener()|Nasal listener]] to it.&lt;br /&gt;
&lt;br /&gt;
== Annunciators ==&lt;br /&gt;
The /instrumentation/annunciators section shall provide a central place for&lt;br /&gt;
&lt;br /&gt;
* aircrafts to write annunciator status data&lt;br /&gt;
* 3D aircraft models and external devices (like joysticks, yokes, throttle quadrants or custom made cockpit hardware) to read such data and drive status lights etc.&lt;br /&gt;
&lt;br /&gt;
Some of the props are automatically calculated by property rules in &amp;lt;code&amp;gt;$FGDATA/Aircraft/Generic/generic-annunciators.xml&amp;lt;/code&amp;gt; (available since FG 2024.1) other properties have to be calculated by the actual aircraft.&lt;br /&gt;
&lt;br /&gt;
The aircraft.nas module provides aircraft.light which allows easy implementation of blinking lights. Such lights have a bool property 'state' which tells if the light is on or off.&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/annunciators/doors&lt;br /&gt;
/instrumentation/annunciators/master-caution/state  # aircraft.light&lt;br /&gt;
/instrumentation/annunciators/master-warning/state  # aircraft.light&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/enabled&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/alt&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/apr&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/hdg&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/ias&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/nav&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/rev&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/vs&lt;br /&gt;
/instrumentation/annunciators/autoflight/flightdirector/enabled&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/engines/&lt;br /&gt;
/instrumentation/annunciators/engines/apu/enabled&lt;br /&gt;
/instrumentation/annunciators/engines/apu/fire&lt;br /&gt;
# summary props, 'sum' of all engines&lt;br /&gt;
/instrumentation/annunciators/engines/fire&lt;br /&gt;
/instrumentation/annunciators/engines/oil-pressure-low&lt;br /&gt;
/instrumentation/annunciators/engines/starter&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# for &amp;lt;gear-name&amp;gt; in {nose, left, right}&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/down&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/in-transition&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/unsafe&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/up&lt;br /&gt;
# gear summary&lt;br /&gt;
/instrumentation/annunciators/gear/down&lt;br /&gt;
/instrumentation/annunciators/gear/in-transition&lt;br /&gt;
/instrumentation/annunciators/gear/unsafe&lt;br /&gt;
/instrumentation/annunciators/gear/up &lt;br /&gt;
/instrumentation/annunciators/gear/parking-brake&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/systems/anti-ice/enabled&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/aux-pump&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/system[]/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/system[]/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/vacuum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Consumables ==&lt;br /&gt;
:''See also [[#Fuel]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lb&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lbs&lt;br /&gt;
/consumables/fuel/tank[%d]/level-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/capacity-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/density-ppg&lt;br /&gt;
/consumables/fuel/total-fuel-lbs&lt;br /&gt;
/consumables/fuel/total-gal_us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Controls ==&lt;br /&gt;
These properties are meant to represent the various cockpit controls (levers, switches, buttons, etc.).  Consider these as the pilots input.&lt;br /&gt;
&lt;br /&gt;
=== Recommended usage ===&lt;br /&gt;
&lt;br /&gt;
* Animation of control elements (levers, switches, etc) themself in the 3D model of the cockpit&lt;br /&gt;
* As input to aircraft system simulation, e.g. hydraulics or electrical systems &lt;br /&gt;
&lt;br /&gt;
Avoid refering to control props directly for animating parts of the 3D model if there is an aircraft system (electric, hydraulic, ...) involved. &lt;br /&gt;
&lt;br /&gt;
Better use XML property rules (e.g. logic or filter) that calculate the component state from /controls/foo as well as &amp;quot;power available&amp;quot;, &amp;quot;component is serviceable&amp;quot; etc. &lt;br /&gt;
&lt;br /&gt;
=== Anti-ice ===&lt;br /&gt;
These properties control the various anti-ice properties that may be present in an aircraft.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/anti-ice/wing-heat&lt;br /&gt;
/controls/anti-ice/pitot-heat&lt;br /&gt;
/controls/anti-ice/wiper&lt;br /&gt;
/controls/anti-ice/window-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/carb-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/inlet-heat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== APU ===&lt;br /&gt;
These properties control any auxiliary power unit, in essence a small turbine engine driving generators, hydraulic pumps etc. before and after the aircraft's engines are up an running.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/APU/off-start-run&lt;br /&gt;
/controls/APU/fire-switch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Armament ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/armament/master-arm&lt;br /&gt;
/controls/armament/station-select&lt;br /&gt;
/controls/armament/release-all&lt;br /&gt;
/controls/armament/station[%d]/stick-size&lt;br /&gt;
/controls/armament/station[%d]/release-stick&lt;br /&gt;
/controls/armament/station[%d]/release-all&lt;br /&gt;
/controls/armament/station[%d]/jettison-all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Autoflight ===&lt;br /&gt;
These properties control the autopilot on certain airplanes. For [[IT Autoflight]] based systems, see [[IT Autoflight#Interface_Reference|here]].&lt;br /&gt;
&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/autoflight/autopilot[%d]/engage&lt;br /&gt;
/controls/autoflight/autothrottle-arm&lt;br /&gt;
/controls/autoflight/autothrottle-engage&lt;br /&gt;
/controls/autoflight/heading-select&lt;br /&gt;
/controls/autoflight/altitude-select&lt;br /&gt;
/controls/autoflight/bank-angle-select&lt;br /&gt;
/controls/autoflight/vertical-speed-select&lt;br /&gt;
/controls/autoflight/speed-select&lt;br /&gt;
/controls/autoflight/mach-select&lt;br /&gt;
/controls/autoflight/vertical-mode&lt;br /&gt;
/controls/autoflight/lateral-mode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Electric ===&lt;br /&gt;
Control elements for electrical systems like battery, generators/alternators, avionics etc.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/electric/battery-switch&lt;br /&gt;
/controls/electric/external-power&lt;br /&gt;
/controls/electric/APU-generator &lt;br /&gt;
/controls/electric/engine[%d]/generator&lt;br /&gt;
/controls/electric/engine[%d]/bus-tie&lt;br /&gt;
/controls/electric/avionics[%d]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|/controls/electric/APU-generator should be aliased to /controls/electric/engine[%d]/generator (where %d is the index of the engine representing the APU) by the aircraft code.}}&lt;br /&gt;
&lt;br /&gt;
=== Engines ===&lt;br /&gt;
Engines are numbered engine[0] for a single engine to engine[0] to engine[3] for a 747 for example. (The model allows for up to 12 engines rumour has it ;-)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/engines/throttle_idle&lt;br /&gt;
/controls/engines/engine[%d]/throttle&lt;br /&gt;
/controls/engines/engine[%d]/starter&lt;br /&gt;
/controls/engines/engine[%d]/fuel-pump&lt;br /&gt;
/controls/engines/engine[%d]/fire-switch&lt;br /&gt;
/controls/engines/engine[%d]/fire-bottle-discharge&lt;br /&gt;
/controls/engines/engine[%d]/cutoff&lt;br /&gt;
/controls/engines/engine[%d]/mixture&lt;br /&gt;
/controls/engines/engine[%d]/propeller-pitch&lt;br /&gt;
/controls/engines/engine[%d]/magnetos&lt;br /&gt;
/controls/engines/engine[%d]/boost&lt;br /&gt;
/controls/engines/engine[%d]/WEP&lt;br /&gt;
/controls/engines/engine[%d]/cowl-flaps-norm&lt;br /&gt;
/controls/engines/engine[%d]/feather&lt;br /&gt;
/controls/engines/engine[%d]/ignition&lt;br /&gt;
/controls/engines/engine[%d]/augmentation&lt;br /&gt;
/controls/engines/engine[%d]/afterburner&lt;br /&gt;
/controls/engines/engine[%d]/reverser&lt;br /&gt;
/controls/engines/engine[%d]/water-injection&lt;br /&gt;
/controls/engines/engine[%d]/condition&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Flight controls ===&lt;br /&gt;
These properties control the flight controls surfaces, though often through a mechanical, analog or digital flight control system (FCS) that may or may not be modeled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/flight/aileron&lt;br /&gt;
/controls/flight/aileron-trim&lt;br /&gt;
/controls/flight/elevator&lt;br /&gt;
/controls/flight/elevator-trim&lt;br /&gt;
/controls/flight/rudder&lt;br /&gt;
/controls/flight/rudder-trim&lt;br /&gt;
/controls/flight/flaps&lt;br /&gt;
/controls/flight/slats&lt;br /&gt;
/controls/flight/BLC			// Boundary Layer Control&lt;br /&gt;
/controls/flight/spoilers&lt;br /&gt;
/controls/flight/speedbrake&lt;br /&gt;
/controls/flight/wing-sweep&lt;br /&gt;
/controls/flight/wing-fold&lt;br /&gt;
/controls/flight/drag-chute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The positions of the controls are usually put in &amp;lt;code&amp;gt;/surface-positions/&amp;lt;/code&amp;gt; at the discretion of the aircraft designer. These usually drive the animations of the control surfaces. They are either normalized (like &amp;lt;code&amp;gt;/surface-positions/elevator-pos-norm&amp;lt;/code&amp;gt;) or in degrees, and sometimes the aileron is split left/right.&lt;br /&gt;
&lt;br /&gt;
=== Fuel ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/fuel/dump-valve&lt;br /&gt;
/controls/fuel/tank[%d]/fuel_selector&lt;br /&gt;
/controls/fuel/tank[%d]/to_engine&lt;br /&gt;
/controls/fuel/tank[%d]/to_tank&lt;br /&gt;
/controls/fuel/tank[%d]/boost-pump[%d]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Gear ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/gear/brake-left&lt;br /&gt;
/controls/gear/brake-right&lt;br /&gt;
/controls/gear/brake-parking&lt;br /&gt;
/controls/gear/steering // Used if rudder is not sufficient for control of steering&lt;br /&gt;
/controls/gear/gear-down&lt;br /&gt;
/controls/gear/antiskid // Deprecated?&lt;br /&gt;
/controls/gear/tailhook&lt;br /&gt;
/controls/gear/tailwheel-lock&lt;br /&gt;
/controls/gear/wheel[%d]/alternate-extension&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Hydraulics ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/hydraulic/system[%d]/engine-pump&lt;br /&gt;
/controls/hydraulic/system[%d]/electric-pump&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Lights ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/lighting/landing-lights&lt;br /&gt;
/controls/lighting/turn-off-lights&lt;br /&gt;
/controls/lighting/formation-lights&lt;br /&gt;
/controls/lighting/taxi-light&lt;br /&gt;
/controls/lighting/logo-lights&lt;br /&gt;
/controls/lighting/nav-lights&lt;br /&gt;
/controls/lighting/beacon&lt;br /&gt;
/controls/lighting/strobe&lt;br /&gt;
/controls/lighting/panel-norm&lt;br /&gt;
/controls/lighting/instruments-norm&lt;br /&gt;
/controls/lighting/dome-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pneumatic ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pneumatic/APU-bleed&lt;br /&gt;
/controls/pneumatic/engine[%d]/bleed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pressurization ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pressurization/mode&lt;br /&gt;
/controls/pressurization/dump&lt;br /&gt;
/controls/pressurization/outflow-valve&lt;br /&gt;
/controls/pressurization/pack[%d]/pack-on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Seat ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/seat/vertical-adjust&lt;br /&gt;
/controls/seat/fore-aft-adjust&lt;br /&gt;
/controls/seat/cmd_selector_valve&lt;br /&gt;
/controls/seat/eject[%d]/initiate&lt;br /&gt;
/controls/seat/eject[%d]/status&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Engines ==&lt;br /&gt;
Status of engines. See also: /controls/engines/ &lt;br /&gt;
=== Common ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/fuel-flow-gph&lt;br /&gt;
/engines/engine[%d]/fuel-flow_pph&lt;br /&gt;
/engines/engine[%d]/thrust_lb&lt;br /&gt;
/engines/engine[%d]/running&lt;br /&gt;
/engines/engine[%d]/starter&lt;br /&gt;
/engines/engine[%d]/cranking&lt;br /&gt;
/engines/engine[%d]/fire&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turbine ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/n1&lt;br /&gt;
/engines/engine[%d]/n2&lt;br /&gt;
/engines/engine[%d]/epr&lt;br /&gt;
/engines/engine[%d]/augmentation&lt;br /&gt;
/engines/engine[%d]/water-injection&lt;br /&gt;
/engines/engine[%d]/ignition&lt;br /&gt;
/engines/engine[%d]/nozzle-pos-norm&lt;br /&gt;
/engines/engine[%d]/inlet-pos-norm&lt;br /&gt;
/engines/engine[%d]/reversed&lt;br /&gt;
/engines/engine[%d]/cutoff&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Piston ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/mp-osi&lt;br /&gt;
/engines/engine[%d]/egt-degf&lt;br /&gt;
/engines/engine[%d]/oil-temperature-degf&lt;br /&gt;
/engines/engine[%d]/oil-pressure-psi&lt;br /&gt;
/engines/engine[%d]/cht-degf&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Propeller ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
/engines/engine[%d]/pitch&lt;br /&gt;
/engines/engine[%d]/torque&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Flight Dynamics Model ==&lt;br /&gt;
=== Position ===&lt;br /&gt;
This will return the current position of the aircraft within FlightGear. This is also the stuff that is transmitted in [[Howto:Multiplayer|multiplayer]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/position/&lt;br /&gt;
/position/altitiude-ft ()&lt;br /&gt;
/position/altitude-agl-ft (22.46983965)&lt;br /&gt;
/position/altitude-ft (28.24368289)&lt;br /&gt;
/position/ground-elev-ft (-0.43513529)&lt;br /&gt;
/position/ground-elev-m (-0.1326292364)&lt;br /&gt;
/position/latitude-deg (37.61371436)&lt;br /&gt;
/position/latitude-string (37*36 49.4N)&lt;br /&gt;
/position/longitude-deg (-122.3576508)&lt;br /&gt;
/position/longitude-string (-122*21 27.5W)&lt;br /&gt;
/position/sea-level-radius-ft (20899648.76)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Orientation ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/orientation/roll-deg&lt;br /&gt;
/orientation/pitch-deg&lt;br /&gt;
/orientation/heading-deg&lt;br /&gt;
&lt;br /&gt;
/orientation/roll-rate-degps&lt;br /&gt;
/orientation/pitch-rate-degps&lt;br /&gt;
/orientation/yaw-rate-degps&lt;br /&gt;
&lt;br /&gt;
/orientation/side-slip-rad&lt;br /&gt;
/orientation/side-slip-deg&lt;br /&gt;
/orientation/alpha-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Velocities ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/velocities/airspeed-kt&lt;br /&gt;
/velocities/mach&lt;br /&gt;
/velocities/speed-north-fps&lt;br /&gt;
/velocities/speed-east-fps&lt;br /&gt;
/velocities/speed-down-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/uBody-fps&lt;br /&gt;
/velocities/vBody-fps&lt;br /&gt;
/velocities/wBody-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/vertical-speed-fps&lt;br /&gt;
/velocities/glideslope&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Acceleration ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/accelerations/nlf&lt;br /&gt;
&lt;br /&gt;
/accelerations/ned/north-accel-fps_sec&lt;br /&gt;
/accelerations/ned/east-accel-fps_sec&lt;br /&gt;
/accelerations/ned/down-accel-fps_sec&lt;br /&gt;
&lt;br /&gt;
/accelerations/pilot/x-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/y-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/z-accel-fps_sec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Gear ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gear/serviceable&lt;br /&gt;
/gear/gear[%d]/cast-angle-deg // The angle of the wheel where 0 is pointing straight forward&lt;br /&gt;
/gear/gear[%d]/compression-m&lt;br /&gt;
/gear/gear[%d]/compression-norm&lt;br /&gt;
/gear/gear[%d]/ground-friction-factor&lt;br /&gt;
/gear/gear[%d]/ground-is-solid&lt;br /&gt;
/gear/gear[%d]/has-brake&lt;br /&gt;
/gear/gear[%d]/rollspeed-ms // Speed of the wheel's rotation in meters per second&lt;br /&gt;
/gear/gear[%d]/wow // Weight-on-wheel&lt;br /&gt;
/gear/gear[%d]/xoffset-in&lt;br /&gt;
/gear/gear[%d]/yoffset-in&lt;br /&gt;
/gear/gear[%d]/zoffset-in&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf[%d]/&lt;br /&gt;
/instrumentation/airspeed-indicator/&lt;br /&gt;
/instrumentation/altimeter/&lt;br /&gt;
/instrumentation/annunciator/&lt;br /&gt;
/instrumentation/attitude-indicator/&lt;br /&gt;
/instrumentation/clock/&lt;br /&gt;
/instrumentation/comm[%d]/&lt;br /&gt;
/instrumentation/dme/&lt;br /&gt;
/instrumentation/efis/&lt;br /&gt;
/instrumentation/encoder/&lt;br /&gt;
/instrumentation/flightdirector/&lt;br /&gt;
/instrumentation/gps/&lt;br /&gt;
/instrumentation/gps-annunciator/&lt;br /&gt;
/instrumentation/heading-indicator/&lt;br /&gt;
/instrumentation/heading-indicator-fg/&lt;br /&gt;
/instrumentation/magnetic-compass/&lt;br /&gt;
/instrumentation/marker-beacon/&lt;br /&gt;
/instrumentation/nav[%d]/&lt;br /&gt;
/instrumentation/radar/&lt;br /&gt;
/instrumentation/slip-skid-ball/&lt;br /&gt;
/instrumentation/tacan[%d]/&lt;br /&gt;
/instrumentation/transponder/&lt;br /&gt;
/instrumentation/turn-indicator/&lt;br /&gt;
/instrumentation/vertical-speed-indicator/&lt;br /&gt;
/instrumentation/wxradar/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation ADF ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf[%d]/adf-btn&lt;br /&gt;
/instrumentation/adf[%d]/bro-btn&lt;br /&gt;
/instrumentation/adf[%d]/display-mode&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/running&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/start-time&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/time&lt;br /&gt;
/instrumentation/adf[%d]/error-deg&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/running&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/start-time&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/time&lt;br /&gt;
/instrumentation/adf[%d]/flt-btn&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/dial-1-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/dial-100-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/selected-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/standby-khz&lt;br /&gt;
/instrumentation/adf[%d]/frq-btn&lt;br /&gt;
/instrumentation/adf[%d]/ident&lt;br /&gt;
/instrumentation/adf[[%d]/ident-audible&lt;br /&gt;
/instrumentation/adf[%d]/in-range&lt;br /&gt;
/instrumentation/adf[%d]/indicated-bearing-deg&lt;br /&gt;
/instrumentation/adf[%d]/mode&lt;br /&gt;
/instrumentation/adf[%d]/model&lt;br /&gt;
/instrumentation/adf[%d]/operable&lt;br /&gt;
/instrumentation/adf[%d]/power-btn&lt;br /&gt;
/instrumentation/adf[%d]/right-display&lt;br /&gt;
/instrumentation/adf[%d]/rotation-deg&lt;br /&gt;
/instrumentation/adf[%d]/serviceable&lt;br /&gt;
/instrumentation/adf[%d]/set-btn&lt;br /&gt;
/instrumentation/adf[%d]/volume&lt;br /&gt;
/instrumentation/adf[%d]/volume-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation comm radio ===&lt;br /&gt;
See [[Aircraft_properties_reference/Instrumentation/COMM]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation NAV radio ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/nav[%d]/audio-btn&lt;br /&gt;
/instrumentation/nav[%d]/back-course-btn&lt;br /&gt;
/instrumentation/nav[%d]/cdi/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/crosstrack-error-m&lt;br /&gt;
/instrumentation/nav[%d]/crosstrack-heading-error-deg&lt;br /&gt;
/instrumentation/nav[%d]/data-is-valid&lt;br /&gt;
/instrumentation/nav[%d]/dme-in-range&lt;br /&gt;
/instrumentation/nav[%d]/filtered-cdiNAV0-deflection&lt;br /&gt;
/instrumentation/nav[%d]/filtered-gsNAV0-deflection&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/dial-khz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/dial-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/is-localizer-frequency&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/selected-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/selected-mhz-fmt&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/standby-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/standby-mhz-fmt&lt;br /&gt;
/instrumentation/nav[%d]/from-flag&lt;br /&gt;
/instrumentation/nav[%d]/frq-swap-btn&lt;br /&gt;
/instrumentation/nav[%d]/gs/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/gs-direct-deg&lt;br /&gt;
/instrumentation/nav[%d]/gs-distance&lt;br /&gt;
/instrumentation/nav[%d]/gs-in-range&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection-deg&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection-norm&lt;br /&gt;
/instrumentation/nav[%d]/gs-rate-of-climb&lt;br /&gt;
/instrumentation/nav[%d]/gs-rate-of-climb-fpm&lt;br /&gt;
/instrumentation/nav[%d]/has-gs&lt;br /&gt;
/instrumentation/nav[%d]/heading-deg&lt;br /&gt;
/instrumentation/nav[%d]/heading-needle-deflection&lt;br /&gt;
/instrumentation/nav[%d]/heading-needle-deflection-norm&lt;br /&gt;
/instrumentation/nav[%d]/ident&lt;br /&gt;
/instrumentation/nav[%d]/ident-audible&lt;br /&gt;
/instrumentation/nav[%d]/in-range&lt;br /&gt;
/instrumentation/nav[%d]/nav-distance&lt;br /&gt;
/instrumentation/nav[%d]/nav-id&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc1&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc2&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc3&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc4&lt;br /&gt;
/instrumentation/nav[%d]/nav-loc&lt;br /&gt;
/instrumentation/nav[%d]/operable&lt;br /&gt;
/instrumentation/nav[%d]/power-btn&lt;br /&gt;
/instrumentation/nav[%d]/radials/actual-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/reciprocal-radial-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/selected-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/target-auto-hdg-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/arget-radial-deg&lt;br /&gt;
/instrumentation/nav[%d]/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/signal-quality-norm&lt;br /&gt;
/instrumentation/nav[%d]/slaved-to-gps&lt;br /&gt;
/instrumentation/nav[%d]/time-to-intercept-sec&lt;br /&gt;
/instrumentation/nav[%d]/to-flag&lt;br /&gt;
/instrumentation/nav[%d]/to-from/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/volume&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation Tacan ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/tacan[%d]/display/channel&lt;br /&gt;
/instrumentation/tacan[%d]/display/x-shift&lt;br /&gt;
/instrumentation/tacan[%d]/display/y-shift&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[1]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[2]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[3]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[4]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-mhz&lt;br /&gt;
/instrumentation/tacan[%d]/ident&lt;br /&gt;
/instrumentation/tacan[%d]/in-range&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-bearing-true-deg&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-distance-nm&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-ground-speed-kt&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-time-min&lt;br /&gt;
/instrumentation/tacan[%d]/name&lt;br /&gt;
/instrumentation/tacan[%d]/serviceable&lt;br /&gt;
/instrumentation/tacan[%d]/switch-position&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rotors (YASim only) ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/rotors/gear/torque-sound-filtered // Unused?&lt;br /&gt;
/rotors/gear/total-torque&lt;br /&gt;
/rotors/{name}/balance&lt;br /&gt;
/rotors/{name}/blade[%d]/flap-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/incidence-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/position-deg // Position relative to model&lt;br /&gt;
/rotors/{name}/bladesvisible // Used for animations&lt;br /&gt;
/rotors/{name}/cone%d-deg //e.g. cone-deg or cone2-deg&lt;br /&gt;
/rotors/{name}/roll-deg&lt;br /&gt;
/rotors/{name}/rpm&lt;br /&gt;
/rotors/{name}/stall&lt;br /&gt;
/rotors/{name}/stall-filtered&lt;br /&gt;
/rotors/{name}/tilt&lt;br /&gt;
/rotors/{name}/torque&lt;br /&gt;
/rotors/{name}/yaw-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For how to animate rotors using these properties, see [[Howto:Animate helicopters]].&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Aircraft-set.xml]]&lt;br /&gt;
* [[Multiplayer protocol]]&lt;br /&gt;
* [[Property browser]]&lt;br /&gt;
* [[PropertyList XML files]]&lt;br /&gt;
* [[Property tree]]&lt;br /&gt;
&lt;br /&gt;
=== Readme files ===&lt;br /&gt;
* {{readme file|properties}}&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
==== Consumables ====&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.hxx}}&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Flight Dynamics Model ====&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Instrumentation ====&lt;br /&gt;
* {{flightgear file|src/Instrumentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Property Tree]]&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Addon&amp;diff=141297</id>
		<title>Addon</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Addon&amp;diff=141297"/>
		<updated>2025-02-03T15:57:44Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Add modules.nas to Related content/Wiki articles&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Fgaddonslogo202x89.png|right]] &lt;br /&gt;
To make it easier to create '''addons''' there is since FlightGear 2017.3 a new way to create addons.  In essence FlightGear will load an overlay XML into the property tree and start a well known Nasal function.&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://forum.flightgear.org/viewtopic.php?p=314620#p314620 &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re: New Feature: Addon - &amp;quot;API&amp;quot; &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Torsten &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Jul 19th, 2017 &lt;br /&gt;
  |added  =  Jul 19th, 2017 &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now have a simple way to add addons to FlightGear without the need to mess around with &amp;lt;code&amp;gt;FGData/Nasal&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;FGHome/Nasal&amp;lt;/code&amp;gt; directories.&amp;lt;ref name=&amp;quot;Forum_announcement&amp;quot;&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://forum.flightgear.org/viewtopic.php?p=314563#p314563 &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; New Feature: Addon - &amp;quot;API&amp;quot; &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Torsten &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Jul 18th, 2017 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|3}}&lt;br /&gt;
&lt;br /&gt;
== Installing and using an addon ==&lt;br /&gt;
Download and copy the addon to a directory on your computer.&lt;br /&gt;
&lt;br /&gt;
If you use the launcher, select the Add-ons page from the icon bar on the left, then find the section Add-on Module folders and click the Add(+) button. Select the folder where you put the addon. Once the addon is shown in the list, make sure its check box is selected.&lt;br /&gt;
&lt;br /&gt;
Use the command line switch &amp;lt;code&amp;gt;--addon=/path/to/some/addon&amp;lt;/code&amp;gt;.&amp;lt;ref name=&amp;quot;Forum_announcement&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an addon ==&lt;br /&gt;
There is a very simple Skeleton addon available in FGAddon to be used as a template.&amp;lt;ref name=&amp;quot;Forum_announcement&amp;quot;/&amp;gt; See {{fgaddon source|path=Addons/Skeleton}}.&lt;br /&gt;
&lt;br /&gt;
A leading slash (&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;) in this section indicates the base directory of the directory structure of the addon.&lt;br /&gt;
&lt;br /&gt;
=== Minimum configuration ===&lt;br /&gt;
An addon may be installed in a directory anywhere on your hard disk and need at least two files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/addon-config.xml&amp;lt;/code&amp;gt; - A standard [[PropertyList XML files|PropertyList XML file]] to be used to populate or modify the [[property tree]]. (Same as to be used in &amp;lt;code&amp;gt;--config=foo.xml&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;/addon-main.nas&amp;lt;/code&amp;gt; - The Nasal hook for the logic. This file needs a function called &amp;lt;code&amp;gt;main()&amp;lt;/code&amp;gt; which will be called from the global addon initializer (&amp;lt;code&amp;gt;addons.nas&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
=== Additional common files ===&lt;br /&gt;
* &amp;lt;code&amp;gt;/addon-metadata.xml&amp;lt;/code&amp;gt; - A PropertyList XML file with metadata about the addon it.&lt;br /&gt;
* &amp;lt;code&amp;gt;/addon-menubar-items.xml&amp;lt;/code&amp;gt; - A PropertyList XML file describing menus to be added to the FlightGear menu bar.&lt;br /&gt;
* &amp;lt;code&amp;gt;/gui/dialogs/&amp;amp;lt;my-foobar-dialog&amp;amp;gt;.xml&amp;lt;/code&amp;gt; - PropertyList XML files to create custom dialogs.&lt;br /&gt;
&lt;br /&gt;
=== Good to know ===&lt;br /&gt;
The new addon mechanism lets you add a &amp;lt;code&amp;gt;addon-config.xml&amp;lt;/code&amp;gt; to override the settings in &amp;lt;code&amp;gt;defaults.xml&amp;lt;/code&amp;gt; and other files.&lt;br /&gt;
&lt;br /&gt;
That will allow an addon to&lt;br /&gt;
*  Override key bindings (as in the spoken ATC addon)&lt;br /&gt;
*  Add or override autopilots and property rules&lt;br /&gt;
*  Introduce XML state machines&lt;br /&gt;
&lt;br /&gt;
Unless your really want to add/change/remove those at runtime, this should cater for most use cases.&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://forum.flightgear.org/viewtopic.php?p=314902#p314902 &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re: Spoken  &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Torsten &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Jul 23rd, 2017 &lt;br /&gt;
  |added  =  Jul 23rd, 2017 &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have some instructions how to use SVN [[FGAddon|in our wiki]]. It covers mostly aircraft development but the workflow is pretty much the same for addons.&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://forum.flightgear.org/viewtopic.php?p=314647#p314647 &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re: Spoken ATC &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Torsten &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Jul 19th, 2017 &lt;br /&gt;
  |added  =  Jul 19th, 2017 &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound Support ===&lt;br /&gt;
Sound support is available using fgcommand's.&lt;br /&gt;
&lt;br /&gt;
See [[Nasal FAQ]] &amp;quot;play-audio-sample&amp;quot;&lt;br /&gt;
&lt;br /&gt;
https://sourceforge.net/p/flightgear/flightgear/ci/5acf2e26d085b7553b2387b9753e9253e8b4bff4&lt;br /&gt;
&lt;br /&gt;
[[Hackathon Proposal:Addon specific Sound Queues]]&lt;br /&gt;
&lt;br /&gt;
== Addon initialization ==&lt;br /&gt;
On initialization fgfs takes care of:&lt;br /&gt;
* Through {{flightgear source|path=src/Main/options.cxx|text=&amp;lt;code&amp;gt;options.cxx&amp;lt;/code&amp;gt;}}:&amp;lt;ref name=&amp;quot;Forum_announcement&amp;quot;/&amp;gt;&lt;br /&gt;
** Creating a property under &amp;lt;code&amp;gt;/addons/addon[n]/path=/path/to/some/addon&amp;lt;/code&amp;gt;&lt;br /&gt;
** Loading &amp;lt;code&amp;gt;/path/to/some/addon/addon-config.xml&amp;lt;/code&amp;gt; into the property tree (same as &amp;lt;code&amp;gt;--config=/path/to/some/addon/addon-config.xml&amp;lt;/code&amp;gt;)&lt;br /&gt;
** Adding &amp;lt;code&amp;gt;/path/to/some/addon&amp;lt;/code&amp;gt; to the list of allowed directories (same as &amp;lt;code&amp;gt;--fg-aircraft=/path/to/some/addon&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Through {{fgdata source|path=Nasal/addons.nas|text=&amp;lt;code&amp;gt;addons.nas&amp;lt;/code&amp;gt;}}:&lt;br /&gt;
** Loading &amp;lt;code&amp;gt;/foo/bar/baz/addon-main.nas&amp;lt;/code&amp;gt; into namespace &amp;lt;code&amp;gt;__addon[ADDON_ID]__&amp;lt;/code&amp;gt;&lt;br /&gt;
** Calling &amp;lt;code&amp;gt;main(addonGhost)&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;/foo/bar/baz/addon-main.nas&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Aircraft specific config (addon-hints) ==&lt;br /&gt;
Some addons need per-aircraft configuration. While addons should strive to be self-contained (ie. the addon should contain means to&lt;br /&gt;
detect different aircraft and apply config from whithin the addon) there is also the possibility for the addon to read so called &amp;quot;addon-hints&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For this, a special property tree exists: &amp;lt;code&amp;gt;/sim/addon-hints/&amp;lt;addon&amp;gt;/...&amp;lt;/code&amp;gt;&lt;br /&gt;
The tree is expected to be populated from the aircraft.xml file. The addon can then read the properties from a common place regardless of loaded aircraft.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;sim&amp;gt;&lt;br /&gt;
  &amp;lt;addon-hints&amp;gt;&lt;br /&gt;
    &amp;lt;my-addon&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
    &amp;lt;/my-addon&amp;gt;&lt;br /&gt;
  &amp;lt;/addon-hints&amp;gt;&lt;br /&gt;
&amp;lt;/sim&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== APIs ==&lt;br /&gt;
{{hatnote|For more details about these APIs, see the readme file, {{readme file|add-ons}}.}}&lt;br /&gt;
=== C++ API ===&lt;br /&gt;
There is a C++ API on FlightGear's side that handle some on the addon related tasks manly through the &amp;lt;code&amp;gt;AddonManager()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Addon()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;AddonVersion()&amp;lt;/code&amp;gt; classes.&lt;br /&gt;
&lt;br /&gt;
=== Nasal API ===&lt;br /&gt;
The Nasal add-on API lives in the 'addons' namespace and can for example do queries to &amp;lt;code&amp;gt;AddonManager()&amp;lt;/code&amp;gt; and read data from &amp;lt;code&amp;gt;addons.Addon&amp;lt;/code&amp;gt; objects.  It can for example compare addon versions if there is dependencies.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
{{See also|Howto:Creating a simple modding framework}}&lt;br /&gt;
&lt;br /&gt;
ATC chatter was removed in 2015, see fgdata commit: [https://sourceforge.net/p/flightgear/fgdata/ci/81607f734e13add9be02816ddaec305d05bc4e47/ 81607f734e13add9be02816ddaec305d05bc4e47]&lt;br /&gt;
&lt;br /&gt;
And the devel list messages referenced in the commit log.&lt;br /&gt;
the other relevant commit is this: b60736ba7add2a7cd39af3d8a974d5be3ea46e8b&lt;br /&gt;
It would not be very difficult to restore this functionality, or even generalize/improve it significantly (which was the scope of the original discussion on the devel list)&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://forum.flightgear.org/viewtopic.php?p=288388#p288388 &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re: Whatever happened to radom radio  &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Hooray &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Jun 11th, 2016 &lt;br /&gt;
  |added  =  Jun 11th, 2016 &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The restored functionality could be distributed as a tarball that is extracted into $FG_ROOT - alternatively, into $FG_HOME, because Nasal files there are treated as overlays, which basically means that you can install user-specific extensions there without having to tamper with $FG_ROOT, it would only take  very minor changes to turn the chatter feature into a corresponding &amp;quot;addon&amp;quot; - not unlike fgcamera ...&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://forum.flightgear.org/viewtopic.php?p=288392#p288392 &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re: Whatever happened to radom radio  &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Hooray &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Jun 11th, 2016 &lt;br /&gt;
  |added  =  Jun 11th, 2016 &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We should absolutely stop telling anyone to edit preferences.xml in FG_ROOT; any documentation or advice which says to should be changes ASAP. &amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://forum.flightgear.org/viewtopic.php?p=192632#p192632 &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re: NavCache:init failed:Sqlite error:Sqlite API abuse &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; zakalawe &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Oct 26th, 2013 &lt;br /&gt;
  |added  =  Oct 26th, 2013 &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As of 12/2017, the addon API is in the process of being significantly updated &amp;lt;ref&amp;gt;https://sourceforge.net/p/flightgear/mailman/message/36146017/&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;https://sourceforge.net/p/flightgear/mailman/message/36150159/&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;https://sourceforge.net/p/flightgear/mailman/message/36150444/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of Addons ==&lt;br /&gt;
You can find the official repository at {{fgaddon source|path=Addons}}&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/slawekmikula/flightgear-addon-hudheli Additional Heli HUD's] - ([https://github.com/slawekmikula/flightgear-addon-hudheli/blob/master/doc/manual.md manual]) - encapsulation of HeliHUD package as an addon&lt;br /&gt;
* [https://github.com/PlayeRom/flightgear-addon-aerotow-everywhere Aerotow Everywhere] AI towing aircraft for gliders at every airport.&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://forum.flightgear.org/viewtopic.php?t=40742&lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re: Aerotow Everywhere &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Roman Ludwicki (PlayeRom) &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Aug 14th, 2022&lt;br /&gt;
  |added  =  Aug 14th, 2022&lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [https://github.com/SP-NTX/AnotherGUI AnotherGUI] - An add-on that adds a new GUI style.&lt;br /&gt;
* ATC Chatter (ported by Torsten) {{progressbar|100}}&lt;br /&gt;
* [[Cargo Towing Addon]] &amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://forum.flightgear.org/viewtopic.php?t=36824&lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re: Cargo Towing Addon &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Wayne Bragg (wlbragg) &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  &lt;br /&gt;
  |added  =  &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* cockpit-view (work in progress by wkitty42)&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://forum.flightgear.org/viewtopic.php?p=316498#p316498 &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re:  &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; wkitty42 &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Aug 13th, 2017 &lt;br /&gt;
  |added  =  Aug 13th, 2017 &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [[Earthview#Customization]] - High resolution customization&lt;br /&gt;
* [[FaceTrackNoIR]] (ported by HHS)&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/36454826/&lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re:  &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Unknown, HHS&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |date   =  Nov 1th, 2018 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt; - An addon to interface this [[Head tracking|head tracker]] with FlightGear&lt;br /&gt;
* [https://forum.flightgear.org/viewtopic.php?f=5&amp;amp;t=24792 Fencemaker] (Eases creating Fence-like scenery objects. Originally by VaLeo, converted to an addon by sfr) - ([https://www.mediafire.com/file/cf0la63v9g352md/fencemaker_addon.zip/file download])&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    = https://forum.flightgear.org/viewtopic.php?f=5&amp;amp;t=24792&amp;amp;start=45#p390066&lt;br /&gt;
  |title  = &amp;lt;nowiki&amp;gt; Re:  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |author = &amp;lt;nowiki&amp;gt; Stefan Frank &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |maintainer = &amp;lt;nowiki&amp;gt; Stefan Frank &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |date   = Aug 8th, 2021&lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [https://github.com/PlayeRom/flightgear-addon-fgcamera FGCamera] - ([https://github.com/PlayeRom/flightgear-addon-fgcamera/blob/master/Docs/manual.md manual]) - [[FGCamera | Wiki Page]]&lt;br /&gt;
* [[FGPlot]]&lt;br /&gt;
* [[Ground Services]] (ported by ThomasS)&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://forum.flightgear.org/viewtopic.php?p=316400#p316400 &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re:  &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; ThomasS &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Aug 12th, 2017 &lt;br /&gt;
  |added  =  Aug 12th, 2017 &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* {{fgaddon source|path=Addons/Headtracker/|text=Headtracker addon}} Helps integrate FaceTrackNoIR and opentrack with FlightGear.&lt;br /&gt;
* [[HighAirTrader]] An in-sim mini game in which you transport goods to different airports.&lt;br /&gt;
* [https://github.com/tdammers/fg-hoppie-acars Hoppie ACARS client] - connect to [http://www.hoppie.nl/acars Hoppie's ACARS], used on VATSIM and other networks.&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Addons/Illuminator/ Illuminator] - configure lights attached to 3D models (e.g. taxi light, landing light or a light attached to a scenery model like a light pole) at runtime.&lt;br /&gt;
* [https://github.com/slawekmikula/flightgear-addon-protocolkml KML Exporter (Google Earth)] - ([https://github.com/slawekmikula/flightgear-addon-protocolkml/blob/master/doc/manual.md manual])&lt;br /&gt;
* [[Landing Rate addon]] [https://forum.flightgear.org/viewtopic.php?f=6&amp;amp;t=33101&amp;amp;p=327787#p327787]&lt;br /&gt;
* [https://github.com/slawekmikula/flightgear-addon-linuxtrack LinuxTrack Head Tracker integration] - ([https://github.com/slawekmikula/flightgear-addon-linuxtrack/blob/master/doc/manual.md manual])&lt;br /&gt;
* [https://github.com/slawekmikula/flightgear-addon-littlenavmap LittleNavMap integration] - ([https://github.com/slawekmikula/flightgear-addon-littlenavmap/blob/master/doc/manual.md manual])&lt;br /&gt;
* [https://github.com/PlayeRom/flightgear-addon-logbook Logbook] all your flights to CSV file.&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://forum.flightgear.org/viewtopic.php?t=41070&lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re: Logbook Add-on &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Roman Ludwicki (PlayeRom) &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Dec 11th, 2022&lt;br /&gt;
  |added  =  Dec 11th, 2022&lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [https://gitlab.com/mdanil/flightgear-hax mdanilov hax!]: landing evaluation and aircraft development tools, TerraSync toggler&lt;br /&gt;
* [[Model Cockpit View]] &lt;br /&gt;
* [https://github.com/SP-NTX/MPChatImprovments MPChatImprovments] Multi-key commands for Multiplayer, new features for chat,...&lt;br /&gt;
* [[Oscilloscope addon]] - Allows displaying a property of Nasal function over time&lt;br /&gt;
* [[PAR instrument]] - Precision Approach Radar and Ground Controlled Approach&lt;br /&gt;
* [[Red Griffin ATC]] - Speaking Air Traffic Controller&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://forum.flightgear.org/viewtopic.php?f=6&amp;amp;t=36755 &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re:  &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; RedGriffin &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Jan 6th, 2020 &lt;br /&gt;
  |added  =  Jan 6th, 2020 &lt;br /&gt;
  |script_version = 1.0.0 RC2 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [https://github.com/tdammers/fg-simbrief-addon SimBrief import] - Import flightplans, weights, fuel, and winds alof, from SimBrief.&lt;br /&gt;
* [[Spoken ATC]] (ported by Torsten)&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://forum.flightgear.org/viewtopic.php?p=314095#p314095 &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re:  &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Torsten &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Jul 10th, 2017 &lt;br /&gt;
  |added  =  Jul 10th, 2017 &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [[Spoken GCA]] - An offline ground controlled approach (GCA) addon&lt;br /&gt;
* [[Log time-stamper add-on]] - Will print simulated UTC time, real local time, and/or real UTC time time-stamps at configurable intervals to the console and log.&lt;br /&gt;
* [https://gitlab.com/mdanil/flightgear-mickey Tiny HUD for mouse flying in FlightGear] - Visual feedback for mouse flying, to make up for mouse's lack of self-centering&lt;br /&gt;
* [https://github.com/slawekmikula/flightgear-addon-vfrflight VFRFlight integration] - ([https://github.com/slawekmikula/flightgear-addon-vfrflight/blob/master/doc/manual.md manual])&lt;br /&gt;
* [https://github.com/slawekmikula/flightgear-addon-vfrnavigator VFR Flying Helper] - ([https://github.com/slawekmikula/flightgear-addon-vfrnavigator/blob/master/doc/usage.md manual])&lt;br /&gt;
* [[YASim Development Tools]] (by jsb)&lt;br /&gt;
* [https://github.com/hbeni/fgfs-noGroundDamage noGroundDamage] - Addon to temporarily disable damage after landing and for ground operations for the c172/c182&lt;br /&gt;
&lt;br /&gt;
== Experimental Addons ==&lt;br /&gt;
&lt;br /&gt;
Addons which are in the development stage/unfinished but can be used as a quick view of addon functionality&lt;br /&gt;
* [https://github.com/slawekmikula/flightgear-addon-missions FlightGear Missions addon] - Add-on for missions/adventures code&lt;br /&gt;
&lt;br /&gt;
== Ideas ==&lt;br /&gt;
=== Hooking into features using legacy OpenGL code ===&lt;br /&gt;
{{See also|Unifying the 2D rendering backend via canvas}}&lt;br /&gt;
In 09/2018, James suggested that legacy features using raw OpenGL calls (e.g. HUD/2D panels) could be easily replaced via scripted Canvas/Nasal solutions at the mere cost of providing a mechanism to hook into the legacy code implementing these features (namely, the HUD/instrumentation subsystems) &amp;lt;ref&amp;gt;https://sourceforge.net/p/flightgear/mailman/message/36399261/&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;https://sourceforge.net/p/flightgear/mailman/message/36399261/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalog &amp;amp; Package Manager support ===&lt;br /&gt;
if this works with more complex, pre-existing addons such as [[Bombable]], where the file layout is a replica of the old FGData layout, these types of mature addons might be better as SourceForge FlightGear sub-projects rather than being copied into FGAddon. Maybe the config file and nasal script could be used to automate the installation process ?&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/35953179/ &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re: [Flightgear-devel] Simple API for creating FlightGear&lt;br /&gt;
 addons/plugins &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Edward d'Auvergne &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Jul 19th, 2017 &lt;br /&gt;
  |added  =  Jul 19th, 2017 &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
The [[Bombable]] addon is one of the most popular addons out there, and a large number of aircraft in FGAddon have bombable support, so it is worth not forgetting about. Especially if the addon system one day becomes automated through a [[Catalog metadata|catalog.xml type system]]&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/35953650/ &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re: [Flightgear-devel] Simple API for creating FlightGear&lt;br /&gt;
 addons/plugins &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Edward d'Auvergne &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Jul 19th, 2017 &lt;br /&gt;
  |added  =  Jul 19th, 2017 &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{Appendix}}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[FG Add-on FAQ]]&lt;br /&gt;
* [[Modules.nas]]&lt;br /&gt;
* [[FlightGear configuration via XML]]&lt;br /&gt;
* [[FlightGear configuration via XML#preferences.xml]]&lt;br /&gt;
* [[Nasal]]&lt;br /&gt;
* [[Property tree]]&lt;br /&gt;
* [[Properties persistent between sessions]]&lt;br /&gt;
* [[PropertyList XML File]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* {{forum link|t=32561|title=New Feature: Addon - &amp;quot;API&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
=== Readme files ===&lt;br /&gt;
* {{readme file|add-ons}}&lt;br /&gt;
* {{readme file|gui}} - Details on how to add menus and custom dialogs.&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
==== FGAddon ====&lt;br /&gt;
* {{fgaddon source|path=Addons/Skeleton}} - Skeleton addon to be used as a template.&lt;br /&gt;
&lt;br /&gt;
==== FGData ====&lt;br /&gt;
* {{fgdata source|path=Nasal/addons.nas}}&lt;br /&gt;
&lt;br /&gt;
==== FlightGear ====&lt;br /&gt;
* {{flightgear source|path=src/Main/options.cxx}}&lt;br /&gt;
* {{flightgear source|path=src/Add-ons/}}&lt;br /&gt;
&lt;br /&gt;
[[Category:FlightGear addons| ]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Debug.nas&amp;diff=140836</id>
		<title>Debug.nas</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Debug.nas&amp;diff=140836"/>
		<updated>2024-11-03T16:39:12Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Redirected page to Nasal library/debug&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Nasal library/debug]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Nasal_Modules&amp;diff=140835</id>
		<title>Nasal Modules</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Nasal_Modules&amp;diff=140835"/>
		<updated>2024-11-03T16:37:19Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* debug.nas */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
This page is meant to help document the purpose and function of the standard Nasal modules provided in the FlightGear base package ([[$FG_ROOT]]/Nasal). Ideally, all modules will be introduced along with a description, provided methods and example source code.&lt;br /&gt;
&lt;br /&gt;
{{tip|see [[Nasal Initialization]] for information on different module types and how Nasal and its modules are initialized.}}&lt;br /&gt;
&lt;br /&gt;
= aircraft.nas =&lt;br /&gt;
This module provide basic functions and classes for use in aircraft specific Nasal context.&lt;br /&gt;
= atc-chatter.nas =&lt;br /&gt;
Simple sequenced ATC background chatter function&lt;br /&gt;
= bits.nas =&lt;br /&gt;
bit level manipulation routines&lt;br /&gt;
= controls.nas =&lt;br /&gt;
controls related functions&lt;br /&gt;
= debug.nas =&lt;br /&gt;
see [[Nasal library/debug]]&lt;br /&gt;
&lt;br /&gt;
= dynamic_view.nas =&lt;br /&gt;
Dynamic Cockpit View manager. Tries to simulate the pilot's most likely deliberate view direction. Doesn't consider forced view changes due to acceleration.&lt;br /&gt;
= fuel.nas =&lt;br /&gt;
Manages consumables&lt;br /&gt;
= geo.nas =&lt;br /&gt;
geo functions&lt;br /&gt;
&lt;br /&gt;
= modules.nas =&lt;br /&gt;
[[Modules.nas]] - support for runtime re-loadable Nasal modules&lt;br /&gt;
&lt;br /&gt;
= props.nas =&lt;br /&gt;
[[Nasal library/props|Props.nas]] - functions to work with FlightGear's [[Property tree]]&lt;br /&gt;
&lt;br /&gt;
also see: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg10326.html&lt;br /&gt;
and: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg18962.html&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=140763</id>
		<title>Aircraft properties reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=140763"/>
		<updated>2024-10-16T21:06:03Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Annunciators */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PropertyTree}}&lt;br /&gt;
&lt;br /&gt;
This is a generic '''aircraft properties reference'''.  There are many properties that are very common in aircraft, and many of them are present even in a very simple aircraft.  However, a complete description that matches all the properties is very unlikely to be written, as aircraft can be very different from each other.&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|2}}&lt;br /&gt;
&lt;br /&gt;
== What are properties? ==&lt;br /&gt;
{{main article|Property tree}}&lt;br /&gt;
=== The property tree ===&lt;br /&gt;
Most parts of FlightGear communicate with each other through key-value pair properties in the [[property tree]].  The properties represent both the input from the pilot, the values determining the position and velocity of the aircraft, the values used for animating the aircraft, and pretty much anything else.&lt;br /&gt;
&lt;br /&gt;
While many properties will be common between most aircraft, many properties will also be different between aircraft.  This becomes obvious if one consider the many different configurations (aircraft/helicopter/car, control surface and landing gear layout, number and locations of engines, etc) and propulsions systems (types of engines, types of fuels etc.) an aircraft can have.  There are also different flight dynamic models (FDMs) that have different needs.  In addition many properties will by necessity be aircraft specific, though developers should make a conscious effort to have properties map to more common ones if that is possible.&lt;br /&gt;
&lt;br /&gt;
=== Where are the properties defined? ===&lt;br /&gt;
There are a couple ways that the properties are set, but a fair amount of them just &amp;quot;appear&amp;quot; without being documented anywhere.  There are several places to look for properties.  One is in the aircraft files, starting from the aircraft specific [[aircraft-set.xml]] file, another is the [[Nasal]] files, and the last place (and often most useful!) is &amp;quot;grepping&amp;quot; (searching) through the C++ code.&lt;br /&gt;
&lt;br /&gt;
To determine how a property works and what it does often requires looking through any code that uses it.  This is a part of FlightGear that we could certainly document better&lt;br /&gt;
&lt;br /&gt;
== Annunciators ==&lt;br /&gt;
The /instrumentation/annunciators section shall provide a central place for&lt;br /&gt;
&lt;br /&gt;
* aircrafts to write annunciator status data&lt;br /&gt;
* 3D aircraft models and external devices (like joysticks, yokes, throttle quadrants or custom made cockpit hardware) to read such data and drive status lights etc.&lt;br /&gt;
&lt;br /&gt;
Some of the props are automatically calculated by property rules in &amp;lt;code&amp;gt;$FGDATA/Aircraft/Generic/generic-annunciators.xml&amp;lt;/code&amp;gt; (available since FG 2024.1) other properties have to be calculated by the actual aircraft.&lt;br /&gt;
&lt;br /&gt;
The aircraft.nas module provides aircraft.light which allows easy implementation of blinking lights. Such lights have a bool property 'state' which tells if the light is on or off.&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/annunciators/doors&lt;br /&gt;
/instrumentation/annunciators/master-caution/state  # aircraft.light&lt;br /&gt;
/instrumentation/annunciators/master-warning/state  # aircraft.light&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/enabled&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/alt&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/apr&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/hdg&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/ias&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/nav&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/rev&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/vs&lt;br /&gt;
/instrumentation/annunciators/autoflight/flightdirector/enabled&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/engines/&lt;br /&gt;
/instrumentation/annunciators/engines/apu/enabled&lt;br /&gt;
/instrumentation/annunciators/engines/apu/fire&lt;br /&gt;
# summary props, 'sum' of all engines&lt;br /&gt;
/instrumentation/annunciators/engines/fire&lt;br /&gt;
/instrumentation/annunciators/engines/oil-pressure-low&lt;br /&gt;
/instrumentation/annunciators/engines/starter&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# for &amp;lt;gear-name&amp;gt; in {nose, left, right}&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/down&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/in-transition&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/unsafe&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/up&lt;br /&gt;
# gear summary&lt;br /&gt;
/instrumentation/annunciators/gear/down&lt;br /&gt;
/instrumentation/annunciators/gear/in-transition&lt;br /&gt;
/instrumentation/annunciators/gear/unsafe&lt;br /&gt;
/instrumentation/annunciators/gear/up &lt;br /&gt;
/instrumentation/annunciators/gear/parking-brake&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/systems/anti-ice/enabled&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/aux-pump&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/system[]/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/system[]/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/vacuum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Consumables ==&lt;br /&gt;
:''See also [[#Fuel]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lb&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lbs&lt;br /&gt;
/consumables/fuel/tank[%d]/level-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/capacity-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/density-ppg&lt;br /&gt;
/consumables/fuel/total-fuel-lbs&lt;br /&gt;
/consumables/fuel/total-gal_us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Controls ==&lt;br /&gt;
These properties are meant to represent the various cockpit controls (levers, switches, etc.)  Consider these the pilot input.&lt;br /&gt;
&lt;br /&gt;
=== Recommended usage ===&lt;br /&gt;
&lt;br /&gt;
* Animation of control elements (levers, switches, etc) themself in the 3D model of the cockpit&lt;br /&gt;
* As input to aircraft system simulation, e.g. hydraulics or electrical systems &lt;br /&gt;
&lt;br /&gt;
Avoid refering to control props directly for animating parts of the 3D model if there is an aircraft system (electric, hydraulic, ...) involved. &lt;br /&gt;
&lt;br /&gt;
Better use XML property rules (e.g. logic or filter) that calculate the component state from /controls/foo as well as &amp;quot;power available&amp;quot;, &amp;quot;component is serviceable&amp;quot; etc. &lt;br /&gt;
&lt;br /&gt;
=== Anti-ice ===&lt;br /&gt;
These properties control the various anti-ice properties that may be present in an aircraft.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/anti-ice/wing-heat&lt;br /&gt;
/controls/anti-ice/pitot-heat&lt;br /&gt;
/controls/anti-ice/wiper&lt;br /&gt;
/controls/anti-ice/window-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/carb-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/inlet-heat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== APU ===&lt;br /&gt;
These properties control any auxiliary power unit, in essence a small turbine engine driving generators, hydraulic pumps etc. before and after the aircraft's engines are up an running.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/APU/off-start-run&lt;br /&gt;
/controls/APU/fire-switch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Armament ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/armament/master-arm&lt;br /&gt;
/controls/armament/station-select&lt;br /&gt;
/controls/armament/release-all&lt;br /&gt;
/controls/armament/station[%d]/stick-size&lt;br /&gt;
/controls/armament/station[%d]/release-stick&lt;br /&gt;
/controls/armament/station[%d]/release-all&lt;br /&gt;
/controls/armament/station[%d]/jettison-all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Autoflight ===&lt;br /&gt;
These properties control the autopilot on certain airplanes. For [[IT-AUTOFLIGHT]] based systems, see [[IT-AUTOFLIGHT#Interface_Reference|here]].&lt;br /&gt;
&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/autoflight/autopilot[%d]/engage&lt;br /&gt;
/controls/autoflight/autothrottle-arm&lt;br /&gt;
/controls/autoflight/autothrottle-engage&lt;br /&gt;
/controls/autoflight/heading-select&lt;br /&gt;
/controls/autoflight/altitude-select&lt;br /&gt;
/controls/autoflight/bank-angle-select&lt;br /&gt;
/controls/autoflight/vertical-speed-select&lt;br /&gt;
/controls/autoflight/speed-select&lt;br /&gt;
/controls/autoflight/mach-select&lt;br /&gt;
/controls/autoflight/vertical-mode&lt;br /&gt;
/controls/autoflight/lateral-mode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Electric ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/electric/battery-switch&lt;br /&gt;
/controls/electric/external-power&lt;br /&gt;
/controls/electric/APU-generator&lt;br /&gt;
/controls/electric/engine[%d]/generator&lt;br /&gt;
/controls/electric/engine[%d]/bus-tie&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Engines ===&lt;br /&gt;
Engines are numbered engine[0] for a single engine to engine[0] to engine[3] for a 747 for example. (The model allows for up to 12 engines rumour has it ;-)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/engines/throttle_idle&lt;br /&gt;
/controls/engines/engine[%d]/throttle&lt;br /&gt;
/controls/engines/engine[%d]/starter&lt;br /&gt;
/controls/engines/engine[%d]/fuel-pump&lt;br /&gt;
/controls/engines/engine[%d]/fire-switch&lt;br /&gt;
/controls/engines/engine[%d]/fire-bottle-discharge&lt;br /&gt;
/controls/engines/engine[%d]/cutoff&lt;br /&gt;
/controls/engines/engine[%d]/mixture&lt;br /&gt;
/controls/engines/engine[%d]/propeller-pitch&lt;br /&gt;
/controls/engines/engine[%d]/magnetos&lt;br /&gt;
/controls/engines/engine[%d]/boost&lt;br /&gt;
/controls/engines/engine[%d]/WEP&lt;br /&gt;
/controls/engines/engine[%d]/cowl-flaps-norm&lt;br /&gt;
/controls/engines/engine[%d]/feather&lt;br /&gt;
/controls/engines/engine[%d]/ignition&lt;br /&gt;
/controls/engines/engine[%d]/augmentation&lt;br /&gt;
/controls/engines/engine[%d]/afterburner&lt;br /&gt;
/controls/engines/engine[%d]/reverser&lt;br /&gt;
/controls/engines/engine[%d]/water-injection&lt;br /&gt;
/controls/engines/engine[%d]/condition&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Flight controls ===&lt;br /&gt;
These properties control the flight controls surfaces, though often through a mechanical, analog or digital flight control system (FCS) that may or may not be modeled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/flight/aileron&lt;br /&gt;
/controls/flight/aileron-trim&lt;br /&gt;
/controls/flight/elevator&lt;br /&gt;
/controls/flight/elevator-trim&lt;br /&gt;
/controls/flight/rudder&lt;br /&gt;
/controls/flight/rudder-trim&lt;br /&gt;
/controls/flight/flaps&lt;br /&gt;
/controls/flight/slats&lt;br /&gt;
/controls/flight/BLC			// Boundary Layer Control&lt;br /&gt;
/controls/flight/spoilers&lt;br /&gt;
/controls/flight/speedbrake&lt;br /&gt;
/controls/flight/wing-sweep&lt;br /&gt;
/controls/flight/wing-fold&lt;br /&gt;
/controls/flight/drag-chute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The positions of the controls are usually put in &amp;lt;code&amp;gt;/surface-positions/&amp;lt;/code&amp;gt; at the discretion of the aircraft designer. These usually drive the animations of the control surfaces. They are either normalized (like &amp;lt;code&amp;gt;/surface-positions/elevator-pos-norm&amp;lt;/code&amp;gt;) or in degrees, and sometimes the aileron is split left/right.&lt;br /&gt;
&lt;br /&gt;
=== Fuel ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/fuel/dump-valve&lt;br /&gt;
/controls/fuel/tank[%d]/fuel_selector&lt;br /&gt;
/controls/fuel/tank[%d]/to_engine&lt;br /&gt;
/controls/fuel/tank[%d]/to_tank&lt;br /&gt;
/controls/fuel/tank[%d]/boost-pump[%d]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Gear ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/gear/brake-left&lt;br /&gt;
/controls/gear/brake-right&lt;br /&gt;
/controls/gear/brake-parking&lt;br /&gt;
/controls/gear/steering // Used if rudder is not sufficient for control of steering&lt;br /&gt;
/controls/gear/gear-down&lt;br /&gt;
/controls/gear/antiskid // Deprecated?&lt;br /&gt;
/controls/gear/tailhook&lt;br /&gt;
/controls/gear/tailwheel-lock&lt;br /&gt;
/controls/gear/wheel[%d]/alternate-extension&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Hydraulics ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/hydraulic/system[%d]/engine-pump&lt;br /&gt;
/controls/hydraulic/system[%d]/electric-pump&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Lights ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/lighting/landing-lights&lt;br /&gt;
/controls/lighting/turn-off-lights&lt;br /&gt;
/controls/lighting/formation-lights&lt;br /&gt;
/controls/lighting/taxi-light&lt;br /&gt;
/controls/lighting/logo-lights&lt;br /&gt;
/controls/lighting/nav-lights&lt;br /&gt;
/controls/lighting/beacon&lt;br /&gt;
/controls/lighting/strobe&lt;br /&gt;
/controls/lighting/panel-norm&lt;br /&gt;
/controls/lighting/instruments-norm&lt;br /&gt;
/controls/lighting/dome-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pneumatic ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pneumatic/APU-bleed&lt;br /&gt;
/controls/pneumatic/engine[%d]/bleed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pressurization ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pressurization/mode&lt;br /&gt;
/controls/pressurization/dump&lt;br /&gt;
/controls/pressurization/outflow-valve&lt;br /&gt;
/controls/pressurization/pack[%d]/pack-on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Seat ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/seat/vertical-adjust&lt;br /&gt;
/controls/seat/fore-aft-adjust&lt;br /&gt;
/controls/seat/cmd_selector_valve&lt;br /&gt;
/controls/seat/eject[%d]/initiate&lt;br /&gt;
/controls/seat/eject[%d]/status&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Engines ==&lt;br /&gt;
Status of engines. See also: /controls/engines/ &lt;br /&gt;
=== Common ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/fuel-flow-gph&lt;br /&gt;
/engines/engine[%d]/fuel-flow_pph&lt;br /&gt;
/engines/engine[%d]/thrust_lb&lt;br /&gt;
/engines/engine[%d]/running&lt;br /&gt;
/engines/engine[%d]/starter&lt;br /&gt;
/engines/engine[%d]/cranking&lt;br /&gt;
/engines/engine[%d]/fire&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turbine ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/n1&lt;br /&gt;
/engines/engine[%d]/n2&lt;br /&gt;
/engines/engine[%d]/epr&lt;br /&gt;
/engines/engine[%d]/augmentation&lt;br /&gt;
/engines/engine[%d]/water-injection&lt;br /&gt;
/engines/engine[%d]/ignition&lt;br /&gt;
/engines/engine[%d]/nozzle-pos-norm&lt;br /&gt;
/engines/engine[%d]/inlet-pos-norm&lt;br /&gt;
/engines/engine[%d]/reversed&lt;br /&gt;
/engines/engine[%d]/cutoff&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Piston ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/mp-osi&lt;br /&gt;
/engines/engine[%d]/egt-degf&lt;br /&gt;
/engines/engine[%d]/oil-temperature-degf&lt;br /&gt;
/engines/engine[%d]/oil-pressure-psi&lt;br /&gt;
/engines/engine[%d]/cht-degf&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Propeller ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
/engines/engine[%d]/pitch&lt;br /&gt;
/engines/engine[%d]/torque&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Flight Dynamics Model ==&lt;br /&gt;
=== Position ===&lt;br /&gt;
This will return the current position of the aircraft within FlightGear. This is also the stuff that is transmitted in [[Howto:Multiplayer|multiplayer]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/position/&lt;br /&gt;
/position/altitiude-ft ()&lt;br /&gt;
/position/altitude-agl-ft (22.46983965)&lt;br /&gt;
/position/altitude-ft (28.24368289)&lt;br /&gt;
/position/ground-elev-ft (-0.43513529)&lt;br /&gt;
/position/ground-elev-m (-0.1326292364)&lt;br /&gt;
/position/latitude-deg (37.61371436)&lt;br /&gt;
/position/latitude-string (37*36 49.4N)&lt;br /&gt;
/position/longitude-deg (-122.3576508)&lt;br /&gt;
/position/longitude-string (-122*21 27.5W)&lt;br /&gt;
/position/sea-level-radius-ft (20899648.76)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Orientation ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/orientation/roll-deg&lt;br /&gt;
/orientation/pitch-deg&lt;br /&gt;
/orientation/heading-deg&lt;br /&gt;
&lt;br /&gt;
/orientation/roll-rate-degps&lt;br /&gt;
/orientation/pitch-rate-degps&lt;br /&gt;
/orientation/yaw-rate-degps&lt;br /&gt;
&lt;br /&gt;
/orientation/side-slip-rad&lt;br /&gt;
/orientation/side-slip-deg&lt;br /&gt;
/orientation/alpha-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Velocities ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/velocities/airspeed-kt&lt;br /&gt;
/velocities/mach&lt;br /&gt;
/velocities/speed-north-fps&lt;br /&gt;
/velocities/speed-east-fps&lt;br /&gt;
/velocities/speed-down-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/uBody-fps&lt;br /&gt;
/velocities/vBody-fps&lt;br /&gt;
/velocities/wBody-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/vertical-speed-fps&lt;br /&gt;
/velocities/glideslope&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Acceleration ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/accelerations/nlf&lt;br /&gt;
&lt;br /&gt;
/accelerations/ned/north-accel-fps_sec&lt;br /&gt;
/accelerations/ned/east-accel-fps_sec&lt;br /&gt;
/accelerations/ned/down-accel-fps_sec&lt;br /&gt;
&lt;br /&gt;
/accelerations/pilot/x-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/y-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/z-accel-fps_sec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Gear ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gear/serviceable&lt;br /&gt;
/gear/gear[%d]/cast-angle-deg // The angle of the wheel where 0 is pointing straight forward&lt;br /&gt;
/gear/gear[%d]/compression-m&lt;br /&gt;
/gear/gear[%d]/compression-norm&lt;br /&gt;
/gear/gear[%d]/ground-friction-factor&lt;br /&gt;
/gear/gear[%d]/ground-is-solid&lt;br /&gt;
/gear/gear[%d]/has-brake&lt;br /&gt;
/gear/gear[%d]/rollspeed-ms // Speed of the wheel's rotation in meters per second&lt;br /&gt;
/gear/gear[%d]/wow // Weight-on-wheel&lt;br /&gt;
/gear/gear[%d]/xoffset-in&lt;br /&gt;
/gear/gear[%d]/yoffset-in&lt;br /&gt;
/gear/gear[%d]/zoffset-in&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf[%d]/&lt;br /&gt;
/instrumentation/airspeed-indicator/&lt;br /&gt;
/instrumentation/altimeter/&lt;br /&gt;
/instrumentation/annunciator/&lt;br /&gt;
/instrumentation/attitude-indicator/&lt;br /&gt;
/instrumentation/clock/&lt;br /&gt;
/instrumentation/comm[%d]/&lt;br /&gt;
/instrumentation/dme/&lt;br /&gt;
/instrumentation/efis/&lt;br /&gt;
/instrumentation/encoder/&lt;br /&gt;
/instrumentation/flightdirector/&lt;br /&gt;
/instrumentation/gps/&lt;br /&gt;
/instrumentation/gps-annunciator/&lt;br /&gt;
/instrumentation/heading-indicator/&lt;br /&gt;
/instrumentation/heading-indicator-fg/&lt;br /&gt;
/instrumentation/magnetic-compass/&lt;br /&gt;
/instrumentation/marker-beacon/&lt;br /&gt;
/instrumentation/nav[%d]/&lt;br /&gt;
/instrumentation/radar/&lt;br /&gt;
/instrumentation/slip-skid-ball/&lt;br /&gt;
/instrumentation/tacan[%d]/&lt;br /&gt;
/instrumentation/transponder/&lt;br /&gt;
/instrumentation/turn-indicator/&lt;br /&gt;
/instrumentation/vertical-speed-indicator/&lt;br /&gt;
/instrumentation/wxradar/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation ADF ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf[%d]/adf-btn&lt;br /&gt;
/instrumentation/adf[%d]/bro-btn&lt;br /&gt;
/instrumentation/adf[%d]/display-mode&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/running&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/start-time&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/time&lt;br /&gt;
/instrumentation/adf[%d]/error-deg&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/running&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/start-time&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/time&lt;br /&gt;
/instrumentation/adf[%d]/flt-btn&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/dial-1-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/dial-100-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/selected-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/standby-khz&lt;br /&gt;
/instrumentation/adf[%d]/frq-btn&lt;br /&gt;
/instrumentation/adf[%d]/ident&lt;br /&gt;
/instrumentation/adf[[%d]/ident-audible&lt;br /&gt;
/instrumentation/adf[%d]/in-range&lt;br /&gt;
/instrumentation/adf[%d]/indicated-bearing-deg&lt;br /&gt;
/instrumentation/adf[%d]/mode&lt;br /&gt;
/instrumentation/adf[%d]/model&lt;br /&gt;
/instrumentation/adf[%d]/operable&lt;br /&gt;
/instrumentation/adf[%d]/power-btn&lt;br /&gt;
/instrumentation/adf[%d]/right-display&lt;br /&gt;
/instrumentation/adf[%d]/rotation-deg&lt;br /&gt;
/instrumentation/adf[%d]/serviceable&lt;br /&gt;
/instrumentation/adf[%d]/set-btn&lt;br /&gt;
/instrumentation/adf[%d]/volume&lt;br /&gt;
/instrumentation/adf[%d]/volume-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation comm radio ===&lt;br /&gt;
See [[Aircraft_properties_reference/Instrumentation/COMM]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation NAV radio ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/nav[%d]/audio-btn&lt;br /&gt;
/instrumentation/nav[%d]/back-course-btn&lt;br /&gt;
/instrumentation/nav[%d]/cdi/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/crosstrack-error-m&lt;br /&gt;
/instrumentation/nav[%d]/crosstrack-heading-error-deg&lt;br /&gt;
/instrumentation/nav[%d]/data-is-valid&lt;br /&gt;
/instrumentation/nav[%d]/dme-in-range&lt;br /&gt;
/instrumentation/nav[%d]/filtered-cdiNAV0-deflection&lt;br /&gt;
/instrumentation/nav[%d]/filtered-gsNAV0-deflection&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/dial-khz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/dial-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/is-localizer-frequency&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/selected-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/selected-mhz-fmt&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/standby-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/standby-mhz-fmt&lt;br /&gt;
/instrumentation/nav[%d]/from-flag&lt;br /&gt;
/instrumentation/nav[%d]/frq-swap-btn&lt;br /&gt;
/instrumentation/nav[%d]/gs/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/gs-direct-deg&lt;br /&gt;
/instrumentation/nav[%d]/gs-distance&lt;br /&gt;
/instrumentation/nav[%d]/gs-in-range&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection-deg&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection-norm&lt;br /&gt;
/instrumentation/nav[%d]/gs-rate-of-climb&lt;br /&gt;
/instrumentation/nav[%d]/gs-rate-of-climb-fpm&lt;br /&gt;
/instrumentation/nav[%d]/has-gs&lt;br /&gt;
/instrumentation/nav[%d]/heading-deg&lt;br /&gt;
/instrumentation/nav[%d]/heading-needle-deflection&lt;br /&gt;
/instrumentation/nav[%d]/heading-needle-deflection-norm&lt;br /&gt;
/instrumentation/nav[%d]/ident&lt;br /&gt;
/instrumentation/nav[%d]/ident-audible&lt;br /&gt;
/instrumentation/nav[%d]/in-range&lt;br /&gt;
/instrumentation/nav[%d]/nav-distance&lt;br /&gt;
/instrumentation/nav[%d]/nav-id&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc1&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc2&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc3&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc4&lt;br /&gt;
/instrumentation/nav[%d]/nav-loc&lt;br /&gt;
/instrumentation/nav[%d]/operable&lt;br /&gt;
/instrumentation/nav[%d]/power-btn&lt;br /&gt;
/instrumentation/nav[%d]/radials/actual-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/reciprocal-radial-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/selected-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/target-auto-hdg-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/arget-radial-deg&lt;br /&gt;
/instrumentation/nav[%d]/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/signal-quality-norm&lt;br /&gt;
/instrumentation/nav[%d]/slaved-to-gps&lt;br /&gt;
/instrumentation/nav[%d]/time-to-intercept-sec&lt;br /&gt;
/instrumentation/nav[%d]/to-flag&lt;br /&gt;
/instrumentation/nav[%d]/to-from/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/volume&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation Tacan ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/tacan[%d]/display/channel&lt;br /&gt;
/instrumentation/tacan[%d]/display/x-shift&lt;br /&gt;
/instrumentation/tacan[%d]/display/y-shift&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[1]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[2]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[3]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[4]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-mhz&lt;br /&gt;
/instrumentation/tacan[%d]/ident&lt;br /&gt;
/instrumentation/tacan[%d]/in-range&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-bearing-true-deg&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-distance-nm&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-ground-speed-kt&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-time-min&lt;br /&gt;
/instrumentation/tacan[%d]/name&lt;br /&gt;
/instrumentation/tacan[%d]/serviceable&lt;br /&gt;
/instrumentation/tacan[%d]/switch-position&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rotors (YASim only) ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/rotors/gear/torque-sound-filtered // Unused?&lt;br /&gt;
/rotors/gear/total-torque&lt;br /&gt;
/rotors/{name}/balance&lt;br /&gt;
/rotors/{name}/blade[%d]/flap-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/incidence-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/position-deg // Position relative to model&lt;br /&gt;
/rotors/{name}/bladesvisible // Used for animations&lt;br /&gt;
/rotors/{name}/cone%d-deg //e.g. cone-deg or cone2-deg&lt;br /&gt;
/rotors/{name}/roll-deg&lt;br /&gt;
/rotors/{name}/rpm&lt;br /&gt;
/rotors/{name}/stall&lt;br /&gt;
/rotors/{name}/stall-filtered&lt;br /&gt;
/rotors/{name}/tilt&lt;br /&gt;
/rotors/{name}/torque&lt;br /&gt;
/rotors/{name}/yaw-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For how to animate rotors using these properties, see [[Howto:Animate helicopters]].&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Aircraft-set.xml]]&lt;br /&gt;
* [[Multiplayer protocol]]&lt;br /&gt;
* [[Property browser]]&lt;br /&gt;
* [[PropertyList XML files]]&lt;br /&gt;
* [[Property tree]]&lt;br /&gt;
&lt;br /&gt;
=== Readme files ===&lt;br /&gt;
* {{readme file|properties}}&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
==== Consumables ====&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.hxx}}&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Flight Dynamics Model ====&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Instrumentation ====&lt;br /&gt;
* {{flightgear file|src/Instrumentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Property Tree]]&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference/Instrumentation/COMM&amp;diff=140707</id>
		<title>Aircraft properties reference/Instrumentation/COMM</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference/Instrumentation/COMM&amp;diff=140707"/>
		<updated>2024-10-08T20:42:14Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Add link to parent page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Full documentation: [[Aircraft properties reference]]&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/comm[%d]/add-noise&lt;br /&gt;
/instrumentation/comm[%d]/airport-id&lt;br /&gt;
/instrumentation/comm[%d]/atis&lt;br /&gt;
/instrumentation/comm[%d]/channel-button&lt;br /&gt;
/instrumentation/comm[%d]/chanel-mode-selector&lt;br /&gt;
/instrumentation/comm[%d]/cutoff-signal-quality&lt;br /&gt;
/instrumentation/comm[%d]/frequencies&lt;br /&gt;
/instrumentation/comm[%d]/frequencies/dial-khz&lt;br /&gt;
/instrumentation/comm[%d]/frequencies/dial-mhz&lt;br /&gt;
/instrumentation/comm[%d]/frequencies/selected-channel&lt;br /&gt;
/instrumentation/comm[%d]/frequencies/selected-channel-width-khz&lt;br /&gt;
/instrumentation/comm[%d]/frequencies/selected-mhz&lt;br /&gt;
/instrumentation/comm[%d]/frequencies/selected-mhz-fmt&lt;br /&gt;
/instrumentation/comm[%d]/frequencies/selected-real-frequency-mhz&lt;br /&gt;
/instrumentation/comm[%d]/frequencies/standby-channel&lt;br /&gt;
/instrumentation/comm[%d]/frequencies/standby-channel-width-khz&lt;br /&gt;
/instrumentation/comm[%d]/frequencies/standby-mhz&lt;br /&gt;
/instrumentation/comm[%d]/frequencies/standby-mhz-fmt&lt;br /&gt;
/instrumentation/comm[%d]/frequencies/standby-real-frequency-mhz&lt;br /&gt;
/instrumentation/comm[%d]/frq-swap-btn&lt;br /&gt;
/instrumentation/comm[%d]/height-above-station-ft&lt;br /&gt;
/instrumentation/comm[%d]/operable&lt;br /&gt;
/instrumentation/comm[%d]/power-btn&lt;br /&gt;
/instrumentation/comm[%d]/ptt&lt;br /&gt;
/instrumentation/comm[%d]/servicable&lt;br /&gt;
/instrumentation/comm[%d]/signal-quality-norm&lt;br /&gt;
/instrumentation/comm[%d]/slant-distance-m&lt;br /&gt;
/instrumentation/comm[%d]/station-name&lt;br /&gt;
/instrumentation/comm[%d]/station-type&lt;br /&gt;
/instrumentation/comm[%d]/test-btn&lt;br /&gt;
/instrumentation/comm[%d]/track-distance-m&lt;br /&gt;
/instrumentation/comm[%d]/true-bearing-from-deg&lt;br /&gt;
/instrumentation/comm[%d]/true-bearing-to-deg&lt;br /&gt;
/instrumentation/comm[%d]/volume&lt;br /&gt;
/instrumentation/comm[%d]/volume-selected&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=140548</id>
		<title>Aircraft properties reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=140548"/>
		<updated>2024-09-27T20:54:25Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Annunciators */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PropertyTree}}&lt;br /&gt;
&lt;br /&gt;
This is a generic '''aircraft properties reference'''.  There are many properties that are very common in aircraft, and many of them are present even in a very simple aircraft.  However, a complete description that matches all the properties is very unlikely to be written, as aircraft can be very different from each other.&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|2}}&lt;br /&gt;
&lt;br /&gt;
== What are properties? ==&lt;br /&gt;
{{main article|Property tree}}&lt;br /&gt;
=== The property tree ===&lt;br /&gt;
Most parts of FlightGear communicate with each other through key-value pair properties in the [[property tree]].  The properties represent both the input from the pilot, the values determining the position and velocity of the aircraft, the values used for animating the aircraft, and pretty much anything else.&lt;br /&gt;
&lt;br /&gt;
While many properties will be common between most aircraft, many properties will also be different between aircraft.  This becomes obvious if one consider the many different configurations (aircraft/helicopter/car, control surface and landing gear layout, number and locations of engines, etc) and propulsions systems (types of engines, types of fuels etc.) an aircraft can have.  There are also different flight dynamic models (FDMs) that have different needs.  In addition many properties will by necessity be aircraft specific, though developers should make a conscious effort to have properties map to more common ones if that is possible.&lt;br /&gt;
&lt;br /&gt;
=== Where are the properties defined? ===&lt;br /&gt;
There are a couple ways that the properties are set, but a fair amount of them just &amp;quot;appear&amp;quot; without being documented anywhere.  There are several places to look for properties.  One is in the aircraft files, starting from the aircraft specific [[aircraft-set.xml]] file, another is the [[Nasal]] files, and the last place (and often most useful!) is &amp;quot;grepping&amp;quot; (searching) through the C++ code.&lt;br /&gt;
&lt;br /&gt;
To determine how a property works and what it does often requires looking through any code that uses it.  This is a part of FlightGear that we could certainly document better&lt;br /&gt;
&lt;br /&gt;
== Annunciators ==&lt;br /&gt;
!! This section is work in progress !!&lt;br /&gt;
&lt;br /&gt;
The /instrumentation/annunciators section shall provide a central place for&lt;br /&gt;
&lt;br /&gt;
* aircrafts to write annunciator status data&lt;br /&gt;
* 3D aircraft models and external devices (like joysticks, yokes, throttle quadrants or custom made cockpit hardware) to read such data and drive status lights etc.&lt;br /&gt;
&lt;br /&gt;
Some of the props are automatically calculated by property rules in &amp;lt;code&amp;gt;$FGDATA/Aircraft/Generic/generic-annunciators.xml&amp;lt;/code&amp;gt; other properties have to be calculated by the actual aircraft.&lt;br /&gt;
&lt;br /&gt;
The aircraft.nas module provides aircraft.light which allows easy implementation of blinking lights. Such lights have a bool property 'state' which tells if the light is on or off.&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/annunciators/doors&lt;br /&gt;
/instrumentation/annunciators/master-caution/state  # aircraft.light&lt;br /&gt;
/instrumentation/annunciators/master-warning/state  # aircraft.light&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/enabled&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/alt&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/apr&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/hdg&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/ias&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/nav&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/rev&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/vs&lt;br /&gt;
/instrumentation/annunciators/autoflight/flightdirector/enabled&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/engines/&lt;br /&gt;
/instrumentation/annunciators/engines/apu/enabled&lt;br /&gt;
/instrumentation/annunciators/engines/apu/fire&lt;br /&gt;
# summary props, 'sum' of all engines&lt;br /&gt;
/instrumentation/annunciators/engines/fire&lt;br /&gt;
/instrumentation/annunciators/engines/oil-pressure-low&lt;br /&gt;
/instrumentation/annunciators/engines/starter&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# for &amp;lt;gear-name&amp;gt; in {nose, left, right}&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/down&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/in-transition&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/unsafe&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/up&lt;br /&gt;
# gear summary&lt;br /&gt;
/instrumentation/annunciators/gear/down&lt;br /&gt;
/instrumentation/annunciators/gear/in-transition&lt;br /&gt;
/instrumentation/annunciators/gear/unsafe&lt;br /&gt;
/instrumentation/annunciators/gear/up &lt;br /&gt;
/instrumentation/annunciators/gear/parking-brake&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/systems/anti-ice/enabled&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/aux-pump&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/system[]/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/system[]/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/vacuum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Consumables ==&lt;br /&gt;
:''See also [[#Fuel]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lb&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lbs&lt;br /&gt;
/consumables/fuel/tank[%d]/level-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/capacity-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/density-ppg&lt;br /&gt;
/consumables/fuel/total-fuel-lbs&lt;br /&gt;
/consumables/fuel/total-gal_us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Controls ==&lt;br /&gt;
These properties are meant to represent the various cockpit controls (levers, switches, etc.)  Consider these the pilot input.&lt;br /&gt;
&lt;br /&gt;
=== Recommended usage ===&lt;br /&gt;
&lt;br /&gt;
* Animation of control elements (levers, switches, etc) themself in the 3D model of the cockpit&lt;br /&gt;
* As input to aircraft system simulation, e.g. hydraulics or electrical systems &lt;br /&gt;
&lt;br /&gt;
Avoid refering to control props directly for animating parts of the 3D model if there is an aircraft system (electric, hydraulic, ...) involved. &lt;br /&gt;
&lt;br /&gt;
Better use XML property rules (e.g. logic or filter) that calculate the component state from /controls/foo as well as &amp;quot;power available&amp;quot;, &amp;quot;component is serviceable&amp;quot; etc. &lt;br /&gt;
&lt;br /&gt;
=== Anti-ice ===&lt;br /&gt;
These properties control the various anti-ice properties that may be present in an aircraft.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/anti-ice/wing-heat&lt;br /&gt;
/controls/anti-ice/pitot-heat&lt;br /&gt;
/controls/anti-ice/wiper&lt;br /&gt;
/controls/anti-ice/window-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/carb-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/inlet-heat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== APU ===&lt;br /&gt;
These properties control any auxiliary power unit, in essence a small turbine engine driving generators, hydraulic pumps etc. before and after the aircraft's engines are up an running.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/APU/off-start-run&lt;br /&gt;
/controls/APU/fire-switch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Armament ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/armament/master-arm&lt;br /&gt;
/controls/armament/station-select&lt;br /&gt;
/controls/armament/release-all&lt;br /&gt;
/controls/armament/station[%d]/stick-size&lt;br /&gt;
/controls/armament/station[%d]/release-stick&lt;br /&gt;
/controls/armament/station[%d]/release-all&lt;br /&gt;
/controls/armament/station[%d]/jettison-all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Autoflight ===&lt;br /&gt;
These properties control the autopilot on certain airplanes. For [[IT-AUTOFLIGHT]] based systems, see [[IT-AUTOFLIGHT#Interface_Reference|here]].&lt;br /&gt;
&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/autoflight/autopilot[%d]/engage&lt;br /&gt;
/controls/autoflight/autothrottle-arm&lt;br /&gt;
/controls/autoflight/autothrottle-engage&lt;br /&gt;
/controls/autoflight/heading-select&lt;br /&gt;
/controls/autoflight/altitude-select&lt;br /&gt;
/controls/autoflight/bank-angle-select&lt;br /&gt;
/controls/autoflight/vertical-speed-select&lt;br /&gt;
/controls/autoflight/speed-select&lt;br /&gt;
/controls/autoflight/mach-select&lt;br /&gt;
/controls/autoflight/vertical-mode&lt;br /&gt;
/controls/autoflight/lateral-mode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Electric ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/electric/battery-switch&lt;br /&gt;
/controls/electric/external-power&lt;br /&gt;
/controls/electric/APU-generator&lt;br /&gt;
/controls/electric/engine[%d]/generator&lt;br /&gt;
/controls/electric/engine[%d]/bus-tie&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Engines ===&lt;br /&gt;
Engines are numbered engine[0] for a single engine to engine[0] to engine[3] for a 747 for example. (The model allows for up to 12 engines rumour has it ;-)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/engines/throttle_idle&lt;br /&gt;
/controls/engines/engine[%d]/throttle&lt;br /&gt;
/controls/engines/engine[%d]/starter&lt;br /&gt;
/controls/engines/engine[%d]/fuel-pump&lt;br /&gt;
/controls/engines/engine[%d]/fire-switch&lt;br /&gt;
/controls/engines/engine[%d]/fire-bottle-discharge&lt;br /&gt;
/controls/engines/engine[%d]/cutoff&lt;br /&gt;
/controls/engines/engine[%d]/mixture&lt;br /&gt;
/controls/engines/engine[%d]/propeller-pitch&lt;br /&gt;
/controls/engines/engine[%d]/magnetos&lt;br /&gt;
/controls/engines/engine[%d]/boost&lt;br /&gt;
/controls/engines/engine[%d]/WEP&lt;br /&gt;
/controls/engines/engine[%d]/cowl-flaps-norm&lt;br /&gt;
/controls/engines/engine[%d]/feather&lt;br /&gt;
/controls/engines/engine[%d]/ignition&lt;br /&gt;
/controls/engines/engine[%d]/augmentation&lt;br /&gt;
/controls/engines/engine[%d]/afterburner&lt;br /&gt;
/controls/engines/engine[%d]/reverser&lt;br /&gt;
/controls/engines/engine[%d]/water-injection&lt;br /&gt;
/controls/engines/engine[%d]/condition&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Flight controls ===&lt;br /&gt;
These properties control the flight controls surfaces, though often through a mechanical, analog or digital flight control system (FCS) that may or may not be modeled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/flight/aileron&lt;br /&gt;
/controls/flight/aileron-trim&lt;br /&gt;
/controls/flight/elevator&lt;br /&gt;
/controls/flight/elevator-trim&lt;br /&gt;
/controls/flight/rudder&lt;br /&gt;
/controls/flight/rudder-trim&lt;br /&gt;
/controls/flight/flaps&lt;br /&gt;
/controls/flight/slats&lt;br /&gt;
/controls/flight/BLC			// Boundary Layer Control&lt;br /&gt;
/controls/flight/spoilers&lt;br /&gt;
/controls/flight/speedbrake&lt;br /&gt;
/controls/flight/wing-sweep&lt;br /&gt;
/controls/flight/wing-fold&lt;br /&gt;
/controls/flight/drag-chute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The positions of the controls are usually put in &amp;lt;code&amp;gt;/surface-positions/&amp;lt;/code&amp;gt; at the discretion of the aircraft designer. These usually drive the animations of the control surfaces. They are either normalized (like &amp;lt;code&amp;gt;/surface-positions/elevator-pos-norm&amp;lt;/code&amp;gt;) or in degrees, and sometimes the aileron is split left/right.&lt;br /&gt;
&lt;br /&gt;
=== Fuel ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/fuel/dump-valve&lt;br /&gt;
/controls/fuel/tank[%d]/fuel_selector&lt;br /&gt;
/controls/fuel/tank[%d]/to_engine&lt;br /&gt;
/controls/fuel/tank[%d]/to_tank&lt;br /&gt;
/controls/fuel/tank[%d]/boost-pump[%d]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Gear ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/gear/brake-left&lt;br /&gt;
/controls/gear/brake-right&lt;br /&gt;
/controls/gear/brake-parking&lt;br /&gt;
/controls/gear/steering // Used if rudder is not sufficient for control of steering&lt;br /&gt;
/controls/gear/gear-down&lt;br /&gt;
/controls/gear/antiskid // Deprecated?&lt;br /&gt;
/controls/gear/tailhook&lt;br /&gt;
/controls/gear/tailwheel-lock&lt;br /&gt;
/controls/gear/wheel[%d]/alternate-extension&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Hydraulics ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/hydraulic/system[%d]/engine-pump&lt;br /&gt;
/controls/hydraulic/system[%d]/electric-pump&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Lights ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/lighting/landing-lights&lt;br /&gt;
/controls/lighting/turn-off-lights&lt;br /&gt;
/controls/lighting/formation-lights&lt;br /&gt;
/controls/lighting/taxi-light&lt;br /&gt;
/controls/lighting/logo-lights&lt;br /&gt;
/controls/lighting/nav-lights&lt;br /&gt;
/controls/lighting/beacon&lt;br /&gt;
/controls/lighting/strobe&lt;br /&gt;
/controls/lighting/panel-norm&lt;br /&gt;
/controls/lighting/instruments-norm&lt;br /&gt;
/controls/lighting/dome-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pneumatic ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pneumatic/APU-bleed&lt;br /&gt;
/controls/pneumatic/engine[%d]/bleed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pressurization ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pressurization/mode&lt;br /&gt;
/controls/pressurization/dump&lt;br /&gt;
/controls/pressurization/outflow-valve&lt;br /&gt;
/controls/pressurization/pack[%d]/pack-on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Seat ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/seat/vertical-adjust&lt;br /&gt;
/controls/seat/fore-aft-adjust&lt;br /&gt;
/controls/seat/cmd_selector_valve&lt;br /&gt;
/controls/seat/eject[%d]/initiate&lt;br /&gt;
/controls/seat/eject[%d]/status&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Engines ==&lt;br /&gt;
Status of engines. See also: /controls/engines/ &lt;br /&gt;
=== Common ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/fuel-flow-gph&lt;br /&gt;
/engines/engine[%d]/fuel-flow_pph&lt;br /&gt;
/engines/engine[%d]/thrust_lb&lt;br /&gt;
/engines/engine[%d]/running&lt;br /&gt;
/engines/engine[%d]/starter&lt;br /&gt;
/engines/engine[%d]/cranking&lt;br /&gt;
/engines/engine[%d]/fire&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turbine ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/n1&lt;br /&gt;
/engines/engine[%d]/n2&lt;br /&gt;
/engines/engine[%d]/epr&lt;br /&gt;
/engines/engine[%d]/augmentation&lt;br /&gt;
/engines/engine[%d]/water-injection&lt;br /&gt;
/engines/engine[%d]/ignition&lt;br /&gt;
/engines/engine[%d]/nozzle-pos-norm&lt;br /&gt;
/engines/engine[%d]/inlet-pos-norm&lt;br /&gt;
/engines/engine[%d]/reversed&lt;br /&gt;
/engines/engine[%d]/cutoff&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Piston ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/mp-osi&lt;br /&gt;
/engines/engine[%d]/egt-degf&lt;br /&gt;
/engines/engine[%d]/oil-temperature-degf&lt;br /&gt;
/engines/engine[%d]/oil-pressure-psi&lt;br /&gt;
/engines/engine[%d]/cht-degf&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Propeller ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
/engines/engine[%d]/pitch&lt;br /&gt;
/engines/engine[%d]/torque&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Flight Dynamics Model ==&lt;br /&gt;
=== Position ===&lt;br /&gt;
This will return the current position of the aircraft within FlightGear. This is also the stuff that is transmitted in [[Howto:Multiplayer|multiplayer]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/position/&lt;br /&gt;
/position/altitiude-ft ()&lt;br /&gt;
/position/altitude-agl-ft (22.46983965)&lt;br /&gt;
/position/altitude-ft (28.24368289)&lt;br /&gt;
/position/ground-elev-ft (-0.43513529)&lt;br /&gt;
/position/ground-elev-m (-0.1326292364)&lt;br /&gt;
/position/latitude-deg (37.61371436)&lt;br /&gt;
/position/latitude-string (37*36 49.4N)&lt;br /&gt;
/position/longitude-deg (-122.3576508)&lt;br /&gt;
/position/longitude-string (-122*21 27.5W)&lt;br /&gt;
/position/sea-level-radius-ft (20899648.76)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Orientation ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/orientation/roll-deg&lt;br /&gt;
/orientation/pitch-deg&lt;br /&gt;
/orientation/heading-deg&lt;br /&gt;
&lt;br /&gt;
/orientation/roll-rate-degps&lt;br /&gt;
/orientation/pitch-rate-degps&lt;br /&gt;
/orientation/yaw-rate-degps&lt;br /&gt;
&lt;br /&gt;
/orientation/side-slip-rad&lt;br /&gt;
/orientation/side-slip-deg&lt;br /&gt;
/orientation/alpha-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Velocities ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/velocities/airspeed-kt&lt;br /&gt;
/velocities/mach&lt;br /&gt;
/velocities/speed-north-fps&lt;br /&gt;
/velocities/speed-east-fps&lt;br /&gt;
/velocities/speed-down-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/uBody-fps&lt;br /&gt;
/velocities/vBody-fps&lt;br /&gt;
/velocities/wBody-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/vertical-speed-fps&lt;br /&gt;
/velocities/glideslope&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Acceleration ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/accelerations/nlf&lt;br /&gt;
&lt;br /&gt;
/accelerations/ned/north-accel-fps_sec&lt;br /&gt;
/accelerations/ned/east-accel-fps_sec&lt;br /&gt;
/accelerations/ned/down-accel-fps_sec&lt;br /&gt;
&lt;br /&gt;
/accelerations/pilot/x-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/y-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/z-accel-fps_sec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Gear ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gear/serviceable&lt;br /&gt;
/gear/gear[%d]/cast-angle-deg // The angle of the wheel where 0 is pointing straight forward&lt;br /&gt;
/gear/gear[%d]/compression-m&lt;br /&gt;
/gear/gear[%d]/compression-norm&lt;br /&gt;
/gear/gear[%d]/ground-friction-factor&lt;br /&gt;
/gear/gear[%d]/ground-is-solid&lt;br /&gt;
/gear/gear[%d]/has-brake&lt;br /&gt;
/gear/gear[%d]/rollspeed-ms // Speed of the wheel's rotation in meters per second&lt;br /&gt;
/gear/gear[%d]/wow // Weight-on-wheel&lt;br /&gt;
/gear/gear[%d]/xoffset-in&lt;br /&gt;
/gear/gear[%d]/yoffset-in&lt;br /&gt;
/gear/gear[%d]/zoffset-in&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf[%d]/&lt;br /&gt;
/instrumentation/airspeed-indicator/&lt;br /&gt;
/instrumentation/altimeter/&lt;br /&gt;
/instrumentation/annunciator/&lt;br /&gt;
/instrumentation/attitude-indicator/&lt;br /&gt;
/instrumentation/clock/&lt;br /&gt;
/instrumentation/comm[%d]/&lt;br /&gt;
/instrumentation/dme/&lt;br /&gt;
/instrumentation/efis/&lt;br /&gt;
/instrumentation/encoder/&lt;br /&gt;
/instrumentation/flightdirector/&lt;br /&gt;
/instrumentation/gps/&lt;br /&gt;
/instrumentation/gps-annunciator/&lt;br /&gt;
/instrumentation/heading-indicator/&lt;br /&gt;
/instrumentation/heading-indicator-fg/&lt;br /&gt;
/instrumentation/magnetic-compass/&lt;br /&gt;
/instrumentation/marker-beacon/&lt;br /&gt;
/instrumentation/nav[%d]/&lt;br /&gt;
/instrumentation/radar/&lt;br /&gt;
/instrumentation/slip-skid-ball/&lt;br /&gt;
/instrumentation/tacan[%d]/&lt;br /&gt;
/instrumentation/transponder/&lt;br /&gt;
/instrumentation/turn-indicator/&lt;br /&gt;
/instrumentation/vertical-speed-indicator/&lt;br /&gt;
/instrumentation/wxradar/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation ADF ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf[%d]/adf-btn&lt;br /&gt;
/instrumentation/adf[%d]/bro-btn&lt;br /&gt;
/instrumentation/adf[%d]/display-mode&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/running&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/start-time&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/time&lt;br /&gt;
/instrumentation/adf[%d]/error-deg&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/running&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/start-time&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/time&lt;br /&gt;
/instrumentation/adf[%d]/flt-btn&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/dial-1-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/dial-100-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/selected-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/standby-khz&lt;br /&gt;
/instrumentation/adf[%d]/frq-btn&lt;br /&gt;
/instrumentation/adf[%d]/ident&lt;br /&gt;
/instrumentation/adf[[%d]/ident-audible&lt;br /&gt;
/instrumentation/adf[%d]/in-range&lt;br /&gt;
/instrumentation/adf[%d]/indicated-bearing-deg&lt;br /&gt;
/instrumentation/adf[%d]/mode&lt;br /&gt;
/instrumentation/adf[%d]/model&lt;br /&gt;
/instrumentation/adf[%d]/operable&lt;br /&gt;
/instrumentation/adf[%d]/power-btn&lt;br /&gt;
/instrumentation/adf[%d]/right-display&lt;br /&gt;
/instrumentation/adf[%d]/rotation-deg&lt;br /&gt;
/instrumentation/adf[%d]/serviceable&lt;br /&gt;
/instrumentation/adf[%d]/set-btn&lt;br /&gt;
/instrumentation/adf[%d]/volume&lt;br /&gt;
/instrumentation/adf[%d]/volume-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation comm radio ===&lt;br /&gt;
See [[Aircraft_properties_reference/Instrumentation/COMM]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation NAV radio ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/nav[%d]/audio-btn&lt;br /&gt;
/instrumentation/nav[%d]/back-course-btn&lt;br /&gt;
/instrumentation/nav[%d]/cdi/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/crosstrack-error-m&lt;br /&gt;
/instrumentation/nav[%d]/crosstrack-heading-error-deg&lt;br /&gt;
/instrumentation/nav[%d]/data-is-valid&lt;br /&gt;
/instrumentation/nav[%d]/dme-in-range&lt;br /&gt;
/instrumentation/nav[%d]/filtered-cdiNAV0-deflection&lt;br /&gt;
/instrumentation/nav[%d]/filtered-gsNAV0-deflection&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/dial-khz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/dial-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/is-localizer-frequency&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/selected-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/selected-mhz-fmt&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/standby-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/standby-mhz-fmt&lt;br /&gt;
/instrumentation/nav[%d]/from-flag&lt;br /&gt;
/instrumentation/nav[%d]/frq-swap-btn&lt;br /&gt;
/instrumentation/nav[%d]/gs/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/gs-direct-deg&lt;br /&gt;
/instrumentation/nav[%d]/gs-distance&lt;br /&gt;
/instrumentation/nav[%d]/gs-in-range&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection-deg&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection-norm&lt;br /&gt;
/instrumentation/nav[%d]/gs-rate-of-climb&lt;br /&gt;
/instrumentation/nav[%d]/gs-rate-of-climb-fpm&lt;br /&gt;
/instrumentation/nav[%d]/has-gs&lt;br /&gt;
/instrumentation/nav[%d]/heading-deg&lt;br /&gt;
/instrumentation/nav[%d]/heading-needle-deflection&lt;br /&gt;
/instrumentation/nav[%d]/heading-needle-deflection-norm&lt;br /&gt;
/instrumentation/nav[%d]/ident&lt;br /&gt;
/instrumentation/nav[%d]/ident-audible&lt;br /&gt;
/instrumentation/nav[%d]/in-range&lt;br /&gt;
/instrumentation/nav[%d]/nav-distance&lt;br /&gt;
/instrumentation/nav[%d]/nav-id&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc1&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc2&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc3&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc4&lt;br /&gt;
/instrumentation/nav[%d]/nav-loc&lt;br /&gt;
/instrumentation/nav[%d]/operable&lt;br /&gt;
/instrumentation/nav[%d]/power-btn&lt;br /&gt;
/instrumentation/nav[%d]/radials/actual-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/reciprocal-radial-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/selected-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/target-auto-hdg-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/arget-radial-deg&lt;br /&gt;
/instrumentation/nav[%d]/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/signal-quality-norm&lt;br /&gt;
/instrumentation/nav[%d]/slaved-to-gps&lt;br /&gt;
/instrumentation/nav[%d]/time-to-intercept-sec&lt;br /&gt;
/instrumentation/nav[%d]/to-flag&lt;br /&gt;
/instrumentation/nav[%d]/to-from/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/volume&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation Tacan ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/tacan[%d]/display/channel&lt;br /&gt;
/instrumentation/tacan[%d]/display/x-shift&lt;br /&gt;
/instrumentation/tacan[%d]/display/y-shift&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[1]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[2]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[3]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[4]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-mhz&lt;br /&gt;
/instrumentation/tacan[%d]/ident&lt;br /&gt;
/instrumentation/tacan[%d]/in-range&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-bearing-true-deg&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-distance-nm&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-ground-speed-kt&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-time-min&lt;br /&gt;
/instrumentation/tacan[%d]/name&lt;br /&gt;
/instrumentation/tacan[%d]/serviceable&lt;br /&gt;
/instrumentation/tacan[%d]/switch-position&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rotors (YASim only) ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/rotors/gear/torque-sound-filtered // Unused?&lt;br /&gt;
/rotors/gear/total-torque&lt;br /&gt;
/rotors/{name}/balance&lt;br /&gt;
/rotors/{name}/blade[%d]/flap-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/incidence-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/position-deg // Position relative to model&lt;br /&gt;
/rotors/{name}/bladesvisible // Used for animations&lt;br /&gt;
/rotors/{name}/cone%d-deg //e.g. cone-deg or cone2-deg&lt;br /&gt;
/rotors/{name}/roll-deg&lt;br /&gt;
/rotors/{name}/rpm&lt;br /&gt;
/rotors/{name}/stall&lt;br /&gt;
/rotors/{name}/stall-filtered&lt;br /&gt;
/rotors/{name}/tilt&lt;br /&gt;
/rotors/{name}/torque&lt;br /&gt;
/rotors/{name}/yaw-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For how to animate rotors using these properties, see [[Howto:Animate helicopters]].&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Aircraft-set.xml]]&lt;br /&gt;
* [[Multiplayer protocol]]&lt;br /&gt;
* [[Property browser]]&lt;br /&gt;
* [[PropertyList XML files]]&lt;br /&gt;
* [[Property tree]]&lt;br /&gt;
&lt;br /&gt;
=== Readme files ===&lt;br /&gt;
* {{readme file|properties}}&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
==== Consumables ====&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.hxx}}&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Flight Dynamics Model ====&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Instrumentation ====&lt;br /&gt;
* {{flightgear file|src/Instrumentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Property Tree]]&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=140547</id>
		<title>Aircraft properties reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=140547"/>
		<updated>2024-09-27T20:50:55Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Annunciators [draft] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PropertyTree}}&lt;br /&gt;
&lt;br /&gt;
This is a generic '''aircraft properties reference'''.  There are many properties that are very common in aircraft, and many of them are present even in a very simple aircraft.  However, a complete description that matches all the properties is very unlikely to be written, as aircraft can be very different from each other.&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|2}}&lt;br /&gt;
&lt;br /&gt;
== What are properties? ==&lt;br /&gt;
{{main article|Property tree}}&lt;br /&gt;
=== The property tree ===&lt;br /&gt;
Most parts of FlightGear communicate with each other through key-value pair properties in the [[property tree]].  The properties represent both the input from the pilot, the values determining the position and velocity of the aircraft, the values used for animating the aircraft, and pretty much anything else.&lt;br /&gt;
&lt;br /&gt;
While many properties will be common between most aircraft, many properties will also be different between aircraft.  This becomes obvious if one consider the many different configurations (aircraft/helicopter/car, control surface and landing gear layout, number and locations of engines, etc) and propulsions systems (types of engines, types of fuels etc.) an aircraft can have.  There are also different flight dynamic models (FDMs) that have different needs.  In addition many properties will by necessity be aircraft specific, though developers should make a conscious effort to have properties map to more common ones if that is possible.&lt;br /&gt;
&lt;br /&gt;
=== Where are the properties defined? ===&lt;br /&gt;
There are a couple ways that the properties are set, but a fair amount of them just &amp;quot;appear&amp;quot; without being documented anywhere.  There are several places to look for properties.  One is in the aircraft files, starting from the aircraft specific [[aircraft-set.xml]] file, another is the [[Nasal]] files, and the last place (and often most useful!) is &amp;quot;grepping&amp;quot; (searching) through the C++ code.&lt;br /&gt;
&lt;br /&gt;
To determine how a property works and what it does often requires looking through any code that uses it.  This is a part of FlightGear that we could certainly document better&lt;br /&gt;
&lt;br /&gt;
== Annunciators ==&lt;br /&gt;
!! This section is work in progress !!&lt;br /&gt;
&lt;br /&gt;
The /instrumentation/annunciators section shall provide a central place for&lt;br /&gt;
&lt;br /&gt;
* aircrafts to write annunciator status data&lt;br /&gt;
* 3D aircraft models and external devices (like joysticks, yokes, throttle quadrants or custom made cockpit hardware) to read such data and drive status lights etc.&lt;br /&gt;
&lt;br /&gt;
Some of the props are automatically calculated by property rules in $FGDATA/Aircraft/Generic/generic-annunciators.xml other properties have to be calculated by the actual aircraft.&lt;br /&gt;
&lt;br /&gt;
The aircraft.nas module provides aircraft.light which allows easy implementation of blinking lights. Such lights have a bool property 'state' which tells if the light is on or off.&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/annunciators/doors&lt;br /&gt;
/instrumentation/annunciators/master-caution/state  # aircraft.light&lt;br /&gt;
/instrumentation/annunciators/master-warning/state  # aircraft.light&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/enabled&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/alt&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/apr&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/hdg&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/ias&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/nav&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/rev&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/vs&lt;br /&gt;
/instrumentation/annunciators/autoflight/flightdirector/enabled&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/engines/&lt;br /&gt;
/instrumentation/annunciators/engines/apu/enabled&lt;br /&gt;
/instrumentation/annunciators/engines/apu/fire&lt;br /&gt;
# summary props, 'sum' of all engines&lt;br /&gt;
/instrumentation/annunciators/engines/fire&lt;br /&gt;
/instrumentation/annunciators/engines/oil-pressure-low&lt;br /&gt;
/instrumentation/annunciators/engines/starter&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# for &amp;lt;gear-name&amp;gt; in {nose, left, right}&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/down&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/in-transition&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/unsafe&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/up&lt;br /&gt;
# gear summary&lt;br /&gt;
/instrumentation/annunciators/gear/down&lt;br /&gt;
/instrumentation/annunciators/gear/in-transition&lt;br /&gt;
/instrumentation/annunciators/gear/unsafe&lt;br /&gt;
/instrumentation/annunciators/gear/up &lt;br /&gt;
/instrumentation/annunciators/gear/parking-brake&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/systems/anti-ice/enabled&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/aux-pump&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/system[]/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/system[]/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/vacuum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Consumables ==&lt;br /&gt;
:''See also [[#Fuel]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lb&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lbs&lt;br /&gt;
/consumables/fuel/tank[%d]/level-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/capacity-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/density-ppg&lt;br /&gt;
/consumables/fuel/total-fuel-lbs&lt;br /&gt;
/consumables/fuel/total-gal_us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Controls ==&lt;br /&gt;
These properties are meant to represent the various cockpit controls (levers, switches, etc.)  Consider these the pilot input.&lt;br /&gt;
&lt;br /&gt;
=== Recommended usage ===&lt;br /&gt;
&lt;br /&gt;
* Animation of control elements (levers, switches, etc) themself in the 3D model of the cockpit&lt;br /&gt;
* As input to aircraft system simulation, e.g. hydraulics or electrical systems &lt;br /&gt;
&lt;br /&gt;
Avoid refering to control props directly for animating parts of the 3D model if there is an aircraft system (electric, hydraulic, ...) involved. &lt;br /&gt;
&lt;br /&gt;
Better use XML property rules (e.g. logic or filter) that calculate the component state from /controls/foo as well as &amp;quot;power available&amp;quot;, &amp;quot;component is serviceable&amp;quot; etc. &lt;br /&gt;
&lt;br /&gt;
=== Anti-ice ===&lt;br /&gt;
These properties control the various anti-ice properties that may be present in an aircraft.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/anti-ice/wing-heat&lt;br /&gt;
/controls/anti-ice/pitot-heat&lt;br /&gt;
/controls/anti-ice/wiper&lt;br /&gt;
/controls/anti-ice/window-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/carb-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/inlet-heat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== APU ===&lt;br /&gt;
These properties control any auxiliary power unit, in essence a small turbine engine driving generators, hydraulic pumps etc. before and after the aircraft's engines are up an running.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/APU/off-start-run&lt;br /&gt;
/controls/APU/fire-switch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Armament ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/armament/master-arm&lt;br /&gt;
/controls/armament/station-select&lt;br /&gt;
/controls/armament/release-all&lt;br /&gt;
/controls/armament/station[%d]/stick-size&lt;br /&gt;
/controls/armament/station[%d]/release-stick&lt;br /&gt;
/controls/armament/station[%d]/release-all&lt;br /&gt;
/controls/armament/station[%d]/jettison-all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Autoflight ===&lt;br /&gt;
These properties control the autopilot on certain airplanes. For [[IT-AUTOFLIGHT]] based systems, see [[IT-AUTOFLIGHT#Interface_Reference|here]].&lt;br /&gt;
&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/autoflight/autopilot[%d]/engage&lt;br /&gt;
/controls/autoflight/autothrottle-arm&lt;br /&gt;
/controls/autoflight/autothrottle-engage&lt;br /&gt;
/controls/autoflight/heading-select&lt;br /&gt;
/controls/autoflight/altitude-select&lt;br /&gt;
/controls/autoflight/bank-angle-select&lt;br /&gt;
/controls/autoflight/vertical-speed-select&lt;br /&gt;
/controls/autoflight/speed-select&lt;br /&gt;
/controls/autoflight/mach-select&lt;br /&gt;
/controls/autoflight/vertical-mode&lt;br /&gt;
/controls/autoflight/lateral-mode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Electric ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/electric/battery-switch&lt;br /&gt;
/controls/electric/external-power&lt;br /&gt;
/controls/electric/APU-generator&lt;br /&gt;
/controls/electric/engine[%d]/generator&lt;br /&gt;
/controls/electric/engine[%d]/bus-tie&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Engines ===&lt;br /&gt;
Engines are numbered engine[0] for a single engine to engine[0] to engine[3] for a 747 for example. (The model allows for up to 12 engines rumour has it ;-)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/engines/throttle_idle&lt;br /&gt;
/controls/engines/engine[%d]/throttle&lt;br /&gt;
/controls/engines/engine[%d]/starter&lt;br /&gt;
/controls/engines/engine[%d]/fuel-pump&lt;br /&gt;
/controls/engines/engine[%d]/fire-switch&lt;br /&gt;
/controls/engines/engine[%d]/fire-bottle-discharge&lt;br /&gt;
/controls/engines/engine[%d]/cutoff&lt;br /&gt;
/controls/engines/engine[%d]/mixture&lt;br /&gt;
/controls/engines/engine[%d]/propeller-pitch&lt;br /&gt;
/controls/engines/engine[%d]/magnetos&lt;br /&gt;
/controls/engines/engine[%d]/boost&lt;br /&gt;
/controls/engines/engine[%d]/WEP&lt;br /&gt;
/controls/engines/engine[%d]/cowl-flaps-norm&lt;br /&gt;
/controls/engines/engine[%d]/feather&lt;br /&gt;
/controls/engines/engine[%d]/ignition&lt;br /&gt;
/controls/engines/engine[%d]/augmentation&lt;br /&gt;
/controls/engines/engine[%d]/afterburner&lt;br /&gt;
/controls/engines/engine[%d]/reverser&lt;br /&gt;
/controls/engines/engine[%d]/water-injection&lt;br /&gt;
/controls/engines/engine[%d]/condition&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Flight controls ===&lt;br /&gt;
These properties control the flight controls surfaces, though often through a mechanical, analog or digital flight control system (FCS) that may or may not be modeled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/flight/aileron&lt;br /&gt;
/controls/flight/aileron-trim&lt;br /&gt;
/controls/flight/elevator&lt;br /&gt;
/controls/flight/elevator-trim&lt;br /&gt;
/controls/flight/rudder&lt;br /&gt;
/controls/flight/rudder-trim&lt;br /&gt;
/controls/flight/flaps&lt;br /&gt;
/controls/flight/slats&lt;br /&gt;
/controls/flight/BLC			// Boundary Layer Control&lt;br /&gt;
/controls/flight/spoilers&lt;br /&gt;
/controls/flight/speedbrake&lt;br /&gt;
/controls/flight/wing-sweep&lt;br /&gt;
/controls/flight/wing-fold&lt;br /&gt;
/controls/flight/drag-chute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The positions of the controls are usually put in &amp;lt;code&amp;gt;/surface-positions/&amp;lt;/code&amp;gt; at the discretion of the aircraft designer. These usually drive the animations of the control surfaces. They are either normalized (like &amp;lt;code&amp;gt;/surface-positions/elevator-pos-norm&amp;lt;/code&amp;gt;) or in degrees, and sometimes the aileron is split left/right.&lt;br /&gt;
&lt;br /&gt;
=== Fuel ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/fuel/dump-valve&lt;br /&gt;
/controls/fuel/tank[%d]/fuel_selector&lt;br /&gt;
/controls/fuel/tank[%d]/to_engine&lt;br /&gt;
/controls/fuel/tank[%d]/to_tank&lt;br /&gt;
/controls/fuel/tank[%d]/boost-pump[%d]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Gear ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/gear/brake-left&lt;br /&gt;
/controls/gear/brake-right&lt;br /&gt;
/controls/gear/brake-parking&lt;br /&gt;
/controls/gear/steering // Used if rudder is not sufficient for control of steering&lt;br /&gt;
/controls/gear/gear-down&lt;br /&gt;
/controls/gear/antiskid // Deprecated?&lt;br /&gt;
/controls/gear/tailhook&lt;br /&gt;
/controls/gear/tailwheel-lock&lt;br /&gt;
/controls/gear/wheel[%d]/alternate-extension&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Hydraulics ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/hydraulic/system[%d]/engine-pump&lt;br /&gt;
/controls/hydraulic/system[%d]/electric-pump&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Lights ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/lighting/landing-lights&lt;br /&gt;
/controls/lighting/turn-off-lights&lt;br /&gt;
/controls/lighting/formation-lights&lt;br /&gt;
/controls/lighting/taxi-light&lt;br /&gt;
/controls/lighting/logo-lights&lt;br /&gt;
/controls/lighting/nav-lights&lt;br /&gt;
/controls/lighting/beacon&lt;br /&gt;
/controls/lighting/strobe&lt;br /&gt;
/controls/lighting/panel-norm&lt;br /&gt;
/controls/lighting/instruments-norm&lt;br /&gt;
/controls/lighting/dome-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pneumatic ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pneumatic/APU-bleed&lt;br /&gt;
/controls/pneumatic/engine[%d]/bleed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pressurization ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pressurization/mode&lt;br /&gt;
/controls/pressurization/dump&lt;br /&gt;
/controls/pressurization/outflow-valve&lt;br /&gt;
/controls/pressurization/pack[%d]/pack-on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Seat ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/seat/vertical-adjust&lt;br /&gt;
/controls/seat/fore-aft-adjust&lt;br /&gt;
/controls/seat/cmd_selector_valve&lt;br /&gt;
/controls/seat/eject[%d]/initiate&lt;br /&gt;
/controls/seat/eject[%d]/status&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Engines ==&lt;br /&gt;
Status of engines. See also: /controls/engines/ &lt;br /&gt;
=== Common ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/fuel-flow-gph&lt;br /&gt;
/engines/engine[%d]/fuel-flow_pph&lt;br /&gt;
/engines/engine[%d]/thrust_lb&lt;br /&gt;
/engines/engine[%d]/running&lt;br /&gt;
/engines/engine[%d]/starter&lt;br /&gt;
/engines/engine[%d]/cranking&lt;br /&gt;
/engines/engine[%d]/fire&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turbine ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/n1&lt;br /&gt;
/engines/engine[%d]/n2&lt;br /&gt;
/engines/engine[%d]/epr&lt;br /&gt;
/engines/engine[%d]/augmentation&lt;br /&gt;
/engines/engine[%d]/water-injection&lt;br /&gt;
/engines/engine[%d]/ignition&lt;br /&gt;
/engines/engine[%d]/nozzle-pos-norm&lt;br /&gt;
/engines/engine[%d]/inlet-pos-norm&lt;br /&gt;
/engines/engine[%d]/reversed&lt;br /&gt;
/engines/engine[%d]/cutoff&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Piston ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/mp-osi&lt;br /&gt;
/engines/engine[%d]/egt-degf&lt;br /&gt;
/engines/engine[%d]/oil-temperature-degf&lt;br /&gt;
/engines/engine[%d]/oil-pressure-psi&lt;br /&gt;
/engines/engine[%d]/cht-degf&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Propeller ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
/engines/engine[%d]/pitch&lt;br /&gt;
/engines/engine[%d]/torque&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Flight Dynamics Model ==&lt;br /&gt;
=== Position ===&lt;br /&gt;
This will return the current position of the aircraft within FlightGear. This is also the stuff that is transmitted in [[Howto:Multiplayer|multiplayer]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/position/&lt;br /&gt;
/position/altitiude-ft ()&lt;br /&gt;
/position/altitude-agl-ft (22.46983965)&lt;br /&gt;
/position/altitude-ft (28.24368289)&lt;br /&gt;
/position/ground-elev-ft (-0.43513529)&lt;br /&gt;
/position/ground-elev-m (-0.1326292364)&lt;br /&gt;
/position/latitude-deg (37.61371436)&lt;br /&gt;
/position/latitude-string (37*36 49.4N)&lt;br /&gt;
/position/longitude-deg (-122.3576508)&lt;br /&gt;
/position/longitude-string (-122*21 27.5W)&lt;br /&gt;
/position/sea-level-radius-ft (20899648.76)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Orientation ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/orientation/roll-deg&lt;br /&gt;
/orientation/pitch-deg&lt;br /&gt;
/orientation/heading-deg&lt;br /&gt;
&lt;br /&gt;
/orientation/roll-rate-degps&lt;br /&gt;
/orientation/pitch-rate-degps&lt;br /&gt;
/orientation/yaw-rate-degps&lt;br /&gt;
&lt;br /&gt;
/orientation/side-slip-rad&lt;br /&gt;
/orientation/side-slip-deg&lt;br /&gt;
/orientation/alpha-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Velocities ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/velocities/airspeed-kt&lt;br /&gt;
/velocities/mach&lt;br /&gt;
/velocities/speed-north-fps&lt;br /&gt;
/velocities/speed-east-fps&lt;br /&gt;
/velocities/speed-down-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/uBody-fps&lt;br /&gt;
/velocities/vBody-fps&lt;br /&gt;
/velocities/wBody-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/vertical-speed-fps&lt;br /&gt;
/velocities/glideslope&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Acceleration ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/accelerations/nlf&lt;br /&gt;
&lt;br /&gt;
/accelerations/ned/north-accel-fps_sec&lt;br /&gt;
/accelerations/ned/east-accel-fps_sec&lt;br /&gt;
/accelerations/ned/down-accel-fps_sec&lt;br /&gt;
&lt;br /&gt;
/accelerations/pilot/x-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/y-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/z-accel-fps_sec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Gear ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gear/serviceable&lt;br /&gt;
/gear/gear[%d]/cast-angle-deg // The angle of the wheel where 0 is pointing straight forward&lt;br /&gt;
/gear/gear[%d]/compression-m&lt;br /&gt;
/gear/gear[%d]/compression-norm&lt;br /&gt;
/gear/gear[%d]/ground-friction-factor&lt;br /&gt;
/gear/gear[%d]/ground-is-solid&lt;br /&gt;
/gear/gear[%d]/has-brake&lt;br /&gt;
/gear/gear[%d]/rollspeed-ms // Speed of the wheel's rotation in meters per second&lt;br /&gt;
/gear/gear[%d]/wow // Weight-on-wheel&lt;br /&gt;
/gear/gear[%d]/xoffset-in&lt;br /&gt;
/gear/gear[%d]/yoffset-in&lt;br /&gt;
/gear/gear[%d]/zoffset-in&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf[%d]/&lt;br /&gt;
/instrumentation/airspeed-indicator/&lt;br /&gt;
/instrumentation/altimeter/&lt;br /&gt;
/instrumentation/annunciator/&lt;br /&gt;
/instrumentation/attitude-indicator/&lt;br /&gt;
/instrumentation/clock/&lt;br /&gt;
/instrumentation/comm[%d]/&lt;br /&gt;
/instrumentation/dme/&lt;br /&gt;
/instrumentation/efis/&lt;br /&gt;
/instrumentation/encoder/&lt;br /&gt;
/instrumentation/flightdirector/&lt;br /&gt;
/instrumentation/gps/&lt;br /&gt;
/instrumentation/gps-annunciator/&lt;br /&gt;
/instrumentation/heading-indicator/&lt;br /&gt;
/instrumentation/heading-indicator-fg/&lt;br /&gt;
/instrumentation/magnetic-compass/&lt;br /&gt;
/instrumentation/marker-beacon/&lt;br /&gt;
/instrumentation/nav[%d]/&lt;br /&gt;
/instrumentation/radar/&lt;br /&gt;
/instrumentation/slip-skid-ball/&lt;br /&gt;
/instrumentation/tacan[%d]/&lt;br /&gt;
/instrumentation/transponder/&lt;br /&gt;
/instrumentation/turn-indicator/&lt;br /&gt;
/instrumentation/vertical-speed-indicator/&lt;br /&gt;
/instrumentation/wxradar/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation ADF ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf[%d]/adf-btn&lt;br /&gt;
/instrumentation/adf[%d]/bro-btn&lt;br /&gt;
/instrumentation/adf[%d]/display-mode&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/running&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/start-time&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/time&lt;br /&gt;
/instrumentation/adf[%d]/error-deg&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/running&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/start-time&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/time&lt;br /&gt;
/instrumentation/adf[%d]/flt-btn&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/dial-1-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/dial-100-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/selected-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/standby-khz&lt;br /&gt;
/instrumentation/adf[%d]/frq-btn&lt;br /&gt;
/instrumentation/adf[%d]/ident&lt;br /&gt;
/instrumentation/adf[[%d]/ident-audible&lt;br /&gt;
/instrumentation/adf[%d]/in-range&lt;br /&gt;
/instrumentation/adf[%d]/indicated-bearing-deg&lt;br /&gt;
/instrumentation/adf[%d]/mode&lt;br /&gt;
/instrumentation/adf[%d]/model&lt;br /&gt;
/instrumentation/adf[%d]/operable&lt;br /&gt;
/instrumentation/adf[%d]/power-btn&lt;br /&gt;
/instrumentation/adf[%d]/right-display&lt;br /&gt;
/instrumentation/adf[%d]/rotation-deg&lt;br /&gt;
/instrumentation/adf[%d]/serviceable&lt;br /&gt;
/instrumentation/adf[%d]/set-btn&lt;br /&gt;
/instrumentation/adf[%d]/volume&lt;br /&gt;
/instrumentation/adf[%d]/volume-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation comm radio ===&lt;br /&gt;
See [[Aircraft_properties_reference/Instrumentation/COMM]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation NAV radio ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/nav[%d]/audio-btn&lt;br /&gt;
/instrumentation/nav[%d]/back-course-btn&lt;br /&gt;
/instrumentation/nav[%d]/cdi/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/crosstrack-error-m&lt;br /&gt;
/instrumentation/nav[%d]/crosstrack-heading-error-deg&lt;br /&gt;
/instrumentation/nav[%d]/data-is-valid&lt;br /&gt;
/instrumentation/nav[%d]/dme-in-range&lt;br /&gt;
/instrumentation/nav[%d]/filtered-cdiNAV0-deflection&lt;br /&gt;
/instrumentation/nav[%d]/filtered-gsNAV0-deflection&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/dial-khz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/dial-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/is-localizer-frequency&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/selected-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/selected-mhz-fmt&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/standby-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/standby-mhz-fmt&lt;br /&gt;
/instrumentation/nav[%d]/from-flag&lt;br /&gt;
/instrumentation/nav[%d]/frq-swap-btn&lt;br /&gt;
/instrumentation/nav[%d]/gs/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/gs-direct-deg&lt;br /&gt;
/instrumentation/nav[%d]/gs-distance&lt;br /&gt;
/instrumentation/nav[%d]/gs-in-range&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection-deg&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection-norm&lt;br /&gt;
/instrumentation/nav[%d]/gs-rate-of-climb&lt;br /&gt;
/instrumentation/nav[%d]/gs-rate-of-climb-fpm&lt;br /&gt;
/instrumentation/nav[%d]/has-gs&lt;br /&gt;
/instrumentation/nav[%d]/heading-deg&lt;br /&gt;
/instrumentation/nav[%d]/heading-needle-deflection&lt;br /&gt;
/instrumentation/nav[%d]/heading-needle-deflection-norm&lt;br /&gt;
/instrumentation/nav[%d]/ident&lt;br /&gt;
/instrumentation/nav[%d]/ident-audible&lt;br /&gt;
/instrumentation/nav[%d]/in-range&lt;br /&gt;
/instrumentation/nav[%d]/nav-distance&lt;br /&gt;
/instrumentation/nav[%d]/nav-id&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc1&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc2&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc3&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc4&lt;br /&gt;
/instrumentation/nav[%d]/nav-loc&lt;br /&gt;
/instrumentation/nav[%d]/operable&lt;br /&gt;
/instrumentation/nav[%d]/power-btn&lt;br /&gt;
/instrumentation/nav[%d]/radials/actual-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/reciprocal-radial-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/selected-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/target-auto-hdg-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/arget-radial-deg&lt;br /&gt;
/instrumentation/nav[%d]/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/signal-quality-norm&lt;br /&gt;
/instrumentation/nav[%d]/slaved-to-gps&lt;br /&gt;
/instrumentation/nav[%d]/time-to-intercept-sec&lt;br /&gt;
/instrumentation/nav[%d]/to-flag&lt;br /&gt;
/instrumentation/nav[%d]/to-from/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/volume&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation Tacan ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/tacan[%d]/display/channel&lt;br /&gt;
/instrumentation/tacan[%d]/display/x-shift&lt;br /&gt;
/instrumentation/tacan[%d]/display/y-shift&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[1]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[2]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[3]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[4]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-mhz&lt;br /&gt;
/instrumentation/tacan[%d]/ident&lt;br /&gt;
/instrumentation/tacan[%d]/in-range&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-bearing-true-deg&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-distance-nm&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-ground-speed-kt&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-time-min&lt;br /&gt;
/instrumentation/tacan[%d]/name&lt;br /&gt;
/instrumentation/tacan[%d]/serviceable&lt;br /&gt;
/instrumentation/tacan[%d]/switch-position&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rotors (YASim only) ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/rotors/gear/torque-sound-filtered // Unused?&lt;br /&gt;
/rotors/gear/total-torque&lt;br /&gt;
/rotors/{name}/balance&lt;br /&gt;
/rotors/{name}/blade[%d]/flap-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/incidence-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/position-deg // Position relative to model&lt;br /&gt;
/rotors/{name}/bladesvisible // Used for animations&lt;br /&gt;
/rotors/{name}/cone%d-deg //e.g. cone-deg or cone2-deg&lt;br /&gt;
/rotors/{name}/roll-deg&lt;br /&gt;
/rotors/{name}/rpm&lt;br /&gt;
/rotors/{name}/stall&lt;br /&gt;
/rotors/{name}/stall-filtered&lt;br /&gt;
/rotors/{name}/tilt&lt;br /&gt;
/rotors/{name}/torque&lt;br /&gt;
/rotors/{name}/yaw-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For how to animate rotors using these properties, see [[Howto:Animate helicopters]].&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Aircraft-set.xml]]&lt;br /&gt;
* [[Multiplayer protocol]]&lt;br /&gt;
* [[Property browser]]&lt;br /&gt;
* [[PropertyList XML files]]&lt;br /&gt;
* [[Property tree]]&lt;br /&gt;
&lt;br /&gt;
=== Readme files ===&lt;br /&gt;
* {{readme file|properties}}&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
==== Consumables ====&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.hxx}}&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Flight Dynamics Model ====&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Instrumentation ====&lt;br /&gt;
* {{flightgear file|src/Instrumentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Property Tree]]&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Annunciators&amp;diff=140546</id>
		<title>Annunciators</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Annunciators&amp;diff=140546"/>
		<updated>2024-09-27T20:50:07Z</updated>

		<summary type="html">&lt;p&gt;Jsb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To better support external hardware &amp;quot;out of the box&amp;quot;, please consider using standard annunciator properties in your aircrafts as well as in your (input) device configs.&lt;br /&gt;
&lt;br /&gt;
see [[Aircraft properties reference]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Annunciators&amp;diff=140545</id>
		<title>Annunciators</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Annunciators&amp;diff=140545"/>
		<updated>2024-09-27T20:13:33Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Initial version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To better support external hardware &amp;quot;out of the box&amp;quot;, please consider to use standard annunciator properties in your aircrafts as well as in your (input) device configs.&lt;br /&gt;
&lt;br /&gt;
see [[Aircraft properties reference]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Input_helpers&amp;diff=140544</id>
		<title>Input helpers</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Input_helpers&amp;diff=140544"/>
		<updated>2024-09-27T19:59:47Z</updated>

		<summary type="html">&lt;p&gt;Jsb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is about Nasal script code for input devices like joysticks, yokes, throttle quadrands and pedals.&lt;br /&gt;
&lt;br /&gt;
While small scripts can be easily added directly into joystick &amp;lt;binding&amp;gt;, larger code blocks should be organized a bit differently. As always: &amp;quot;do not repeat yourself&amp;quot;. This means, to make everyones live easier, code should not be copy&amp;amp;pasted but put into a &amp;quot;central&amp;quot; place as functions or classes and be called whenever, wherever needed. This way, maintenance has to be done only in one place.&lt;br /&gt;
&lt;br /&gt;
=== input_helpers namespace ===&lt;br /&gt;
Input helper code should be stored in FGDATA/Nasal/input_helpers/&amp;lt;myvendor&amp;gt;.nas&lt;br /&gt;
&lt;br /&gt;
To avoid clashes, there should be one file per vendor and in each of these files a namespace (hash) for this vendor shall be created.&lt;br /&gt;
&lt;br /&gt;
See honeycomb.nas for an example:&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
# &lt;br /&gt;
# Helpers for Honeycomb input devices&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# !!! Abbreviated sample !!! &lt;br /&gt;
# Check FGDATA repository for latest full version&lt;br /&gt;
&lt;br /&gt;
# namespace&lt;br /&gt;
var honeycomb = {};&lt;br /&gt;
&lt;br /&gt;
# Helper for the Honeycomb Alpha Yoke&lt;br /&gt;
honeycomb[&amp;quot;alpha&amp;quot;] = {&lt;br /&gt;
    new: func(cfgnode) {&lt;br /&gt;
        var m = {&lt;br /&gt;
            parents: [me, input_helpers.config_manager.new(cfgnode)],&lt;br /&gt;
        };&lt;br /&gt;
        return m;&lt;br /&gt;
    },&lt;br /&gt;
    # abreviated file&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== config_manager - supporting config variants for a device ===&lt;br /&gt;
The &amp;lt;code&amp;gt;input_helpers.config_manager&amp;lt;/code&amp;gt; class is designed to allow configuration variants for an input device to be defined within a single XML config file.&lt;br /&gt;
&lt;br /&gt;
Why? Take the Honeycomb Bravo throttle quadrant as an example. It supports six levers with replaceable lever &amp;quot;heads&amp;quot;, one set for airliners and another one for GA single and dual engine models, so you can &amp;quot;configure&amp;quot; the hardware with levers from single throttle/mixture up to four jet engines.&lt;br /&gt;
&lt;br /&gt;
Now, you need a way to tell FlightGear, what levers you put onto your throttle quadrant and how to interprete the lever inputs. To avoid juggling with XML files, we simply put the limited number of variants into the XML and let the config_manager do the rest.&lt;br /&gt;
&lt;br /&gt;
If XML files containing &amp;lt;config-variants&amp;gt; are loaded during startup, config_manager will show a popup hint about this fact and open a dialog to select the desired config variant. The selection is added to aircraft.data and safed for convenience.&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;vendor-id&amp;gt;honeycomb&amp;lt;/vendor-id&amp;gt;&lt;br /&gt;
  &amp;lt;model-id&amp;gt;bravo&amp;lt;/model-id&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Honeycomb Aeronautical Bravo Throttle Quadrant&amp;lt;/name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;debug-events type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/debug-events&amp;gt;&lt;br /&gt;
  &amp;lt;hid-debug-raw type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/hid-debug-raw&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
  we need &amp;lt;nasal&amp;gt; to load the config_manager or a vendor&lt;br /&gt;
  specific derived class of it&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
  &amp;lt;nasal&amp;gt;&lt;br /&gt;
    &amp;lt;open&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      print(&amp;quot;Honeycomb Bravo Nasal (event) open&amp;quot;);&lt;br /&gt;
      bravo = input_helpers.honeycomb.bravo.new(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/open&amp;gt;&lt;br /&gt;
    &amp;lt;close&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      print(&amp;quot;Honeycomb Bravo Nasal (event) close&amp;quot;);&lt;br /&gt;
      if (ishash(bravo) and isfunc(bravo['close']))&lt;br /&gt;
        bravo.close(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/close&amp;gt;&lt;br /&gt;
  &amp;lt;/nasal&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
  now we can add &amp;lt;config-variants&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
  &amp;lt;config-variants&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
&amp;lt;!-- id must be a single word, no special chars, useable as hash key in Nasal --&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;jet2&amp;lt;/id&amp;gt; &lt;br /&gt;
&amp;lt;!-- text for the GUI dialog --&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Airliner (two engines)&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
  add property mappings for this variant. &lt;br /&gt;
  &amp;lt;input&amp;gt; is used in the &amp;lt;event&amp;gt; elements&lt;br /&gt;
  &amp;lt;output&amp;gt; is the target property input will be aliased to&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flight/speed-brake&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[5]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flaps-lever-continuous&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;jet4&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Airliner (four engines)&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flight/speed-brake&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[2]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[4]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[3]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[2]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[4]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[3]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[2]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[4]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[3]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[5]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flaps-lever-continuous&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;tm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Mixture&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;tpm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Prop/Mixture&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/propeller-pitch&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;ttmm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Mixture (two engines)&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;ttppmm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Prop/Mixture (two engines)&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/propeller-pitch&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/propeller-pitch&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[4]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[5]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
  &amp;lt;/config-variants&amp;gt;&lt;br /&gt;
&amp;lt;!-- events cut; see latest version in FGDATA repository --&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:Nasal]]&lt;br /&gt;
[[Category:Joysticks and Yokes]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Input_helper&amp;diff=140543</id>
		<title>Input helper</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Input_helper&amp;diff=140543"/>
		<updated>2024-09-27T19:59:17Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Jsb moved page Input helper to Input helpers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Input helpers]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Input_helpers&amp;diff=140542</id>
		<title>Input helpers</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Input_helpers&amp;diff=140542"/>
		<updated>2024-09-27T19:59:17Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Jsb moved page Input helper to Input helpers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is about Nasal script code for input devices like joysticks, yokes, throttle quadrands and pedals.&lt;br /&gt;
&lt;br /&gt;
While small scripts can be easily added directly into joystick &amp;lt;binding&amp;gt;, larger code blocks should be organized a bit differently. As always: &amp;quot;do not repeat yourself&amp;quot;. This means, to make everyones live easier, code should not be copy&amp;amp;pasted but put into a &amp;quot;central&amp;quot; place as functions or classes and be called whenever, wherever needed. This way, maintenance has to be done only in one place.&lt;br /&gt;
&lt;br /&gt;
=== input_helper namespace ===&lt;br /&gt;
Input helper code should be stored in FGDATA/Nasal/input_helpers/&amp;lt;myvendor&amp;gt;.nas&lt;br /&gt;
&lt;br /&gt;
To avoid clashes, there should be one file per vendor and in each of these files a namespace (hash) for this vendor shall be created.&lt;br /&gt;
&lt;br /&gt;
See honeycomb.nas for an example:&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
# &lt;br /&gt;
# Helpers for Honeycomb input devices&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# !!! Abbreviated sample !!! &lt;br /&gt;
# Check FGDATA repository for latest full version&lt;br /&gt;
&lt;br /&gt;
# namespace&lt;br /&gt;
var honeycomb = {};&lt;br /&gt;
&lt;br /&gt;
# Helper for the Honeycomb Alpha Yoke&lt;br /&gt;
honeycomb[&amp;quot;alpha&amp;quot;] = {&lt;br /&gt;
    new: func(cfgnode) {&lt;br /&gt;
        var m = {&lt;br /&gt;
            parents: [me, input_helpers.config_manager.new(cfgnode)],&lt;br /&gt;
        };&lt;br /&gt;
        return m;&lt;br /&gt;
    },&lt;br /&gt;
    # abreviated file&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== config_manager - supporting config variants for a device ===&lt;br /&gt;
The &amp;lt;code&amp;gt;input_helpers.config_manager&amp;lt;/code&amp;gt; class is designed to allow configuration variants for an input device to be defined within a single XML config file.&lt;br /&gt;
&lt;br /&gt;
Why? Take the Honeycomb Bravo throttle quadrant as an example. It supports six levers with replaceable lever &amp;quot;heads&amp;quot;, one set for airliners and another one for GA single and dual engine models, so you can &amp;quot;configure&amp;quot; the hardware with levers from single throttle/mixture up to four jet engines.&lt;br /&gt;
&lt;br /&gt;
Now, you need a way to tell FlightGear, what levers you put onto your throttle quadrant and how to interprete the lever inputs. To avoid juggling with XML files, we simply put the limited number of variants into the XML and let the config_manager do the rest.&lt;br /&gt;
&lt;br /&gt;
If XML files containing &amp;lt;config-variants&amp;gt; are loaded during startup, config_manager will show a popup hint about this fact and open a dialog to select the desired config variant. The selection is added to aircraft.data and safed for convenience.&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;vendor-id&amp;gt;honeycomb&amp;lt;/vendor-id&amp;gt;&lt;br /&gt;
  &amp;lt;model-id&amp;gt;bravo&amp;lt;/model-id&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Honeycomb Aeronautical Bravo Throttle Quadrant&amp;lt;/name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;debug-events type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/debug-events&amp;gt;&lt;br /&gt;
  &amp;lt;hid-debug-raw type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/hid-debug-raw&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
  we need &amp;lt;nasal&amp;gt; to load the config_manager or a vendor&lt;br /&gt;
  specific derived class of it&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
  &amp;lt;nasal&amp;gt;&lt;br /&gt;
    &amp;lt;open&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      print(&amp;quot;Honeycomb Bravo Nasal (event) open&amp;quot;);&lt;br /&gt;
      bravo = input_helpers.honeycomb.bravo.new(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/open&amp;gt;&lt;br /&gt;
    &amp;lt;close&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      print(&amp;quot;Honeycomb Bravo Nasal (event) close&amp;quot;);&lt;br /&gt;
      if (ishash(bravo) and isfunc(bravo['close']))&lt;br /&gt;
        bravo.close(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/close&amp;gt;&lt;br /&gt;
  &amp;lt;/nasal&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
  now we can add &amp;lt;config-variants&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
  &amp;lt;config-variants&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
&amp;lt;!-- id must be a single word, no special chars, useable as hash key in Nasal --&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;jet2&amp;lt;/id&amp;gt; &lt;br /&gt;
&amp;lt;!-- text for the GUI dialog --&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Airliner (two engines)&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
  add property mappings for this variant. &lt;br /&gt;
  &amp;lt;input&amp;gt; is used in the &amp;lt;event&amp;gt; elements&lt;br /&gt;
  &amp;lt;output&amp;gt; is the target property input will be aliased to&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flight/speed-brake&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[5]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flaps-lever-continuous&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;jet4&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Airliner (four engines)&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flight/speed-brake&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[2]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[4]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[3]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[2]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[4]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[3]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[2]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[4]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[3]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[5]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flaps-lever-continuous&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;tm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Mixture&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;tpm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Prop/Mixture&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/propeller-pitch&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;ttmm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Mixture (two engines)&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;ttppmm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Prop/Mixture (two engines)&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/propeller-pitch&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/propeller-pitch&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[4]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[5]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
  &amp;lt;/config-variants&amp;gt;&lt;br /&gt;
&amp;lt;!-- events cut; see latest version in FGDATA repository --&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:Nasal]]&lt;br /&gt;
[[Category:Joysticks and Yokes]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Input_helpers&amp;diff=140541</id>
		<title>Input helpers</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Input_helpers&amp;diff=140541"/>
		<updated>2024-09-27T19:57:59Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Initial version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is about Nasal script code for input devices like joysticks, yokes, throttle quadrands and pedals.&lt;br /&gt;
&lt;br /&gt;
While small scripts can be easily added directly into joystick &amp;lt;binding&amp;gt;, larger code blocks should be organized a bit differently. As always: &amp;quot;do not repeat yourself&amp;quot;. This means, to make everyones live easier, code should not be copy&amp;amp;pasted but put into a &amp;quot;central&amp;quot; place as functions or classes and be called whenever, wherever needed. This way, maintenance has to be done only in one place.&lt;br /&gt;
&lt;br /&gt;
=== input_helper namespace ===&lt;br /&gt;
Input helper code should be stored in FGDATA/Nasal/input_helpers/&amp;lt;myvendor&amp;gt;.nas&lt;br /&gt;
&lt;br /&gt;
To avoid clashes, there should be one file per vendor and in each of these files a namespace (hash) for this vendor shall be created.&lt;br /&gt;
&lt;br /&gt;
See honeycomb.nas for an example:&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
# &lt;br /&gt;
# Helpers for Honeycomb input devices&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# !!! Abbreviated sample !!! &lt;br /&gt;
# Check FGDATA repository for latest full version&lt;br /&gt;
&lt;br /&gt;
# namespace&lt;br /&gt;
var honeycomb = {};&lt;br /&gt;
&lt;br /&gt;
# Helper for the Honeycomb Alpha Yoke&lt;br /&gt;
honeycomb[&amp;quot;alpha&amp;quot;] = {&lt;br /&gt;
    new: func(cfgnode) {&lt;br /&gt;
        var m = {&lt;br /&gt;
            parents: [me, input_helpers.config_manager.new(cfgnode)],&lt;br /&gt;
        };&lt;br /&gt;
        return m;&lt;br /&gt;
    },&lt;br /&gt;
    # abreviated file&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== config_manager - supporting config variants for a device ===&lt;br /&gt;
The &amp;lt;code&amp;gt;input_helpers.config_manager&amp;lt;/code&amp;gt; class is designed to allow configuration variants for an input device to be defined within a single XML config file.&lt;br /&gt;
&lt;br /&gt;
Why? Take the Honeycomb Bravo throttle quadrant as an example. It supports six levers with replaceable lever &amp;quot;heads&amp;quot;, one set for airliners and another one for GA single and dual engine models, so you can &amp;quot;configure&amp;quot; the hardware with levers from single throttle/mixture up to four jet engines.&lt;br /&gt;
&lt;br /&gt;
Now, you need a way to tell FlightGear, what levers you put onto your throttle quadrant and how to interprete the lever inputs. To avoid juggling with XML files, we simply put the limited number of variants into the XML and let the config_manager do the rest.&lt;br /&gt;
&lt;br /&gt;
If XML files containing &amp;lt;config-variants&amp;gt; are loaded during startup, config_manager will show a popup hint about this fact and open a dialog to select the desired config variant. The selection is added to aircraft.data and safed for convenience.&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;vendor-id&amp;gt;honeycomb&amp;lt;/vendor-id&amp;gt;&lt;br /&gt;
  &amp;lt;model-id&amp;gt;bravo&amp;lt;/model-id&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Honeycomb Aeronautical Bravo Throttle Quadrant&amp;lt;/name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;debug-events type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/debug-events&amp;gt;&lt;br /&gt;
  &amp;lt;hid-debug-raw type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/hid-debug-raw&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
  we need &amp;lt;nasal&amp;gt; to load the config_manager or a vendor&lt;br /&gt;
  specific derived class of it&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
  &amp;lt;nasal&amp;gt;&lt;br /&gt;
    &amp;lt;open&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      print(&amp;quot;Honeycomb Bravo Nasal (event) open&amp;quot;);&lt;br /&gt;
      bravo = input_helpers.honeycomb.bravo.new(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/open&amp;gt;&lt;br /&gt;
    &amp;lt;close&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      print(&amp;quot;Honeycomb Bravo Nasal (event) close&amp;quot;);&lt;br /&gt;
      if (ishash(bravo) and isfunc(bravo['close']))&lt;br /&gt;
        bravo.close(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/close&amp;gt;&lt;br /&gt;
  &amp;lt;/nasal&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
  now we can add &amp;lt;config-variants&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
  &amp;lt;config-variants&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
&amp;lt;!-- id must be a single word, no special chars, useable as hash key in Nasal --&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;jet2&amp;lt;/id&amp;gt; &lt;br /&gt;
&amp;lt;!-- text for the GUI dialog --&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Airliner (two engines)&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
  add property mappings for this variant. &lt;br /&gt;
  &amp;lt;input&amp;gt; is used in the &amp;lt;event&amp;gt; elements&lt;br /&gt;
  &amp;lt;output&amp;gt; is the target property input will be aliased to&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flight/speed-brake&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[5]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flaps-lever-continuous&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;jet4&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Airliner (four engines)&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flight/speed-brake&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[2]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[4]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[3]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[2]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever-down-button[4]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[3]/cutoff&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[2]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/reverser[4]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[3]/reverser-cmd&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[5]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/flaps-lever-continuous&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;tm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Mixture&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;tpm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Prop/Mixture&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/propeller-pitch&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;ttmm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Mixture (two engines)&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
    &amp;lt;variant&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;ttppmm&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Throttle/Prop/Mixture (two engines)&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[1]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/throttle&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[2]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/propeller-pitch&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[3]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/propeller-pitch&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[4]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[0]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
      &amp;lt;mapping&amp;gt;&lt;br /&gt;
        &amp;lt;input&amp;gt;/input/honeycomb/bravo/lever[5]&amp;lt;/input&amp;gt;&lt;br /&gt;
        &amp;lt;output&amp;gt;/controls/engines/engine[1]/mixture&amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;/mapping&amp;gt;&lt;br /&gt;
    &amp;lt;/variant&amp;gt;&lt;br /&gt;
  &amp;lt;/config-variants&amp;gt;&lt;br /&gt;
&amp;lt;!-- events cut; see latest version in FGDATA repository --&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:Nasal]]&lt;br /&gt;
[[Category:Joysticks and Yokes]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=USB-HID&amp;diff=140540</id>
		<title>USB-HID</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=USB-HID&amp;diff=140540"/>
		<updated>2024-09-27T19:02:31Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Initial draft&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[draft]&lt;br /&gt;
&lt;br /&gt;
USB-HID (Human Interface Device) is one of the methods to connect input devices to FlightGear. &lt;br /&gt;
&lt;br /&gt;
==Linux access rights for devices==&lt;br /&gt;
HID devices under linux have usually restricted access rights, e.g. normal users are not allowed to access them directly. As you should not run FlightGear as root user, you most likely need to create a few udev rules to allow normal users to access the device files.&lt;br /&gt;
&lt;br /&gt;
First, use &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; to get a list of all detected USB devices. The output should look similar to this:&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Bus 003 Device 004: ID 294b:1901 Honeycomb Aeronautical Bravo Throttle Quadrant&lt;br /&gt;
Bus 003 Device 006: ID 06a3:0763 Saitek PLC Pro Flight Rudder Pedals&lt;br /&gt;
Bus 003 Device 002: ID 294b:1900 Honeycomb Aeronautical Alpha Flight Controls&lt;br /&gt;
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub&lt;br /&gt;
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Find the lines containing your relevant input devices (joysticks, yoke, throttle, pedals, ...) and note the IDs. The format is &amp;lt;vendor-id&amp;gt;:&amp;lt;device-id&amp;gt;. For simplicity, this example uses only the vendor-id.&lt;br /&gt;
&lt;br /&gt;
On Ubuntu, you can add for example the following file under &amp;lt;code&amp;gt;/etc/udev/rules.d&amp;lt;/code&amp;gt; to allow r/w access to members of the &amp;lt;code&amp;gt;input&amp;lt;/code&amp;gt; user group. Of course, you have to add/modify the lines to match the vendor-ids of your devices.&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/udev/rules.d/40-usb-flightgear.rules&lt;br /&gt;
#&lt;br /&gt;
# To add your user to the input group try:&lt;br /&gt;
# sudo usermod --append --groups input &amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Honeycomb&lt;br /&gt;
SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{idVendor}==&amp;quot;294b&amp;quot;, GROUP=&amp;quot;input&amp;quot;, MODE=&amp;quot;0664&amp;quot;&lt;br /&gt;
# saitek&lt;br /&gt;
SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{idVendor}==&amp;quot;06a3&amp;quot;, GROUP=&amp;quot;input&amp;quot;, MODE=&amp;quot;0664&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;To activate the new rules, try &amp;lt;code&amp;gt;udevadm control --reload-rules &amp;amp;&amp;amp; udevadm trigger&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
If this does not help, a reboot will do.&lt;br /&gt;
&lt;br /&gt;
==Developing Configuration files for input devices==&lt;br /&gt;
&lt;br /&gt;
=== Gathering data ===&lt;br /&gt;
Add the following parameters to your FlightGear command line or via the launcher Settings&amp;gt;Additional Settings&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
--log-class=input&lt;br /&gt;
--log-level=debug&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will create a lot of debug output for the input systems in which you can find all events supported by your devices&lt;br /&gt;
&lt;br /&gt;
=== Creating a config file ===&lt;br /&gt;
The configuration files shall be stored in FGDATA/Input/Event/&amp;lt;Vendor&amp;gt;/&amp;lt;Model&amp;gt;.xml &lt;br /&gt;
&lt;br /&gt;
As a starting point you can copy this example. Replace the data as needed.&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;!-- next two must be single word, no special characters! --&amp;gt;&lt;br /&gt;
  &amp;lt;vendor-id&amp;gt;honeycomb&amp;lt;/vendor-id&amp;gt;&lt;br /&gt;
  &amp;lt;model-id&amp;gt;bravo&amp;lt;/model-id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- &lt;br /&gt;
  the name as seen e.g. in lsusb or the debug output of flightgear &lt;br /&gt;
  multiple &amp;lt;name&amp;gt;&amp;lt;/name&amp;gt; lines are allowed to match name variants&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Honeycomb Aeronautical Bravo Throttle Quadrant&amp;lt;/name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- &lt;br /&gt;
  during development, set this to true to get more debug output&lt;br /&gt;
  do not forget to set it to false, when you finalize your config file&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
  &amp;lt;debug-events type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/debug-events&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nasal&amp;gt;&lt;br /&gt;
    &amp;lt;open&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      #print(&amp;quot;Honeycomb Bravo Nasal (event) open&amp;quot;);&lt;br /&gt;
      #bravo = input_helpers.honeycomb.bravo.new(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/open&amp;gt;&lt;br /&gt;
    &amp;lt;close&amp;gt;&lt;br /&gt;
      &amp;lt;![CDATA[&lt;br /&gt;
      #print(&amp;quot;Honeycomb Bravo Nasal (event) close&amp;quot;);&lt;br /&gt;
      #if (ishash(bravo) and isfunc(bravo['close']))&lt;br /&gt;
      #  bravo.close(cmdarg());&lt;br /&gt;
      ]]&amp;gt;&lt;br /&gt;
    &amp;lt;/close&amp;gt;&lt;br /&gt;
  &amp;lt;/nasal&amp;gt;&lt;br /&gt;
  &amp;lt;!-- events shall follow here --&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Example for an axis event:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;event&amp;gt;&lt;br /&gt;
    &amp;lt;desc&amp;gt;Lever 0&amp;lt;/desc&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;abs-x-translate&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;min-range&amp;gt;-1023&amp;lt;/min-range&amp;gt;&lt;br /&gt;
    &amp;lt;max-range&amp;gt;1023&amp;lt;/max-range&amp;gt;&lt;br /&gt;
    &amp;lt;binding&amp;gt;&lt;br /&gt;
      &amp;lt;command&amp;gt;property-scale&amp;lt;/command&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/input/honeycomb/bravo/lever[0]&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
  &amp;lt;/event&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Example for a button event:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;event&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;button-1&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;desc&amp;gt;AP mode HDG&amp;lt;/desc&amp;gt;&lt;br /&gt;
    &amp;lt;repeatable&amp;gt;false&amp;lt;/repeatable&amp;gt;&lt;br /&gt;
    &amp;lt;binding&amp;gt;&lt;br /&gt;
      &amp;lt;command&amp;gt;property-assign&amp;lt;/command&amp;gt;&lt;br /&gt;
      &amp;lt;property&amp;gt;/input/honeycomb/bravo/buttons/hdg&amp;lt;/property&amp;gt;&lt;br /&gt;
      &amp;lt;value&amp;gt;1&amp;lt;/value&amp;gt;&lt;br /&gt;
    &amp;lt;/binding&amp;gt;&lt;br /&gt;
    &amp;lt;mod-up&amp;gt;&lt;br /&gt;
      &amp;lt;binding&amp;gt;&lt;br /&gt;
        &amp;lt;command&amp;gt;property-assign&amp;lt;/command&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/input/honeycomb/bravo/buttons/hdg&amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;value&amp;gt;0&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/binding&amp;gt;&lt;br /&gt;
    &amp;lt;/mod-up&amp;gt;&lt;br /&gt;
  &amp;lt;/event&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Status of OS support==&lt;br /&gt;
Linux: Supported&lt;br /&gt;
&lt;br /&gt;
MacOS: supported?&lt;br /&gt;
&lt;br /&gt;
Windows: not yet supported?&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=140146</id>
		<title>Aircraft properties reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=140146"/>
		<updated>2024-07-26T12:57:58Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Controls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PropertyTree}}&lt;br /&gt;
&lt;br /&gt;
This is a generic '''aircraft properties reference'''.  There are many properties that are very common in aircraft, and many of them are present even in a very simple aircraft.  However, a complete description that matches all the properties is very unlikely to be written, as aircraft can be very different from each other.&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|2}}&lt;br /&gt;
&lt;br /&gt;
== What are properties? ==&lt;br /&gt;
{{main article|Property tree}}&lt;br /&gt;
=== The property tree ===&lt;br /&gt;
Most parts of FlightGear communicate with each other through key-value pair properties in the [[property tree]].  The properties represent both the input from the pilot, the values determining the position and velocity of the aircraft, the values used for animating the aircraft, and pretty much anything else.&lt;br /&gt;
&lt;br /&gt;
While many properties will be common between most aircraft, many properties will also be different between aircraft.  This becomes obvious if one consider the many different configurations (aircraft/helicopter/car, control surface and landing gear layout, number and locations of engines, etc) and propulsions systems (types of engines, types of fuels etc.) an aircraft can have.  There are also different flight dynamic models (FDMs) that have different needs.  In addition many properties will by necessity be aircraft specific, though developers should make a conscious effort to have properties map to more common ones if that is possible.&lt;br /&gt;
&lt;br /&gt;
=== Where are the properties defined? ===&lt;br /&gt;
There are a couple ways that the properties are set, but a fair amount of them just &amp;quot;appear&amp;quot; without being documented anywhere.  There are several places to look for properties.  One is in the aircraft files, starting from the aircraft specific [[aircraft-set.xml]] file, another is the [[Nasal]] files, and the last place (and often most useful!) is &amp;quot;grepping&amp;quot; (searching) through the C++ code.&lt;br /&gt;
&lt;br /&gt;
To determine how a property works and what it does often requires looking through any code that uses it.  This is a part of FlightGear that we could certainly document better&lt;br /&gt;
&lt;br /&gt;
== Annunciators [draft] ==&lt;br /&gt;
!! This section is work in progress !!&lt;br /&gt;
&lt;br /&gt;
The /instrumentation/annunciators section shall provide a central place for&lt;br /&gt;
&lt;br /&gt;
* aircrafts to write annunciator status data&lt;br /&gt;
* 3D aircraft models and external devices (like joysticks, yokes, throttle quadrants or custom made cockpit hardware) to read such data and drive status lights etc.&lt;br /&gt;
&lt;br /&gt;
Some of the props are automatically calculated by property rules in $FGDATA/Aircraft/Generic/generic-annunciators.xml other properties have to be calculated by the actual aircraft.&lt;br /&gt;
&lt;br /&gt;
The aircraft.nas module provides aircraft.light which allows easy implementation of blinking lights. Such lights have a bool property 'state' which tells if the light is on or off.&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/annunciators/doors&lt;br /&gt;
/instrumentation/annunciators/master-caution/state  # aircraft.light&lt;br /&gt;
/instrumentation/annunciators/master-warning/state  # aircraft.light&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/enabled&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/alt&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/apr&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/hdg&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/ias&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/nav&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/rev&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/vs&lt;br /&gt;
/instrumentation/annunciators/autoflight/flightdirector/enabled&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/engines/&lt;br /&gt;
/instrumentation/annunciators/engines/apu/enabled&lt;br /&gt;
/instrumentation/annunciators/engines/apu/fire&lt;br /&gt;
# summary props, 'sum' of all engines&lt;br /&gt;
/instrumentation/annunciators/engines/fire&lt;br /&gt;
/instrumentation/annunciators/engines/oil-pressure-low&lt;br /&gt;
/instrumentation/annunciators/engines/starter&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# for &amp;lt;gear-name&amp;gt; in {nose, left, right}&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/down&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/in-transition&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/unsafe&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/up&lt;br /&gt;
# gear summary&lt;br /&gt;
/instrumentation/annunciators/gear/down&lt;br /&gt;
/instrumentation/annunciators/gear/in-transition&lt;br /&gt;
/instrumentation/annunciators/gear/unsafe&lt;br /&gt;
/instrumentation/annunciators/gear/up &lt;br /&gt;
/instrumentation/annunciators/gear/parking-brake&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/systems/anti-ice/enabled&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/aux-pump&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/system[]/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/system[]/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/vacuum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Consumables ==&lt;br /&gt;
:''See also [[#Fuel]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lb&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lbs&lt;br /&gt;
/consumables/fuel/tank[%d]/level-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/capacity-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/density-ppg&lt;br /&gt;
/consumables/fuel/total-fuel-lbs&lt;br /&gt;
/consumables/fuel/total-gal_us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Controls ==&lt;br /&gt;
These properties are meant to represent the various cockpit controls (levers, switches, etc.)  Consider these the pilot input.&lt;br /&gt;
&lt;br /&gt;
=== Recommended usage ===&lt;br /&gt;
&lt;br /&gt;
* Animation of control elements (levers, switches, etc) themself in the 3D model of the cockpit&lt;br /&gt;
* As input to aircraft system simulation, e.g. hydraulics or electrical systems &lt;br /&gt;
&lt;br /&gt;
Avoid refering to control props directly for animating parts of the 3D model if there is an aircraft system (electric, hydraulic, ...) involved. &lt;br /&gt;
&lt;br /&gt;
Better use XML property rules (e.g. logic or filter) that calculate the component state from /controls/foo as well as &amp;quot;power available&amp;quot;, &amp;quot;component is serviceable&amp;quot; etc. &lt;br /&gt;
&lt;br /&gt;
=== Anti-ice ===&lt;br /&gt;
These properties control the various anti-ice properties that may be present in an aircraft.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/anti-ice/wing-heat&lt;br /&gt;
/controls/anti-ice/pitot-heat&lt;br /&gt;
/controls/anti-ice/wiper&lt;br /&gt;
/controls/anti-ice/window-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/carb-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/inlet-heat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== APU ===&lt;br /&gt;
These properties control any auxiliary power unit, in essence a small turbine engine driving generators, hydraulic pumps etc. before and after the aircraft's engines are up an running.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/APU/off-start-run&lt;br /&gt;
/controls/APU/fire-switch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Armament ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/armament/master-arm&lt;br /&gt;
/controls/armament/station-select&lt;br /&gt;
/controls/armament/release-all&lt;br /&gt;
/controls/armament/station[%d]/stick-size&lt;br /&gt;
/controls/armament/station[%d]/release-stick&lt;br /&gt;
/controls/armament/station[%d]/release-all&lt;br /&gt;
/controls/armament/station[%d]/jettison-all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Autoflight ===&lt;br /&gt;
These properties control the autopilot on certain airplanes. For [[IT-AUTOFLIGHT]] based systems, see [[IT-AUTOFLIGHT#Interface_Reference|here]].&lt;br /&gt;
&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/autoflight/autopilot[%d]/engage&lt;br /&gt;
/controls/autoflight/autothrottle-arm&lt;br /&gt;
/controls/autoflight/autothrottle-engage&lt;br /&gt;
/controls/autoflight/heading-select&lt;br /&gt;
/controls/autoflight/altitude-select&lt;br /&gt;
/controls/autoflight/bank-angle-select&lt;br /&gt;
/controls/autoflight/vertical-speed-select&lt;br /&gt;
/controls/autoflight/speed-select&lt;br /&gt;
/controls/autoflight/mach-select&lt;br /&gt;
/controls/autoflight/vertical-mode&lt;br /&gt;
/controls/autoflight/lateral-mode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Electric ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/electric/battery-switch&lt;br /&gt;
/controls/electric/external-power&lt;br /&gt;
/controls/electric/APU-generator&lt;br /&gt;
/controls/electric/engine[%d]/generator&lt;br /&gt;
/controls/electric/engine[%d]/bus-tie&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Engines ===&lt;br /&gt;
Engines are numbered engine[0] for a single engine to engine[0] to engine[3] for a 747 for example. (The model allows for up to 12 engines rumour has it ;-)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/engines/throttle_idle&lt;br /&gt;
/controls/engines/engine[%d]/throttle&lt;br /&gt;
/controls/engines/engine[%d]/starter&lt;br /&gt;
/controls/engines/engine[%d]/fuel-pump&lt;br /&gt;
/controls/engines/engine[%d]/fire-switch&lt;br /&gt;
/controls/engines/engine[%d]/fire-bottle-discharge&lt;br /&gt;
/controls/engines/engine[%d]/cutoff&lt;br /&gt;
/controls/engines/engine[%d]/mixture&lt;br /&gt;
/controls/engines/engine[%d]/propeller-pitch&lt;br /&gt;
/controls/engines/engine[%d]/magnetos&lt;br /&gt;
/controls/engines/engine[%d]/boost&lt;br /&gt;
/controls/engines/engine[%d]/WEP&lt;br /&gt;
/controls/engines/engine[%d]/cowl-flaps-norm&lt;br /&gt;
/controls/engines/engine[%d]/feather&lt;br /&gt;
/controls/engines/engine[%d]/ignition&lt;br /&gt;
/controls/engines/engine[%d]/augmentation&lt;br /&gt;
/controls/engines/engine[%d]/afterburner&lt;br /&gt;
/controls/engines/engine[%d]/reverser&lt;br /&gt;
/controls/engines/engine[%d]/water-injection&lt;br /&gt;
/controls/engines/engine[%d]/condition&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Flight controls ===&lt;br /&gt;
These properties control the flight controls surfaces, though often through a mechanical, analog or digital flight control system (FCS) that may or may not be modeled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/flight/aileron&lt;br /&gt;
/controls/flight/aileron-trim&lt;br /&gt;
/controls/flight/elevator&lt;br /&gt;
/controls/flight/elevator-trim&lt;br /&gt;
/controls/flight/rudder&lt;br /&gt;
/controls/flight/rudder-trim&lt;br /&gt;
/controls/flight/flaps&lt;br /&gt;
/controls/flight/slats&lt;br /&gt;
/controls/flight/BLC			// Boundary Layer Control&lt;br /&gt;
/controls/flight/spoilers&lt;br /&gt;
/controls/flight/speedbrake&lt;br /&gt;
/controls/flight/wing-sweep&lt;br /&gt;
/controls/flight/wing-fold&lt;br /&gt;
/controls/flight/drag-chute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The positions of the controls are usually put in &amp;lt;code&amp;gt;/surface-positions/&amp;lt;/code&amp;gt; at the discretion of the aircraft designer. These usually drive the animations of the control surfaces. They are either normalized (like &amp;lt;code&amp;gt;/surface-positions/elevator-pos-norm&amp;lt;/code&amp;gt;) or in degrees, and sometimes the aileron is split left/right.&lt;br /&gt;
&lt;br /&gt;
=== Fuel ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/fuel/dump-valve&lt;br /&gt;
/controls/fuel/tank[%d]/fuel_selector&lt;br /&gt;
/controls/fuel/tank[%d]/to_engine&lt;br /&gt;
/controls/fuel/tank[%d]/to_tank&lt;br /&gt;
/controls/fuel/tank[%d]/boost-pump[%d]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Gear ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/gear/brake-left&lt;br /&gt;
/controls/gear/brake-right&lt;br /&gt;
/controls/gear/brake-parking&lt;br /&gt;
/controls/gear/steering // Used if rudder is not sufficient for control of steering&lt;br /&gt;
/controls/gear/gear-down&lt;br /&gt;
/controls/gear/antiskid // Deprecated?&lt;br /&gt;
/controls/gear/tailhook&lt;br /&gt;
/controls/gear/tailwheel-lock&lt;br /&gt;
/controls/gear/wheel[%d]/alternate-extension&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Hydraulics ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/hydraulic/system[%d]/engine-pump&lt;br /&gt;
/controls/hydraulic/system[%d]/electric-pump&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Lights ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/lighting/landing-lights&lt;br /&gt;
/controls/lighting/turn-off-lights&lt;br /&gt;
/controls/lighting/formation-lights&lt;br /&gt;
/controls/lighting/taxi-light&lt;br /&gt;
/controls/lighting/logo-lights&lt;br /&gt;
/controls/lighting/nav-lights&lt;br /&gt;
/controls/lighting/beacon&lt;br /&gt;
/controls/lighting/strobe&lt;br /&gt;
/controls/lighting/panel-norm&lt;br /&gt;
/controls/lighting/instruments-norm&lt;br /&gt;
/controls/lighting/dome-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pneumatic ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pneumatic/APU-bleed&lt;br /&gt;
/controls/pneumatic/engine[%d]/bleed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pressurization ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pressurization/mode&lt;br /&gt;
/controls/pressurization/dump&lt;br /&gt;
/controls/pressurization/outflow-valve&lt;br /&gt;
/controls/pressurization/pack[%d]/pack-on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Seat ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/seat/vertical-adjust&lt;br /&gt;
/controls/seat/fore-aft-adjust&lt;br /&gt;
/controls/seat/cmd_selector_valve&lt;br /&gt;
/controls/seat/eject[%d]/initiate&lt;br /&gt;
/controls/seat/eject[%d]/status&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Engines ==&lt;br /&gt;
Status of engines. See also: /controls/engines/ &lt;br /&gt;
=== Common ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/fuel-flow-gph&lt;br /&gt;
/engines/engine[%d]/fuel-flow_pph&lt;br /&gt;
/engines/engine[%d]/thrust_lb&lt;br /&gt;
/engines/engine[%d]/running&lt;br /&gt;
/engines/engine[%d]/starter&lt;br /&gt;
/engines/engine[%d]/cranking&lt;br /&gt;
/engines/engine[%d]/fire&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turbine ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/n1&lt;br /&gt;
/engines/engine[%d]/n2&lt;br /&gt;
/engines/engine[%d]/epr&lt;br /&gt;
/engines/engine[%d]/augmentation&lt;br /&gt;
/engines/engine[%d]/water-injection&lt;br /&gt;
/engines/engine[%d]/ignition&lt;br /&gt;
/engines/engine[%d]/nozzle-pos-norm&lt;br /&gt;
/engines/engine[%d]/inlet-pos-norm&lt;br /&gt;
/engines/engine[%d]/reversed&lt;br /&gt;
/engines/engine[%d]/cutoff&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Piston ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/mp-osi&lt;br /&gt;
/engines/engine[%d]/egt-degf&lt;br /&gt;
/engines/engine[%d]/oil-temperature-degf&lt;br /&gt;
/engines/engine[%d]/oil-pressure-psi&lt;br /&gt;
/engines/engine[%d]/cht-degf&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Propeller ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
/engines/engine[%d]/pitch&lt;br /&gt;
/engines/engine[%d]/torque&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Flight Dynamics Model ==&lt;br /&gt;
=== Position ===&lt;br /&gt;
This will return the current position of the aircraft within FlightGear. This is also the stuff that is transmitted in [[Howto:Multiplayer|multiplayer]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/position/&lt;br /&gt;
/position/altitiude-ft ()&lt;br /&gt;
/position/altitude-agl-ft (22.46983965)&lt;br /&gt;
/position/altitude-ft (28.24368289)&lt;br /&gt;
/position/ground-elev-ft (-0.43513529)&lt;br /&gt;
/position/ground-elev-m (-0.1326292364)&lt;br /&gt;
/position/latitude-deg (37.61371436)&lt;br /&gt;
/position/latitude-string (37*36 49.4N)&lt;br /&gt;
/position/longitude-deg (-122.3576508)&lt;br /&gt;
/position/longitude-string (-122*21 27.5W)&lt;br /&gt;
/position/sea-level-radius-ft (20899648.76)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Orientation ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/orientation/roll-deg&lt;br /&gt;
/orientation/pitch-deg&lt;br /&gt;
/orientation/heading-deg&lt;br /&gt;
&lt;br /&gt;
/orientation/roll-rate-degps&lt;br /&gt;
/orientation/pitch-rate-degps&lt;br /&gt;
/orientation/yaw-rate-degps&lt;br /&gt;
&lt;br /&gt;
/orientation/side-slip-rad&lt;br /&gt;
/orientation/side-slip-deg&lt;br /&gt;
/orientation/alpha-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Velocities ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/velocities/airspeed-kt&lt;br /&gt;
/velocities/mach&lt;br /&gt;
/velocities/speed-north-fps&lt;br /&gt;
/velocities/speed-east-fps&lt;br /&gt;
/velocities/speed-down-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/uBody-fps&lt;br /&gt;
/velocities/vBody-fps&lt;br /&gt;
/velocities/wBody-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/vertical-speed-fps&lt;br /&gt;
/velocities/glideslope&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Acceleration ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/accelerations/nlf&lt;br /&gt;
&lt;br /&gt;
/accelerations/ned/north-accel-fps_sec&lt;br /&gt;
/accelerations/ned/east-accel-fps_sec&lt;br /&gt;
/accelerations/ned/down-accel-fps_sec&lt;br /&gt;
&lt;br /&gt;
/accelerations/pilot/x-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/y-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/z-accel-fps_sec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Gear ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gear/serviceable&lt;br /&gt;
/gear/gear[%d]/cast-angle-deg // The angle of the wheel where 0 is pointing straight forward&lt;br /&gt;
/gear/gear[%d]/compression-m&lt;br /&gt;
/gear/gear[%d]/compression-norm&lt;br /&gt;
/gear/gear[%d]/ground-friction-factor&lt;br /&gt;
/gear/gear[%d]/ground-is-solid&lt;br /&gt;
/gear/gear[%d]/has-brake&lt;br /&gt;
/gear/gear[%d]/rollspeed-ms // Speed of the wheel's rotation in meters per second&lt;br /&gt;
/gear/gear[%d]/wow // Weight-on-wheel&lt;br /&gt;
/gear/gear[%d]/xoffset-in&lt;br /&gt;
/gear/gear[%d]/yoffset-in&lt;br /&gt;
/gear/gear[%d]/zoffset-in&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf[%d]/&lt;br /&gt;
/instrumentation/airspeed-indicator/&lt;br /&gt;
/instrumentation/altimeter/&lt;br /&gt;
/instrumentation/annunciator/&lt;br /&gt;
/instrumentation/attitude-indicator/&lt;br /&gt;
/instrumentation/clock/&lt;br /&gt;
/instrumentation/comm[%d]/&lt;br /&gt;
/instrumentation/dme/&lt;br /&gt;
/instrumentation/efis/&lt;br /&gt;
/instrumentation/encoder/&lt;br /&gt;
/instrumentation/flightdirector/&lt;br /&gt;
/instrumentation/gps/&lt;br /&gt;
/instrumentation/gps-annunciator/&lt;br /&gt;
/instrumentation/heading-indicator/&lt;br /&gt;
/instrumentation/heading-indicator-fg/&lt;br /&gt;
/instrumentation/magnetic-compass/&lt;br /&gt;
/instrumentation/marker-beacon/&lt;br /&gt;
/instrumentation/nav[%d]/&lt;br /&gt;
/instrumentation/radar/&lt;br /&gt;
/instrumentation/slip-skid-ball/&lt;br /&gt;
/instrumentation/tacan[%d]/&lt;br /&gt;
/instrumentation/transponder/&lt;br /&gt;
/instrumentation/turn-indicator/&lt;br /&gt;
/instrumentation/vertical-speed-indicator/&lt;br /&gt;
/instrumentation/wxradar/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation ADF ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf[%d]/adf-btn&lt;br /&gt;
/instrumentation/adf[%d]/bro-btn&lt;br /&gt;
/instrumentation/adf[%d]/display-mode&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/running&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/start-time&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/time&lt;br /&gt;
/instrumentation/adf[%d]/error-deg&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/running&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/start-time&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/time&lt;br /&gt;
/instrumentation/adf[%d]/flt-btn&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/dial-1-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/dial-100-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/selected-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/standby-khz&lt;br /&gt;
/instrumentation/adf[%d]/frq-btn&lt;br /&gt;
/instrumentation/adf[%d]/ident&lt;br /&gt;
/instrumentation/adf[[%d]/ident-audible&lt;br /&gt;
/instrumentation/adf[%d]/in-range&lt;br /&gt;
/instrumentation/adf[%d]/indicated-bearing-deg&lt;br /&gt;
/instrumentation/adf[%d]/mode&lt;br /&gt;
/instrumentation/adf[%d]/model&lt;br /&gt;
/instrumentation/adf[%d]/operable&lt;br /&gt;
/instrumentation/adf[%d]/power-btn&lt;br /&gt;
/instrumentation/adf[%d]/right-display&lt;br /&gt;
/instrumentation/adf[%d]/rotation-deg&lt;br /&gt;
/instrumentation/adf[%d]/serviceable&lt;br /&gt;
/instrumentation/adf[%d]/set-btn&lt;br /&gt;
/instrumentation/adf[%d]/volume&lt;br /&gt;
/instrumentation/adf[%d]/volume-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation comm radio ===&lt;br /&gt;
See [[Aircraft_properties_reference/Instrumentation/COMM]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation NAV radio ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/nav[%d]/audio-btn&lt;br /&gt;
/instrumentation/nav[%d]/back-course-btn&lt;br /&gt;
/instrumentation/nav[%d]/cdi/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/crosstrack-error-m&lt;br /&gt;
/instrumentation/nav[%d]/crosstrack-heading-error-deg&lt;br /&gt;
/instrumentation/nav[%d]/data-is-valid&lt;br /&gt;
/instrumentation/nav[%d]/dme-in-range&lt;br /&gt;
/instrumentation/nav[%d]/filtered-cdiNAV0-deflection&lt;br /&gt;
/instrumentation/nav[%d]/filtered-gsNAV0-deflection&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/dial-khz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/dial-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/is-localizer-frequency&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/selected-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/selected-mhz-fmt&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/standby-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/standby-mhz-fmt&lt;br /&gt;
/instrumentation/nav[%d]/from-flag&lt;br /&gt;
/instrumentation/nav[%d]/frq-swap-btn&lt;br /&gt;
/instrumentation/nav[%d]/gs/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/gs-direct-deg&lt;br /&gt;
/instrumentation/nav[%d]/gs-distance&lt;br /&gt;
/instrumentation/nav[%d]/gs-in-range&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection-deg&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection-norm&lt;br /&gt;
/instrumentation/nav[%d]/gs-rate-of-climb&lt;br /&gt;
/instrumentation/nav[%d]/gs-rate-of-climb-fpm&lt;br /&gt;
/instrumentation/nav[%d]/has-gs&lt;br /&gt;
/instrumentation/nav[%d]/heading-deg&lt;br /&gt;
/instrumentation/nav[%d]/heading-needle-deflection&lt;br /&gt;
/instrumentation/nav[%d]/heading-needle-deflection-norm&lt;br /&gt;
/instrumentation/nav[%d]/ident&lt;br /&gt;
/instrumentation/nav[%d]/ident-audible&lt;br /&gt;
/instrumentation/nav[%d]/in-range&lt;br /&gt;
/instrumentation/nav[%d]/nav-distance&lt;br /&gt;
/instrumentation/nav[%d]/nav-id&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc1&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc2&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc3&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc4&lt;br /&gt;
/instrumentation/nav[%d]/nav-loc&lt;br /&gt;
/instrumentation/nav[%d]/operable&lt;br /&gt;
/instrumentation/nav[%d]/power-btn&lt;br /&gt;
/instrumentation/nav[%d]/radials/actual-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/reciprocal-radial-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/selected-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/target-auto-hdg-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/arget-radial-deg&lt;br /&gt;
/instrumentation/nav[%d]/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/signal-quality-norm&lt;br /&gt;
/instrumentation/nav[%d]/slaved-to-gps&lt;br /&gt;
/instrumentation/nav[%d]/time-to-intercept-sec&lt;br /&gt;
/instrumentation/nav[%d]/to-flag&lt;br /&gt;
/instrumentation/nav[%d]/to-from/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/volume&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation Tacan ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/tacan[%d]/display/channel&lt;br /&gt;
/instrumentation/tacan[%d]/display/x-shift&lt;br /&gt;
/instrumentation/tacan[%d]/display/y-shift&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[1]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[2]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[3]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[4]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-mhz&lt;br /&gt;
/instrumentation/tacan[%d]/ident&lt;br /&gt;
/instrumentation/tacan[%d]/in-range&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-bearing-true-deg&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-distance-nm&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-ground-speed-kt&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-time-min&lt;br /&gt;
/instrumentation/tacan[%d]/name&lt;br /&gt;
/instrumentation/tacan[%d]/serviceable&lt;br /&gt;
/instrumentation/tacan[%d]/switch-position&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rotors (YASim only) ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/rotors/gear/torque-sound-filtered // Unused?&lt;br /&gt;
/rotors/gear/total-torque&lt;br /&gt;
/rotors/{name}/balance&lt;br /&gt;
/rotors/{name}/blade[%d]/flap-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/incidence-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/position-deg // Position relative to model&lt;br /&gt;
/rotors/{name}/bladesvisible // Used for animations&lt;br /&gt;
/rotors/{name}/cone%d-deg //e.g. cone-deg or cone2-deg&lt;br /&gt;
/rotors/{name}/roll-deg&lt;br /&gt;
/rotors/{name}/rpm&lt;br /&gt;
/rotors/{name}/stall&lt;br /&gt;
/rotors/{name}/stall-filtered&lt;br /&gt;
/rotors/{name}/tilt&lt;br /&gt;
/rotors/{name}/torque&lt;br /&gt;
/rotors/{name}/yaw-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For how to animate rotors using these properties, see [[Howto:Animate helicopters]].&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Aircraft-set.xml]]&lt;br /&gt;
* [[Multiplayer protocol]]&lt;br /&gt;
* [[Property browser]]&lt;br /&gt;
* [[PropertyList XML files]]&lt;br /&gt;
* [[Property tree]]&lt;br /&gt;
&lt;br /&gt;
=== Readme files ===&lt;br /&gt;
* {{readme file|properties}}&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
==== Consumables ====&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.hxx}}&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Flight Dynamics Model ====&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Instrumentation ====&lt;br /&gt;
* {{flightgear file|src/Instrumentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Property Tree]]&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Nasal_library&amp;diff=140121</id>
		<title>Nasal library</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Nasal_library&amp;diff=140121"/>
		<updated>2024-07-14T08:10:02Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* contains() */ Correct comment (c&amp;amp;p error) and merge examples for better readability&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Nasal Navigation|nocat=1}}&lt;br /&gt;
This page documents the global '''library functions and variables''' of FlightGear's built-in scripting language, [[Nasal]]. This includes ''[[#Core library functions|core library functions]]'', which were included in Nasal before its integration into FlightGear, the ''[[#Extension functions|extension functions]]'', which have been subsequently added, and are specifically designed for FlightGear, and the ''[[#variables|global variables]]'', which are conversion variables, added with extension functions, for converting between units. The relevant folders in [[Git]] are:&lt;br /&gt;
* {{flightgear file|src/Scripting}}&lt;br /&gt;
* {{simgear file|simgear/nasal}}&lt;br /&gt;
&lt;br /&gt;
All these functions and variables are in the global namespace, that is, they are directly accessible (e.g., one can call &amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot; inline&amp;gt;magvar()&amp;lt;/syntaxhighlight&amp;gt; instead of &amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot; inline&amp;gt;namespace.magvar()&amp;lt;/syntaxhighlight&amp;gt;). However, if a namespace must be used, &amp;lt;code&amp;gt;globals&amp;lt;/code&amp;gt; is the correct namespace, but using it is not recommended. For a more complete explanation, see [[Nasal Namespaces in-depth]].&lt;br /&gt;
&lt;br /&gt;
{{tip|Copy &amp;amp; paste the examples into your [[Nasal Console]] and execute them to see what they do.|width=70%}}&lt;br /&gt;
&lt;br /&gt;
== Core library functions ==&lt;br /&gt;
This is the list of the basic '''core library functions.''' Most of these functions were part of the original Nasal library (before its integration in to FlightGear), while some have been added or changed over time.  See also:&lt;br /&gt;
* http://plausible.org/nasal/lib.html ([http://web.archive.org/web/20101010094553/http://plausible.org/nasal/lib.html archive])&lt;br /&gt;
* {{simgear file|simgear/nasal/lib.c}} ([http://sourceforge.net/p/flightgear/simgear/ci/next/log/?path=/simgear/nasal/lib.c history])&lt;br /&gt;
&lt;br /&gt;
=== append() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = append(vector, element[, element[, ...]]);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=42|t=Source}}&lt;br /&gt;
|text = This function appends, or adds, the given element(s) to the end of the vector given in the first argument.  Returns the vector operated on.&lt;br /&gt;
|param1 = vector&lt;br /&gt;
|param1text = The vector to which the arguments will be appended.&lt;br /&gt;
|param2 = element&lt;br /&gt;
|param2text = An element to be added to the vector.&lt;br /&gt;
|example1 = &lt;br /&gt;
var vector = [1, 2, 3]; # Initialize the vector&lt;br /&gt;
append(vector, 4); # Append the number 4 to the end of the vector&lt;br /&gt;
debug.dump(vector); # Print the contents of the vector&lt;br /&gt;
|example2 = &lt;br /&gt;
var vector = [1, 2, 3]; # Initialize the vector&lt;br /&gt;
append(vector, 4, 5, 6); # Append the numbers 4, 5, and 6 to the end of the vector&lt;br /&gt;
debug.dump(vector); # Print the contents of the vector&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== bind() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = bind(function, locals[, outer_scope]);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=502|t=Source}}&lt;br /&gt;
|text = This creates a new function object. A function in Nasal is three things: the actual code, a hash/namespace of local variables available to the function namespace, and the closure object of that namespace. These correspond to the three arguments respectively.&lt;br /&gt;
|param1 = function&lt;br /&gt;
|param1text = Function to evaluate.&lt;br /&gt;
|param2 = locals&lt;br /&gt;
|param2text = Hash containing values that will become the namespace (first closure) for the function.&lt;br /&gt;
|param3 = outer_scope&lt;br /&gt;
|param3text = Optional function which is bound to the next closure. This can be bound to yet another, making a linked list.&lt;br /&gt;
|example1 = # This is a namespace/hash with a single member, named &amp;quot;key,&amp;quot; which is initialized to 12 &lt;br /&gt;
var Namespace = {&lt;br /&gt;
    key: 12&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
# This is different namespace/hash containing a function&lt;br /&gt;
# dividing a variable &amp;quot;key&amp;quot; (which is unavailable/nil in this namespace) by 2&lt;br /&gt;
var AnotherNamespace = {&lt;br /&gt;
    ret: func {&lt;br /&gt;
        key /= 2;&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
# To see that key is not available, try to call AnotherNamespace.ret() first&lt;br /&gt;
call(AnotherNamespace.ret, [], nil, nil, var errors = []);&lt;br /&gt;
if(size(errors)){&lt;br /&gt;
    print(&amp;quot;Key could not be divided/resolved!&amp;quot;);&lt;br /&gt;
    debug.printerror(errors);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Associate the AnotherNamespace.ret() function with the first namespace&lt;br /&gt;
# so that &amp;quot;key&amp;quot; is now available&lt;br /&gt;
var function = bind(AnotherNamespace.ret, Namespace);&lt;br /&gt;
&lt;br /&gt;
# Invoke the new function&lt;br /&gt;
function();&lt;br /&gt;
&lt;br /&gt;
# Print out the value of Namespace.key&lt;br /&gt;
# It was changed to 12 from 6 by AnotherNamespace.ret()&lt;br /&gt;
print(Namespace.key);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== call() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = call(func[, args[, me[, locals[, error]]]);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=247|t=Source}}&lt;br /&gt;
|text = Calls the given function with the given arguments and returns the result.  This function is very useful as it allows much more control over function calls and catches any errors or {{func link|die()}} calls that would normally trigger run-time errors cancelling execution of the script otherwise. &lt;br /&gt;
|param1 = func&lt;br /&gt;
|param1text = Function to execute.&lt;br /&gt;
|param2 = args&lt;br /&gt;
|param2text = Vector containing arguments to give to the called function.&lt;br /&gt;
|param3 = me&lt;br /&gt;
|param3text = &amp;lt;code&amp;gt;'''me'''&amp;lt;/code&amp;gt; reference for the function call (i.e., for method calls). If given, this will override any &amp;lt;code&amp;gt;'''me'''&amp;lt;/code&amp;gt; value existing in the namespace (locals argument).&lt;br /&gt;
|param4 = locals&lt;br /&gt;
|param4text = A hash with key/value pairs that will be available to the called function, typically used as the namespace for the function to be called.&lt;br /&gt;
|param5 = error&lt;br /&gt;
|param5text = A vector to append errors to.  If the called function generates an error, the error, place, and line will be written to this.  These errors can be printed using {{func link|printerror()|debug}}.&lt;br /&gt;
|example1 =&lt;br /&gt;
# prints &amp;quot;Called from call()&amp;quot;&lt;br /&gt;
call(func {&lt;br /&gt;
    print(&amp;quot;Called from call()&amp;quot;);&lt;br /&gt;
});&lt;br /&gt;
|example2 =&lt;br /&gt;
# prints &amp;quot;a = 1 : b = 2&lt;br /&gt;
call(func(a, b){&lt;br /&gt;
        print(&amp;quot;a = &amp;quot;, a, &amp;quot; : b = &amp;quot;, b);&lt;br /&gt;
    },&lt;br /&gt;
    [1, 2]&lt;br /&gt;
);&lt;br /&gt;
|example3 =&lt;br /&gt;
var Hash = {&lt;br /&gt;
    new: func {&lt;br /&gt;
        var m = { parents: [Hash] };&lt;br /&gt;
&lt;br /&gt;
        m.el1 = &amp;quot;string1&amp;quot;;&lt;br /&gt;
        m.el2 = &amp;quot;string2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        return m;&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
# prints &amp;quot;me.el1 = string1&amp;quot;, then &amp;quot;me.el2 = string2&amp;quot; on the next line&lt;br /&gt;
call(func(a, b){        &lt;br /&gt;
        print(&amp;quot;me.el&amp;quot;, a, &amp;quot; = &amp;quot;, me[&amp;quot;el&amp;quot; ~ a]);      &lt;br /&gt;
        print(&amp;quot;me.el&amp;quot;, b, &amp;quot; = &amp;quot;, me[&amp;quot;el&amp;quot; ~ b]);&lt;br /&gt;
    },&lt;br /&gt;
    [1, 2],&lt;br /&gt;
    Hash.new()&lt;br /&gt;
);&lt;br /&gt;
|example4 =&lt;br /&gt;
# prints the value of math.pi&lt;br /&gt;
call(func {&lt;br /&gt;
        print(pi);&lt;br /&gt;
    }, nil, nil, &lt;br /&gt;
    math&lt;br /&gt;
);&lt;br /&gt;
|example5 =&lt;br /&gt;
call(func {&lt;br /&gt;
        print(math.ip); # math.ip doesn't exist&lt;br /&gt;
    }, nil, nil, nil,&lt;br /&gt;
    var errs = []&lt;br /&gt;
);&lt;br /&gt;
debug.printerror(errs); # The error is caught and printed using debug.printerror()&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== caller() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = caller([level]);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=404|t=Source}}&lt;br /&gt;
|text = Returns a vector containing a record from the current call stack.  The level numbering starts from the currently executing function (level 0).  Level 1 (the default) is the caller of the current function, and so on.&lt;br /&gt;
&lt;br /&gt;
The result is a four-element vector containing '''[0]''' a hash of local variables, '''[1]''' the function object, '''[2]''' the full source file name (incl. path) and '''[3]''' the line number. &lt;br /&gt;
|param1 = level&lt;br /&gt;
|param1text = Optional integer specifying the stack level to return a result from.  Defaults to 1 (i.e. the caller of the currently executing function).&lt;br /&gt;
|example1 =&lt;br /&gt;
var myFunction = func(a, b){&lt;br /&gt;
    debug.dump(caller(0)[0]); # prints a hash of local variables, including arguments a and b&lt;br /&gt;
    return 2 * 2;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
print(&amp;quot;2 x 2 = &amp;quot;, myFunction(2, 2));&lt;br /&gt;
|example2 =&lt;br /&gt;
var get_arg_value = func(){&lt;br /&gt;
    print(&amp;quot;Argument to myFunc = &amp;quot;, caller(1)[0]['a']); # print the value of myFunc's single argument, using caller()&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
var myFunc = func(a){&lt;br /&gt;
    get_arg_value();&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
myFunc(3);&lt;br /&gt;
|example3text = This is a real example taken from {{fgdata file|Nasal/canvas/MapStructure.nas}}.  Function &amp;lt;code&amp;gt;r()&amp;lt;/code&amp;gt; (above the TODOs) returns a hash with the key/value pairs as per its arguments. For example, something like this is returned: &amp;lt;code&amp;gt;{ name: &amp;quot;&amp;lt;name&amp;gt;&amp;quot;, vis: 1, zindex: nil }&amp;lt;/code&amp;gt;.&lt;br /&gt;
|example3 =&lt;br /&gt;
var MapStructure_selfTest = func() {&lt;br /&gt;
	var temp = {};&lt;br /&gt;
	temp.dlg = canvas.Window.new([600,400],&amp;quot;dialog&amp;quot;);&lt;br /&gt;
	temp.canvas = temp.dlg.createCanvas().setColorBackground(1,1,1,0.5);&lt;br /&gt;
	temp.root = temp.canvas.createGroup();&lt;br /&gt;
	var TestMap = temp.root.createChild(&amp;quot;map&amp;quot;);&lt;br /&gt;
	TestMap.setController(&amp;quot;Aircraft position&amp;quot;);&lt;br /&gt;
	TestMap.setRange(25); # TODO: implement zooming/panning via mouse/wheel here, for lack of buttons :-/&lt;br /&gt;
	TestMap.setTranslation(&lt;br /&gt;
		temp.canvas.get(&amp;quot;view[0]&amp;quot;)/2,&lt;br /&gt;
		temp.canvas.get(&amp;quot;view[1]&amp;quot;)/2&lt;br /&gt;
	);&lt;br /&gt;
	var r = func(name,vis=1,zindex=nil) return caller(0)[0];&lt;br /&gt;
	# TODO: we'll need some z-indexing here, right now it's just random&lt;br /&gt;
	# TODO: use foreach/keys to show all layers in this case by traversing SymbolLayer.registry direclty ?&lt;br /&gt;
	# maybe encode implicit z-indexing for each lcontroller ctor call ? - i.e. preferred above/below order ?&lt;br /&gt;
	foreach(var type; [r('TFC',0),r('APT'),r('DME'),r('VOR'),r('NDB'),r('FIX',0),r('RTE'),r('WPT'),r('FLT'),r('WXR'),r('APS'), ] ) &lt;br /&gt;
		TestMap.addLayer(factory: canvas.SymbolLayer, type_arg: type.name,&lt;br /&gt;
					visible: type.vis, priority: type.zindex,&lt;br /&gt;
		);&lt;br /&gt;
}; # MapStructure_selfTest&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== chr() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = chr(code);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=175|t=Source}}&lt;br /&gt;
|text = Returns a character as per the single argument. Extended ASCII is supported (see http://www.asciitable.com/ for a list of supported characters), although this may vary between different systems.  For a list of the most commonly used characters, see the {{wikipedia|ASCII#ASCII printable code chart|ASCII printable code chart}} ('''Dec''' column). The following table lists supported control characters, along with their equivalent control characters in Nasal strings.  {{Note|In Nasal, only strings enclosed with double-quotes (&amp;lt;code&amp;gt;&amp;quot;string&amp;quot;&amp;lt;/code&amp;gt;) supports control chracters.  Strings in single quotes (&amp;lt;code&amp;gt;'string'&amp;lt;/code&amp;gt;) do not.}}&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Code !! Name !! Equivalent to&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} 10 {{!!}} {{Wikipedia|Newline}} {{!!}} &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} 9 {{!!}} {{Wikipedia|Tab key#Tab characters|Horizontal tab}} {{!!}} &amp;lt;code&amp;gt;\t&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} 13 {{!!}} {{Wikipedia|Carriage return}} {{!!}} &amp;lt;code&amp;gt;\r&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}}&lt;br /&gt;
|param1 = code&lt;br /&gt;
|param1text = Integer character code for the desired glyph.&lt;br /&gt;
|example1 = print(&amp;quot;Code 65 = &amp;quot;, chr(65)); # prints &amp;quot;Code 65 = A&amp;quot;&lt;br /&gt;
|example2text = This example displays all of the characters in a list, in the format &amp;lt;code&amp;gt;Code '''n''' = &amp;gt;'''char'''&amp;lt;&amp;lt;/code&amp;gt;, '''n''' being the index, and '''char''' being the character.&lt;br /&gt;
|example2 =&lt;br /&gt;
for(var i = 0; i &amp;lt;= 255; i += 1){&lt;br /&gt;
    print(&amp;quot;Code &amp;quot;, i, &amp;quot; = &amp;gt;&amp;quot;, chr(i), &amp;quot;&amp;lt;&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== closure() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = closure(func[, level]);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=421|t=Source}}&lt;br /&gt;
|text = Returns the hash table containing the lexical namespace of the given function. The level numbering start with level 0 being the namespace of '''func'''. &lt;br /&gt;
|param1 = func&lt;br /&gt;
|param1text = Function to evaluate.&lt;br /&gt;
|param2 = level&lt;br /&gt;
|param2text = Optional integer specifying the scope level.  Defaults to 0 (the namespace of '''func''').&lt;br /&gt;
|example1 =&lt;br /&gt;
var get_math_e = func {&lt;br /&gt;
    return e; # return the value of math.e&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
var myFunction = bind(get_math_e, math); # bind get_math_e to the math namespace, so that math.e is immediately available to get_math_e&lt;br /&gt;
debug.dump(closure(myFunction)); # print the namespace of get_math_e&lt;br /&gt;
&lt;br /&gt;
print(myFunction());&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== cmp() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = cmp(a, b);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=112|t=Source}}&lt;br /&gt;
|text = Compares two strings, returning -1 if '''a''' is less than '''b''', 0 if they are identical and 1 if '''a''' is greater than '''b'''. &lt;br /&gt;
|param1 = a&lt;br /&gt;
|param1text = First string argument for comparison.&lt;br /&gt;
|param2 = b&lt;br /&gt;
|param2text = Second string argument for comparison.&lt;br /&gt;
|example1 = print(cmp(&amp;quot;1&amp;quot;, &amp;quot;two&amp;quot;)); # prints -1&lt;br /&gt;
|example2 = print(cmp(&amp;quot;string&amp;quot;, &amp;quot;string&amp;quot;)); # prints 0&lt;br /&gt;
|example3 = print(cmp(&amp;quot;one&amp;quot;, &amp;quot;2&amp;quot;)); # prints 1&lt;br /&gt;
|example4 = print(cmp(&amp;quot;string1&amp;quot;, &amp;quot;string2&amp;quot;)); # prints -1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== compile() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = compile(code[, filename]);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=220|t=Source}}&lt;br /&gt;
|text = Compiles the specified code string and returns a function object bound to the current lexical context.  If there is an error, the function dies, with the argument to {{func link|die()}} being '''filename'''.&lt;br /&gt;
|param1 = code&lt;br /&gt;
|param1text = String containing Nasal code to be compiled.&lt;br /&gt;
|param2 = filename&lt;br /&gt;
|param2text = Optional string used for error messages/logging. Defaults to &amp;lt;code&amp;gt;&amp;lt;compile&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|example1 = &lt;br /&gt;
var myCode = 'print(&amp;quot;hello&amp;quot;);';&lt;br /&gt;
var helloFunc = compile(myCode, &amp;quot;myCode&amp;quot;);&lt;br /&gt;
helloFunc();&lt;br /&gt;
|example2text = &amp;lt;code&amp;gt;compile&amp;lt;/code&amp;gt; is very convenient to support Nasal loaded from other files.  For instance, [[PropertyList XML files]] (such as GUI dialogs) may contain embedded Nasal sections that need to be parsed, processed and compiled.  For an example of how to do this, save the below XML code as &amp;lt;tt&amp;gt;''[[$FG_ROOT]]/gui/dialogs/test.xml''&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nasal&amp;gt;&amp;lt;![CDATA[&lt;br /&gt;
print(&amp;quot;You have FlightGear v&amp;quot;, getprop(&amp;quot;/sim/version/flightgear&amp;quot;));&lt;br /&gt;
]]&amp;gt;&amp;lt;/nasal&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Now, start FlightGear and execute this code in the [[Nasal Console]].&lt;br /&gt;
|example2 =&lt;br /&gt;
# Build the path&lt;br /&gt;
var FGRoot = getprop(&amp;quot;/sim/fg-root&amp;quot;);&lt;br /&gt;
var filename = &amp;quot;/gui/dialogs/test.xml&amp;quot;;&lt;br /&gt;
var path = FGRoot ~ filename;&lt;br /&gt;
&lt;br /&gt;
var blob = io.read_properties(path);&lt;br /&gt;
var script = blob.getValues().nasal; # Get the nasal string&lt;br /&gt;
&lt;br /&gt;
# Compile the script.  We're passing the filename here for better runtime diagnostics &lt;br /&gt;
var code = call(func {&lt;br /&gt;
    compile(script, filename);&lt;br /&gt;
}, nil, nil, var compilation_errors = []);&lt;br /&gt;
&lt;br /&gt;
if(size(compilation_errors)){&lt;br /&gt;
    die(&amp;quot;Error compiling code in: &amp;quot; ~ filename);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Invoke the compiled script, equivalent to code(); &lt;br /&gt;
# We're using call() here to detect errors:&lt;br /&gt;
call(code, [], nil, nil, var runtime_errors = []);&lt;br /&gt;
&lt;br /&gt;
if(size(runtime_errors)){&lt;br /&gt;
    die(&amp;quot;Error calling code compiled loaded from: &amp;quot; ~ filename);&lt;br /&gt;
}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== contains() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = contains(hash, key);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=184|t=Source}}&lt;br /&gt;
|text = Returns 1 (True) if the hash contains the specified key, or 0 (False) if not.&lt;br /&gt;
|param1 = hash&lt;br /&gt;
|param1text = The hash to search in.&lt;br /&gt;
|param2 = key&lt;br /&gt;
|param2text = The scalar to be searched for, contained as a key in the hash.&lt;br /&gt;
|example1 =&lt;br /&gt;
# Initialize a hash&lt;br /&gt;
var hash = {&lt;br /&gt;
    element: &amp;quot;value&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
print(contains(hash, &amp;quot;element&amp;quot;) ? &amp;quot;Yes&amp;quot; : &amp;quot;No&amp;quot;); # This will print &amp;quot;Yes&amp;quot;&lt;br /&gt;
print(contains(hash, &amp;quot;element2&amp;quot;) ? &amp;quot;Yes&amp;quot; : &amp;quot;No&amp;quot;); # This will print &amp;quot;No&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===contains()===&lt;br /&gt;
{{Requires commit|desc=Vector support|details=see {{Merge-request|project=fgdata|id=305}}|commit=ee39abbd3b70c9b6d5e3a1c4ccedddaac1a92b11|repo=Simgear}}&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = contains(vector, item);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=184|t=Source}}&lt;br /&gt;
|text = Returns 1 (True) if the vector contains the specified item, or 0 (False) if not.&lt;br /&gt;
|param1 = vector&lt;br /&gt;
|param1text = The vector to search in.&lt;br /&gt;
|param2 = item&lt;br /&gt;
|param2text = The object to be searched for in the vector.&lt;br /&gt;
|example1 =&lt;br /&gt;
# Initialize a vector&lt;br /&gt;
var vec = [&amp;quot;element&amp;quot;, &amp;quot;foo&amp;quot;];&lt;br /&gt;
print(contains(vec, &amp;quot;element&amp;quot;) ? &amp;quot;Yes&amp;quot; : &amp;quot;No&amp;quot;); # This will print &amp;quot;Yes&amp;quot;&lt;br /&gt;
print(contains(vec, &amp;quot;element2&amp;quot;) ? &amp;quot;Yes&amp;quot; : &amp;quot;No&amp;quot;); # This will print &amp;quot;No&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===delete() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = delete(hash, key);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=83|t=Source}}&lt;br /&gt;
|text = Deletes the key from the hash if it exists. Operationally, this is NOT identical to setting the hash value specified by the key to &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; as the key will stay in the hash (at least for a while). This variant potentially frees storage by deleting the reference to the key and by shrinking the hash.  Returns the hash that has been operated on.&lt;br /&gt;
|param1 = hash&lt;br /&gt;
|param1text = The hash from which to delete the key.&lt;br /&gt;
|param2 = key&lt;br /&gt;
|param2text = The scalar to be deleted, contained as a key in the hash.&lt;br /&gt;
|example1 =&lt;br /&gt;
# Initialize the hash&lt;br /&gt;
var hash = {&lt;br /&gt;
    element1: &amp;quot;value1&amp;quot;,&lt;br /&gt;
    element2: &amp;quot;value2&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
delete(hash, &amp;quot;element1&amp;quot;); # Delete element1&lt;br /&gt;
debug.dump(hash); # prints the hash, which is now minus element1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===die()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = die(error);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=288|t=Source}}&lt;br /&gt;
|text = Terminates execution and unwinds the stack.  The place and the line will be added to the '''error'''.  This invokes the same internal exception handler used for internal runtime errors. Use this to signal fatal errors, or to implement exception handling. The error thrown (including internal runtime errors) can be caught with {{func link|call()}}.&lt;br /&gt;
|param1 = error&lt;br /&gt;
|param1text = String describing the error.&lt;br /&gt;
:{{inote|This parameter is technically optional, but it is highly recommended to use it.}}&lt;br /&gt;
|example1 = &lt;br /&gt;
print(&amp;quot;Will print&amp;quot;);&lt;br /&gt;
die(&amp;quot;Don't go any further!&amp;quot;); &lt;br /&gt;
print(&amp;quot;Won't print&amp;quot;); # Will not be printed because die() stops the process&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== find()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = find(needle, haystack);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=450|t=Source}}&lt;br /&gt;
|text = Finds and returns the index of the first occurrence of the string '''needle''' in the string '''haystack''', or -1 if no such occurrence was found.&lt;br /&gt;
|param1 = needle&lt;br /&gt;
|param1text = String to search for.&lt;br /&gt;
|param2 = haystack&lt;br /&gt;
|param2text = String to search in.&lt;br /&gt;
|example1 = print(find(&amp;quot;c&amp;quot;, &amp;quot;abcdef&amp;quot;)); # prints 2&lt;br /&gt;
|example2 = print(find(&amp;quot;x&amp;quot;, &amp;quot;abcdef&amp;quot;)); # prints -1&lt;br /&gt;
|example3 = print(find(&amp;quot;cd&amp;quot;, &amp;quot;abcdef&amp;quot;)); # prints 2&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===ghosttype()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = ghosttype(ghost);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=207|t=Source}}&lt;br /&gt;
|text = Returns a string containing either a descriptive name of a ghost (a raw C/C++ object), or a unique id (the pointer to the C/C++ &amp;lt;code&amp;gt;naGhostType&amp;lt;/code&amp;gt; instance) if no name has been set.  Ghost is an acronym that stands for '''G'''arbage-collected '''H'''andle to '''O'''ut'''S'''ide '''T'''hingy.&lt;br /&gt;
|param1 = ghost&lt;br /&gt;
|param1text = Ghost to return a description for.&lt;br /&gt;
|example1 = print(ghosttype(airportinfo())); # prints &amp;quot;airport&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===id()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = id(object);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=570|t=Source}}&lt;br /&gt;
|text = Returns a string containing information on the type and ID of the object provided in the single argument.  The information is returned in the form of &amp;lt;code&amp;gt;'''&amp;lt;type&amp;gt;''':'''&amp;lt;id&amp;gt;'''&amp;lt;/code&amp;gt;, where '''&amp;lt;type&amp;gt;''' is the type of object, and '''&amp;lt;id&amp;gt;''' is the ID.&lt;br /&gt;
|param1 = object&lt;br /&gt;
|param1text = Can be either of a string, a vector, a hash, a code, a function, or a ghost.&lt;br /&gt;
|example1 = print(id(&amp;quot;A&amp;quot;)); # prints &amp;quot;str:000000001624A590&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===int() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = int(number);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=90|t=Source}}&lt;br /&gt;
|text = Returns the integer part of the numeric value of the single argument, or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; if none exists.&lt;br /&gt;
|param1 = number&lt;br /&gt;
|param1text = Number or string with just a number in it to return an integer from.&lt;br /&gt;
|example1 = print(int(23)); # prints &amp;quot;23&amp;quot;&lt;br /&gt;
|example2 = print(int(23.123)); # prints &amp;quot;23&amp;quot;&lt;br /&gt;
|example3 = debug.dump(int(&amp;quot;string&amp;quot;)); # prints &amp;quot;nil&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===keys()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = keys(hash);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=33|t=Source}}&lt;br /&gt;
|text = Returns a vector containing the list of keys found in the single hash argument. &lt;br /&gt;
|param1 = hash&lt;br /&gt;
|param1text = The hash to return the keys from.&lt;br /&gt;
|example1 = &lt;br /&gt;
# Initialize a hash&lt;br /&gt;
var hash = {&lt;br /&gt;
    element1: &amp;quot;value&amp;quot;,&lt;br /&gt;
    element2: &amp;quot;value&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
debug.dump(keys(hash)); # print the vector&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===left()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = left(string, length);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=149|t=Source}}&lt;br /&gt;
|version = 2.12&lt;br /&gt;
|commit = {{simgear commit|bd7163|t=commit}}&lt;br /&gt;
|text = Returns a substring of '''string''', starting from the left.&lt;br /&gt;
|param1 = string&lt;br /&gt;
|param1text = String to return part of.&lt;br /&gt;
|param2 = length&lt;br /&gt;
|param2text = Integer specifying the length of the substring to return.&lt;br /&gt;
|example1 = print(left(&amp;quot;string&amp;quot;, 2)); # prints &amp;quot;st&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== num()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = num(number);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=102|t=Source}}&lt;br /&gt;
|text = Returns the numerical value of the single string argument, or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; if none exists. &lt;br /&gt;
|param1 = number&lt;br /&gt;
|param1text = String with just a number in it to return a number from.&lt;br /&gt;
|example1 = print(num(&amp;quot;23&amp;quot;)); # prints &amp;quot;23&amp;quot;&lt;br /&gt;
|example2 = print(num(&amp;quot;23.123&amp;quot;)); # prints &amp;quot;23.123&amp;quot;&lt;br /&gt;
|example3 = debug.dump(num(&amp;quot;string&amp;quot;)); # prints &amp;quot;nil&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===pop()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = pop(vector);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=50|t=Source}}&lt;br /&gt;
|text = Removes and returns the last element of the single vector argument, or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; if the vector is empty. &lt;br /&gt;
|param1 = vector&lt;br /&gt;
|param1text = Vector to remove an element from.&lt;br /&gt;
|example1 = &lt;br /&gt;
var vector = [1, 2, 3];&lt;br /&gt;
pop(vector);&lt;br /&gt;
debug.dump(vector); # prints &amp;quot;[1, 2]&amp;quot;&lt;br /&gt;
|example2 = &lt;br /&gt;
var vector = [1, 2, 3];&lt;br /&gt;
debug.dump(pop(vector)); # prints &amp;quot;3&amp;quot;&lt;br /&gt;
|example3 = &lt;br /&gt;
var vector = [];&lt;br /&gt;
debug.dump(pop(vector)); # prints &amp;quot;nil&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===right()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = right(string, length);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=161|t=Source}}&lt;br /&gt;
|version = 2.12&lt;br /&gt;
|commit = {{simgear commit|bd7163|t=commit}}&lt;br /&gt;
|text = Returns a substring of '''string''', starting from the right.&lt;br /&gt;
|param1 = string&lt;br /&gt;
|param1text = String to return part of.&lt;br /&gt;
|param2 = length&lt;br /&gt;
|param2text = Integer specifying the length of the substring to return.&lt;br /&gt;
|example1 = print(right(&amp;quot;string&amp;quot;, 2)); # prints &amp;quot;ng&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== setsize()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = setsize(vector, size);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=56|t=Source}}&lt;br /&gt;
|text = Sets the size of a vector. The first argument specifies a vector, the second a number representing the desired size of that vector. If the vector is currently larger than the specified size, it is truncated. If it is smaller, it is padded with &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; entries. Returns the vector operated upon. &lt;br /&gt;
|param1 = vector&lt;br /&gt;
|param1text = The vector to be operated on.&lt;br /&gt;
|param2 = size&lt;br /&gt;
|param2text = The desired size of the vector in number of entries.&lt;br /&gt;
|example1 = &lt;br /&gt;
var vector = [1, 2, 3]; # Initialize a vector&lt;br /&gt;
setsize(vector, 4);&lt;br /&gt;
debug.dump(vector); # print the vector&lt;br /&gt;
|example2 = &lt;br /&gt;
var vector = [1, 2, 3]; # Initialize a vector&lt;br /&gt;
setsize(vector, 2);&lt;br /&gt;
debug.dump(vector); # print the vector&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===size()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = size(object);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=23|t=Source}}&lt;br /&gt;
|text = Returns the size of the single argument. For strings, this is the length in bytes. For vectors, this is the number of elements. For hashes, it is the number of key/value pairs. If the argument is &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; or a number, this error will be thrown: &amp;lt;code&amp;gt;object has no size()&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param1 = object&lt;br /&gt;
|param1text = Object to find the size of.  Must be a string, a vector or a hash.&lt;br /&gt;
|example1 = &lt;br /&gt;
var string = &amp;quot;string&amp;quot;;&lt;br /&gt;
print(size(string)); # prints &amp;quot;6&amp;quot;&lt;br /&gt;
|example2 =&lt;br /&gt;
var vector = [1, 2, 3];&lt;br /&gt;
print(size(vector)); # prints &amp;quot;3&amp;quot;&lt;br /&gt;
|example3 =&lt;br /&gt;
var hash = {&lt;br /&gt;
    element1: &amp;quot;value1&amp;quot;,&lt;br /&gt;
    element2: &amp;quot;value2&amp;quot;,&lt;br /&gt;
    element3: &amp;quot;value3&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
print(size(hash)); # prints &amp;quot;3&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== sort()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = sort(vector, function);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=542|t=Source}}&lt;br /&gt;
|text = Returns a vector containing the elements in the input '''vector''' sorted in according to the rule given by '''function'''. Implemented with the ANSI C {{func link|qsort()|link=http://www.cplusplus.com/reference/cstdlib/qsort/}}, &amp;lt;code&amp;gt;sort()&amp;lt;/code&amp;gt; is stable.  This means that if the rules in the first example are used, equal elements in the output vector will appear in the same relative order as they do in the input.  It is run in a loop, so '''function''' is run several times.&lt;br /&gt;
|param1 = vector&lt;br /&gt;
|param1text = Input vector to sort.&lt;br /&gt;
|param2 = function&lt;br /&gt;
|param2text = Function according to which the elements will be sorted by.  It should take two arguments and should return one of 1, 0, or -1.&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Return value !! Meaning&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} less than 0 {{!!}} first argument should go before second argument&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} 0 {{!!}} first argument equals second argument&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} greater than 0 {{!!}} first argument should go after second argument&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
|example1text = This example sorts elements from smallest to greatest.&lt;br /&gt;
|example1 = &lt;br /&gt;
var sort_rules = func(a, b){&lt;br /&gt;
    if(a &amp;lt; b){&lt;br /&gt;
        return -1; # A should before b in the returned vector&lt;br /&gt;
    }elsif(a == b){&lt;br /&gt;
        return 0; # A is equivalent to b &lt;br /&gt;
    }else{&lt;br /&gt;
        return 1; # A should after b in the returned vector&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
debug.dump(sort([3, 2, 5, 6, 4, 1], sort_rules)); # prints &amp;quot;[1, 2, 3, 4, 5, 6]&amp;quot;&lt;br /&gt;
|example2text = This example sorts elements from greatest to smallest.&lt;br /&gt;
|example2 = &lt;br /&gt;
# Outputs the elements in reverse order (greatest to smallest)&lt;br /&gt;
var sort_rules = func(a, b){&lt;br /&gt;
    if(a &amp;lt; b){&lt;br /&gt;
        return 1; # -1 in the above example&lt;br /&gt;
    }elsif(a == b){&lt;br /&gt;
        return 0;&lt;br /&gt;
    }else{&lt;br /&gt;
        return -1; # 1 in the above example&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
debug.dump(sort([3, 2, 5, 6, 4, 1], sort_rules)); # prints &amp;quot;[6, 5, 4, 3, 2, 1]&amp;quot;&lt;br /&gt;
|example3text = This example sorts a vector of strings (runways for example) from smallest to greatest.&lt;br /&gt;
|example3 = &lt;br /&gt;
var runways = [&amp;quot;09R&amp;quot;,&amp;quot;27R&amp;quot;,&amp;quot;26L&amp;quot;,&amp;quot;09L&amp;quot;,&amp;quot;15&amp;quot;];&lt;br /&gt;
var rwy = sort(runways,func(a,b) cmp(a,b));&lt;br /&gt;
debug.dump(rwy); # prints ['09L','09R','15','26L','27R']&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== split()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = split(delimiter, string);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=460|t=Source}}&lt;br /&gt;
|text = Splits the input string into a vector of substrings bounded by occurrences of the delimiter substring. See [[Nasal_library/string#string.join(sep,list)|string.join()]].&lt;br /&gt;
|param1 = delimiter&lt;br /&gt;
|param1text = String that will split the substrings in the returned vector.&lt;br /&gt;
|param2 = string&lt;br /&gt;
|param2text = String to split up.&lt;br /&gt;
|example1 = debug.dump(split(&amp;quot;cd&amp;quot;, &amp;quot;abcdef&amp;quot;)); # prints &amp;quot;['ab', 'ef']&amp;quot;&lt;br /&gt;
|example2 = debug.dump(split(&amp;quot;.&amp;quot;, &amp;quot;3.2.0&amp;quot;)); # prints &amp;quot;[3, 2, 0]&amp;quot;&lt;br /&gt;
|example3 = debug.dump(split(&amp;quot;/&amp;quot;, &amp;quot;path/to/file&amp;quot;)); # prints &amp;quot;['path', 'to', 'file']&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===sprintf()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = &amp;lt;nowiki&amp;gt;sprintf(format[, arg[, arg, [...]]]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=355|t=Source}}&lt;br /&gt;
|text = Creates and returns a string formatted using ANSI C {{func link|vsnprintf()|link=http://en.cppreference.com/w/c/io/vfprintf}} &amp;lt;ref&amp;gt;&lt;br /&gt;
{{Cite web&lt;br /&gt;
|url = http://sourceforge.net/p/flightgear/simgear/ci/next/tree/simgear/nasal/lib.c#l308&lt;br /&gt;
|title = fgdata/simgear/simgear/nasal/lib.c, line 308&lt;br /&gt;
|accessdate = October 2015&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/ref&amp;gt;.  Below is a table of supported format specifiers.&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot; width=&amp;quot;75%&amp;quot;&lt;br /&gt;
{{!}}+ %[flags][width][.precision]specifier&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} Flags&lt;br /&gt;
{{!-}}&lt;br /&gt;
! Flag !! Output&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; {{!!}} Forces to precede the result with a plus or minus sign ('''+''' or '''-''') even for positive numbers. By default, only negative numbers are preceded with a '''-''' sign.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} ''space'' {{!!}} Prefixes non-signed numbers with a space.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; {{!!}} Left-align the output of this placeholder (the default is to right-align the output) when the width option is specified.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; {{!!}} Use 0 instead of spaces to pad a field when the width option is specified.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; {{!!}} Used with &amp;lt;code&amp;gt;o&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; specifiers the value is preceded with &amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;0x&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;0X&amp;lt;/tt&amp;gt; respectively for values different than zero. Used with &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;E&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;, it forces the written output to contain a decimal point even if no digits would follow. By default, if no digits follow, no decimal point is written. Used with &amp;lt;code&amp;gt;g&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;G&amp;lt;/code&amp;gt; the result is the same as with &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;E&amp;lt;/code&amp;gt; but trailing zeros are not removed.&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} Width&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} colspan=&amp;quot;2&amp;quot; {{!}} Integer specifying the minimum number of characters to be returned. This includes the decimal point and decimal fraction as well as + or - signs.&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} Precision&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} colspan=&amp;quot;2&amp;quot; {{!}} Integer preceded by a dot specifying the number of decimal places to be written.&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} Specifiers&lt;br /&gt;
{{!-}}&lt;br /&gt;
! Specifier !! Output&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; {{!!}} Signed decimal number.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;s&amp;lt;/code&amp;gt; {{!!}} A string&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; {{!!}} Percent (%) character.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;c&amp;lt;/code&amp;gt; {{!!}} A single character assigned to a character code, the code given in an integer argument.  See http://www.asciitable.com/ for a list of supported characters and their codes.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;o&amp;lt;/code&amp;gt; {{!!}} Unsigned integer as an octal number.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;u&amp;lt;/code&amp;gt; {{!!}} Unsigned decimal integer.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; {{!!}} Unsigned integer as a hexadecimal number.  If &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; is used, any letters in the number are lowercase, while &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; gives uppercase.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;E&amp;lt;/code&amp;gt; {{!!}} Double value in scientific notation (i.e., ''[-]ddd.ddd'''e'''[+/-]ddd''), with an exponent being denoted by &amp;lt;tt&amp;gt;e&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;E&amp;lt;/tt&amp;gt; depending on whether an upper or lowercase is used respectively.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; {{!!}} Floating-point number, in fixed decimal notation, by default with 6 decimal places.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;F&amp;lt;/code&amp;gt; {{!!}} Appears to be available&amp;lt;ref&amp;gt;&lt;br /&gt;
{{Cite web&lt;br /&gt;
|url = http://sourceforge.net/p/flightgear/simgear/ci/next/tree/simgear/nasal/lib.c#l389&lt;br /&gt;
|title = fgdata/simgear/simgear/nasal/lib.c, line 389&lt;br /&gt;
|accessdate = October 2015&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/ref&amp;gt;, but doesn't work.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;g&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;G&amp;lt;/code&amp;gt; {{!!}} Double in either normal or exponential notation, whichever is more appropriate for its magnitude. &amp;lt;code&amp;gt;g&amp;lt;/code&amp;gt; uses lower-case letters, &amp;lt;code&amp;gt;G&amp;lt;/code&amp;gt; uses upper-case letters. This type differs slightly from fixed-point notation in that insignificant zeroes to the right of the decimal point are not included.  Also, the decimal point is not included on whole numbers.&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
|param1 = format&lt;br /&gt;
|param1text = String specifying the format.  Can be used with or without a format specifiers.  See below for examples.&lt;br /&gt;
|param2 = arg&lt;br /&gt;
|param2text = Argument specifying a value to replace a format placeholder (such as &amp;lt;code&amp;gt;%d&amp;lt;/code&amp;gt;) in the format string.  Not required if there are no format specifiers.&lt;br /&gt;
&lt;br /&gt;
|example1 = print(sprintf(&amp;quot;%i&amp;quot;, 54)); # prints &amp;quot;54&amp;quot;&lt;br /&gt;
|example2 = print(sprintf(&amp;quot;Pi = %+.10f&amp;quot;, math.pi)); # prints &amp;quot;Pi = +3.1415926536&amp;quot;&lt;br /&gt;
|example3 = &lt;br /&gt;
print(sprintf(&amp;quot;%6d&amp;quot;, 23)); # prints &amp;quot;    23&amp;quot;&lt;br /&gt;
print(sprintf(&amp;quot;%06d&amp;quot;, 23)); # prints &amp;quot;000023&amp;quot;&lt;br /&gt;
|example4 =&lt;br /&gt;
var FGVer = getprop(&amp;quot;/sim/version/flightgear&amp;quot;);&lt;br /&gt;
print(sprintf(&amp;quot;You have FlightGear v%s&amp;quot;, FGVer)); # prints &amp;quot;You have FlightGear v&amp;lt;your version&amp;gt;&amp;quot;&lt;br /&gt;
|example5 = &lt;br /&gt;
print(sprintf(&amp;quot;Hexadecimal 100000 = %X&amp;quot;, 100000)); # prints &amp;quot;Hexadecimal 100000 = 186A0&amp;quot;&lt;br /&gt;
print(sprintf(&amp;quot;Hexadecimal 100000 = %x&amp;quot;, 100000)); # prints &amp;quot;Hexadecimal 100000 = 186a0&amp;quot;&lt;br /&gt;
|example6 = print(sprintf(&amp;quot;Code 65 is %c&amp;quot;, 65)); # prints &amp;quot;Code 65 is A&amp;quot;&lt;br /&gt;
|example7 = &lt;br /&gt;
print(sprintf(&amp;quot;%e&amp;quot;, 54)); # prints &amp;quot;5.400000e+001&amp;quot;&lt;br /&gt;
print(sprintf(&amp;quot;%E&amp;quot;, 54)); # prints &amp;quot;5.400000E+001&amp;quot;&lt;br /&gt;
|example8 = print(sprintf(&amp;quot;%o&amp;quot;, 54)); # prints &amp;quot;66&amp;quot;&lt;br /&gt;
|example9 = print(sprintf(&amp;quot;50%% of 100 is %i&amp;quot;, 100 / 2)); # prints &amp;quot;50% of 100 is 50&amp;quot;&lt;br /&gt;
|example10 =&lt;br /&gt;
print(sprintf(&amp;quot;%.2f&amp;quot;, 1.4));   #prints &amp;quot;1.40&amp;quot;&lt;br /&gt;
print(sprintf(&amp;quot;%.1f&amp;quot;, 1.4));   #prints &amp;quot;1.4&amp;quot;&lt;br /&gt;
print(sprintf(&amp;quot;% 4.1f&amp;quot;, 1.4)); #prints &amp;quot; 1.4&amp;quot;&lt;br /&gt;
print(sprintf(&amp;quot;%04.1f&amp;quot;, 1.4)); #prints &amp;quot;01.4&amp;quot;&lt;br /&gt;
print(sprintf(&amp;quot;% 6.1f&amp;quot;, 1.4)); #prints &amp;quot;   1.4&amp;quot;&lt;br /&gt;
print(sprintf(&amp;quot;%06.1f&amp;quot;, 1.4)); #prints &amp;quot;0001.4&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===streq()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = streq(a, b);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=129|t=Source}}&lt;br /&gt;
|text = Tests the string values of the two arguments for equality. This function is needed because the &amp;lt;code&amp;gt;'''=='''&amp;lt;/code&amp;gt; operator (see [[Nasal_Operators#Equality|Nasal Operators]]) tests for numeric equality first.  If either or both the arguments are not strings, 0 (False) will be returned.  Returns either 0 (False) or 1 (True).  {{Note|This function is rarely required in typical code.}}&lt;br /&gt;
|param1 = a&lt;br /&gt;
|param1text = First argument for testing equality.&lt;br /&gt;
|param2 = b&lt;br /&gt;
|param2text = Second argument for testing equality.&lt;br /&gt;
|example1 = print(streq(&amp;quot;0&amp;quot;, &amp;quot;0&amp;quot;)); # prints &amp;quot;1&amp;quot; (True)&lt;br /&gt;
|example2 = &lt;br /&gt;
print(0 == 0.0); # prints &amp;quot;1&amp;quot; (True)&lt;br /&gt;
print(streq(&amp;quot;0&amp;quot;, &amp;quot;0.0&amp;quot;)); # prints &amp;quot;0&amp;quot; (False)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===substr()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = substr(string, start [, length]);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=129|t=Source}}&lt;br /&gt;
|text = Similar the {{func link|subvec()}}, but operates on strings. Computes and returns a substring. The first argument specifies a string, the second is the index of the start of a substring, the optional third argument specifies a length (the default is to return the rest of the string from the start).&lt;br /&gt;
|param1 = string&lt;br /&gt;
|param1text = String to return a substring from.&lt;br /&gt;
|param2 = start&lt;br /&gt;
|param2text = Integer specifying the start of a substring. Negative values specify a position from the end of the string.&lt;br /&gt;
|param3 = length&lt;br /&gt;
|param3text = Optional argument specifying the length of the substring. Defaults to the end of the string.&lt;br /&gt;
|example1 = print(substr(&amp;quot;abcde&amp;quot;, 1, 3)); # prints &amp;quot;bcd&amp;quot;&lt;br /&gt;
|example2 = print(substr(&amp;quot;abcde&amp;quot;, 1)); # prints &amp;quot;bcde&amp;quot;&lt;br /&gt;
|example3 = print(substr(&amp;quot;abcde&amp;quot;, 2, 1)); # prints &amp;quot;c&amp;quot;&lt;br /&gt;
|example4 = print(substr(&amp;quot;abcde&amp;quot;, -2)); # prints &amp;quot;de&amp;quot;&lt;br /&gt;
|example5 = print(substr(&amp;quot;abcde&amp;quot;, -3, 2)); # prints &amp;quot;cd&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===subvec()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = subvec(vector, start[, length]);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=63|t=Source}}&lt;br /&gt;
|text = Returns a sub-range of a vector. The first argument specifies a vector, the second a starting index, and the optional third argument indicates a length (the default is to the end of the vector). &lt;br /&gt;
|param1 = vector&lt;br /&gt;
|param1text = The vector to take the sub-vector from.&lt;br /&gt;
|param2 = start&lt;br /&gt;
|param2text = The starting point of the sub-vector within the given vector.&lt;br /&gt;
|param3 = length&lt;br /&gt;
|param3text = Optional argument specifying the length of the sub-vector, from the starting point.&lt;br /&gt;
'''Notes:'''&lt;br /&gt;
* Omitting the ''vector'' and ''start'' arguments is not an error (possibly it should be) but the return value is ''nil''.&lt;br /&gt;
* A negative ''start'' argument ''is'' an error. This seems wrong. Perhaps the language designer could comment.&lt;br /&gt;
* A value of ''start'' greater than ''size(vector)'' causes an error. A value equal to ''size(vector)'' returns an empty vector.&lt;br /&gt;
* If the value of ''length'' is greater than ''size(vector) - start'' then it is ignored. That is, all elements from ''start'' to the end of ''vector'' are returned. If ''length'' is zero then an empty vector is returned. A negative value of ''length'' causes an error.&lt;br /&gt;
|example1 = &lt;br /&gt;
var vector = [1, 2, 3];&lt;br /&gt;
debug.dump(subvec(vector, 0)); # prints &amp;quot;[1, 2, 3]&amp;quot;&lt;br /&gt;
|example2 = &lt;br /&gt;
var vector = [1, 2, 3];&lt;br /&gt;
debug.dump(subvec(vector, 1)); # prints &amp;quot;[2, 3]&amp;quot;&lt;br /&gt;
|example3 = &lt;br /&gt;
var vector = [1, 2, 3];&lt;br /&gt;
debug.dump(subvec(vector, 1, 1)); # prints &amp;quot;[2]&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== typeof()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = typeof(object);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|l=193|t=Source}}&lt;br /&gt;
|text = Returns a string indicating the whether the object is &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt;, a scalar (number or string), a vector, a hash, a function, or a ghost.&lt;br /&gt;
|param1 = object&lt;br /&gt;
|param1text = Object to return the type of.&lt;br /&gt;
|example1 = &lt;br /&gt;
var object = nil;&lt;br /&gt;
print(typeof(object)); # prints &amp;quot;nil&amp;quot;&lt;br /&gt;
|example2 = &lt;br /&gt;
var object = &amp;quot;Hello world!&amp;quot;;&lt;br /&gt;
print(typeof(object)); # prints &amp;quot;scalar&amp;quot;&lt;br /&gt;
|example3 = &lt;br /&gt;
var object = math.pi;&lt;br /&gt;
print(typeof(object)); # prints &amp;quot;scalar&amp;quot;&lt;br /&gt;
|example4 = &lt;br /&gt;
var object = [1, 2, 3];&lt;br /&gt;
print(typeof(object)); # prints &amp;quot;vector&amp;quot;&lt;br /&gt;
|example5 = &lt;br /&gt;
var object = {};&lt;br /&gt;
print(typeof(object)); # prints &amp;quot;hash&amp;quot;&lt;br /&gt;
|example6 = &lt;br /&gt;
var object = func {};&lt;br /&gt;
print(typeof(object)); # prints &amp;quot;func&amp;quot;&lt;br /&gt;
|example7 =&lt;br /&gt;
var object = airportinfo();&lt;br /&gt;
print(typeof(object)); # prints &amp;quot;ghost&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- == Extension modules ==&lt;br /&gt;
=== thread ===&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = thread.newthread(func);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/threadlib.c|l=101|t=Source}}&lt;br /&gt;
|text = &lt;br /&gt;
|example1text = start a new worker thread&lt;br /&gt;
|example1 = thread.newthread( func() {} );&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = thread.newlock();&lt;br /&gt;
|source = {{simgear file|simgear/nasal/threadlib.c|l=101|t=Source}}&lt;br /&gt;
|text = &lt;br /&gt;
|example1text = create a new lock&lt;br /&gt;
|example1 = var lock = thread.newlock()&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = thread.lock();&lt;br /&gt;
|source = {{simgear file|simgear/nasal/threadlib.c|l=101|t=Source}}&lt;br /&gt;
|text = &lt;br /&gt;
|example1text = lock a lock&lt;br /&gt;
|example1 = var lock = thread.newlock()&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = thread.unlock();&lt;br /&gt;
|source = {{simgear file|simgear/nasal/threadlib.c|l=101|t=Source}}&lt;br /&gt;
|text = &lt;br /&gt;
|example1text = unlock a lock&lt;br /&gt;
|example1 = var lock = thread.unlock()&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = thread.newsem();&lt;br /&gt;
|source = {{simgear file|simgear/nasal/threadlib.c|l=101|t=Source}}&lt;br /&gt;
|text = &lt;br /&gt;
|example1text = create a new {{Wikipedia|semaphore}}&lt;br /&gt;
|example1 = var semaphore = thread.newsem()&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = thread.semdown();&lt;br /&gt;
|source = {{simgear file|simgear/nasal/threadlib.c|l=101|t=Source}}&lt;br /&gt;
|text = &lt;br /&gt;
|example1text = semaphore down&lt;br /&gt;
|example1 = thread.semdown(semaphore)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = thread.semup();&lt;br /&gt;
|source = {{simgear file|simgear/nasal/threadlib.c|l=101|t=Source}}&lt;br /&gt;
|text = &lt;br /&gt;
|example1text = semaphore up&lt;br /&gt;
|example1 = thread.semup(semaphore)&lt;br /&gt;
}} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Extension functions==&lt;br /&gt;
The '''extension functions''' are global functions that have been added to Nasal since its integration into FlightGear. Unlike the core library functions, they are generally specifically designed to interact directly with FlightGear. Extension functions come from three source files:&lt;br /&gt;
*{{flightgear file|src/Scripting/NasalPositioned.cxx}}&lt;br /&gt;
*{{flightgear file|src/Scripting/NasalSys.cxx}}&lt;br /&gt;
*{{fgdata file|Nasal/globals.nas}}&lt;br /&gt;
&lt;br /&gt;
===abort()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = abort();&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=565|t=Source}}&lt;br /&gt;
|text = This function is a wrapper for the C++ {{func link|abort()|link=http://www.cplusplus.com/reference/cstdlib/abort/}} function. It simply aborts FlightGear with an error, which varies depending on the operating system. This function should not really be used; instead, please use the &amp;quot;exit&amp;quot; [[Fgcommands|fgcommand]], which will exit FlightGear more gracefully (see example below).&lt;br /&gt;
|example1text = This example will immediately stop FlightGear with an error, such as &amp;quot;FlightGear has stopped working.&amp;quot;&lt;br /&gt;
|example1 = abort();&lt;br /&gt;
|example2text = For exiting FlightGear in a better way, please use the following code:&lt;br /&gt;
|example2 = fgcommand(&amp;quot;exit&amp;quot;);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== abs() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = abs(number);&lt;br /&gt;
|source = {{fgdata file|Nasal/globals.nas|t=Source}}&lt;br /&gt;
|text = This simple function returns the {{wikipedia|absolute value|noicon=1}} of the provided number.&lt;br /&gt;
|param1 = number&lt;br /&gt;
|param1text = This argument is required and should be a number.&lt;br /&gt;
|example1 = print(abs(1)); # prints &amp;quot;1&amp;quot;&lt;br /&gt;
|example2 = print(abs(-1)); # prints &amp;quot;1&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===aircraftToCart() ===&lt;br /&gt;
This new function in FG 2017.2.1 takes coordinates in aircraft structural coordinate system, and translate them into geocentric coordinates.&lt;br /&gt;
Example for (5,6,7):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var pos = aircraftToCart({x: -5, y: 6, z: -7});&lt;br /&gt;
var coord = geo.Coord.new();&lt;br /&gt;
coord.set_xyz(pos.x, pos.y, pos.z);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Notice: x and z is inverted sign on purpose.&lt;br /&gt;
if you want lat. lon, alt from that, just call: (degrees and meters)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
coord.lat()&lt;br /&gt;
coord.lon()&lt;br /&gt;
coord.alt()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===addcommand() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = addcommand(name, code);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=659|t=Source}}&lt;br /&gt;
|version = 2.12&lt;br /&gt;
|commit = {{flightgear commit|7b663c|t=commit}}&lt;br /&gt;
|text = {{see also|Howto:Add new fgcommands to FlightGear}}&lt;br /&gt;
&lt;br /&gt;
This function enables the addition of a new custom [[fgcommands|fgcommand]] to FlightGear from within Nasal. An fgcommand created using this method can be used in exactly the same way as the built-in fgcommands. Also, an fgcommand created via this method will always return True or 1, like all other fgcommands.&lt;br /&gt;
|param1 = name&lt;br /&gt;
|param1text = This will become the name of the new fgcommand. Must be a string.&lt;br /&gt;
|param2 = code&lt;br /&gt;
|param2text = The code that will be executed when the fgcommand is run. Must be a function.&lt;br /&gt;
|example1text = This example adds a new fgcommand and then runs it. Although it executes a simple {{func link|print()}} statement, any valid Nasal code can be used.&lt;br /&gt;
|example1 = addcommand(&amp;quot;myFGCmd&amp;quot;, func(node) {&lt;br /&gt;
    print(&amp;quot;fgcommand 'myFGCmd' has been run.&amp;quot;);&lt;br /&gt;
    props.dump( node );&lt;br /&gt;
});&lt;br /&gt;
fgcommand(&amp;quot;myFGCmd&amp;quot;, props.Node.new({foo:1, bar:2}) );&lt;br /&gt;
|example2text = This example demonstrates how parameters are defined in a new fgcommand.&lt;br /&gt;
|example2 = addcommand(&amp;quot;myFGCmd&amp;quot;, func(node){&lt;br /&gt;
    print(node.getNode(&amp;quot;number&amp;quot;).getValue()); # prints the value of &amp;quot;number,&amp;quot; which is 12&lt;br /&gt;
});&lt;br /&gt;
fgcommand(&amp;quot;myFGCmd&amp;quot;, props.Node.new({&amp;quot;number&amp;quot;: 12}));&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===airportinfo()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = airportinfo();&lt;br /&gt;
airportinfo(type);&lt;br /&gt;
airportinfo(id);&lt;br /&gt;
airportinfo(lat, lon[, type]);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1024|t=Source}}&lt;br /&gt;
|text = Function for retrieval of airport, heliport, or seaplane base information. It returns a Nasal ghost; however, its structure is like that of a Nasal hash. The following information is returned:&lt;br /&gt;
* '''parents''': A vector containing a hash of various functions to access information about the runway. See {{flightgear file|src/Scripting/NasalPositioned.cxx|l=2659}} for full list.&lt;br /&gt;
* '''lon''': Longitude of the location.&lt;br /&gt;
* '''lat''': Latitude of the location.&lt;br /&gt;
* '''has_metar''': True or false depending whether the airport has a [[METAR]] code defined for it.&lt;br /&gt;
* '''elevation''': Elevation of the location in metres.&lt;br /&gt;
* '''id''': ICAO code of the airport (or ID of the seaplane base/heliport).&lt;br /&gt;
* '''name''': Name of the airport/heliport/seaplane base.&lt;br /&gt;
* '''runways'''&lt;br /&gt;
** '''&amp;lt;runway name&amp;gt;'''&lt;br /&gt;
*** '''id''': Name of runway.&lt;br /&gt;
*** '''lat''': Latitude of the runway.&lt;br /&gt;
*** '''lon''': Longitude of the runway.&lt;br /&gt;
*** '''heading''': Heading of the runway.&lt;br /&gt;
*** '''length''': Length of the runway in metres.&lt;br /&gt;
*** '''width''': Width of the runway in metres.&lt;br /&gt;
*** '''surface''': Runway surface type.&lt;br /&gt;
*** '''threshold''': Length of the runway's {{wikipedia|displaced threshold}} in metres. Will return 0 if there is none.&lt;br /&gt;
*** '''stopway''': Length of the runway's stopway (the area before the threshold) in metres. Will return 0 if there is none.&lt;br /&gt;
*** '''reciprocal''': &amp;lt;code&amp;gt;runway&amp;lt;/code&amp;gt; ghost of the reciprocal runway.&lt;br /&gt;
*** '''ils_frequency_mhz''': ILS frequency in megahertz.&lt;br /&gt;
*** '''ils''': &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt; ghost of the ILS transmitter.&lt;br /&gt;
* '''helipads'''&lt;br /&gt;
** '''&amp;lt;helipad name&amp;gt;'''&lt;br /&gt;
*** '''id''': Name of helipad.&lt;br /&gt;
*** '''lat''': Latitude of the helipad.&lt;br /&gt;
*** '''lon''': Longitude of the helipad.&lt;br /&gt;
*** '''heading''': Heading of the helipad.&lt;br /&gt;
*** '''length''': Length of the helipad in metres.&lt;br /&gt;
*** '''width''': Width of the helipad in metres.&lt;br /&gt;
*** '''surface''': Helipad surface type.&lt;br /&gt;
* '''taxiways'''&lt;br /&gt;
** '''&amp;lt;taxiway name&amp;gt;'''&lt;br /&gt;
*** '''id''': Name of taxiway.&lt;br /&gt;
*** '''lat''': Latitude of the taxiway.&lt;br /&gt;
*** '''lon''': Longitude of the taxiway.&lt;br /&gt;
*** '''heading''': Heading of the taxiway.&lt;br /&gt;
*** '''length''': Length of the taxiway in metres.&lt;br /&gt;
*** '''width''': Width of the taxiway in metres.&lt;br /&gt;
*** '''surface''': Taxiway surface type.&lt;br /&gt;
&lt;br /&gt;
Information is extracted in the same way as accessing members of a Nasal hash. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
# prints to lengths of the runways of the nearest airport in feet and metres&lt;br /&gt;
var info = airportinfo();&lt;br /&gt;
print(&amp;quot;-- Lengths of the runways at &amp;quot;, info.name, &amp;quot; (&amp;quot;, info.id, &amp;quot;) --&amp;quot;);&lt;br /&gt;
foreach(var rwy; keys(info.runways)){&lt;br /&gt;
    print(rwy, &amp;quot;: &amp;quot;, math.round(info.runways[rwy].length * M2FT), &amp;quot; ft (&amp;quot;, info.runways[rwy].length, &amp;quot; m)&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that searches for locations that are a long way away (e.g., the nearest seaplane base to the middle of the Sahara) may cause FlightGear to pause for an amount of time.&lt;br /&gt;
|param1 = id&lt;br /&gt;
|param1text = The {{wikipedia|International Civil Aviation Organization airport code|ICAO code|noicon=1}} of an airport to retrieve information about.&lt;br /&gt;
|param2 = type&lt;br /&gt;
|param2text = When this argument is used, the function will return the closest airport of a certain type. Can be one of &amp;quot;heliport,&amp;quot; &amp;quot;seaport,&amp;quot; or &amp;quot;airport&amp;quot; (default).&lt;br /&gt;
: {{inote|Running this function without any parameters is equivalent to this:&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
airportinfo(&amp;quot;airport&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
|param3 = lat ''and'' lon&lt;br /&gt;
|param3text = When these parameters are used, the function will return information on the nearest airport, heliport or seaplane base (depending on the '''type''' parameter) to those coordinates.&lt;br /&gt;
|example1 = var info = airportinfo();&lt;br /&gt;
print(&amp;quot;Nearest airport: &amp;quot;, info.name, &amp;quot; (&amp;quot;, info.id, &amp;quot;)&amp;quot;); # prints the name and ICAO code of the nearest airport&lt;br /&gt;
|example2 = var info = airportinfo(&amp;quot;heliport&amp;quot;);&lt;br /&gt;
print(&amp;quot;Elevation of the nearest heliport: &amp;quot;, math.round(info.elevation * M2FT), &amp;quot; ft&amp;quot;); # prints the elevation and name of the nearest heliport&lt;br /&gt;
|example3 = var info = airportinfo(&amp;quot;KSQL&amp;quot;);&lt;br /&gt;
print(&amp;quot;-- Runways of &amp;quot;, info.name, &amp;quot; (&amp;quot;, info.id, &amp;quot;): --&amp;quot;);&lt;br /&gt;
foreach(var rwy; keys(info.runways)) {&lt;br /&gt;
    print(rwy); # prints the runways of KSQL&lt;br /&gt;
}&lt;br /&gt;
|example4 = var info = airportinfo(37.81909385, -122.4722484);&lt;br /&gt;
print(&amp;quot;Coordinates of the nearest airport: &amp;quot;, info.lat, &amp;quot;, &amp;quot;, info.lon); # print the name and ICAO of the nearest airport to the Golden Gate Bridge&lt;br /&gt;
|example5 = var info = airportinfo(37.81909385, -122.4722484, &amp;quot;seaport&amp;quot;);&lt;br /&gt;
print(&amp;quot;Nearest seaplane base: &amp;quot;, info.name, &amp;quot; (&amp;quot;, info.id, &amp;quot;)&amp;quot;); # print the name and ID of the nearest seaplane base to the Golden Gate Bridge&lt;br /&gt;
|example6text = This example prints the all information from an &amp;lt;code&amp;gt;airportinfo()&amp;lt;/code&amp;gt; call.&lt;br /&gt;
|example6 = var info = airportinfo(&amp;quot;KSFO&amp;quot;);&lt;br /&gt;
print(info.name);&lt;br /&gt;
print(info.id);&lt;br /&gt;
print(info.lat);&lt;br /&gt;
print(info.lon);&lt;br /&gt;
print(info.has_metar);&lt;br /&gt;
print(info.elevation);&lt;br /&gt;
foreach(var rwy; keys(info.runways)){&lt;br /&gt;
    print(&amp;quot;-- &amp;quot;, rwy, &amp;quot; --&amp;quot;);&lt;br /&gt;
    print(info.runways[rwy].lat);&lt;br /&gt;
    print(info.runways[rwy].lon);&lt;br /&gt;
    print(info.runways[rwy].length);&lt;br /&gt;
    print(info.runways[rwy].width);&lt;br /&gt;
    print(info.runways[rwy].heading);&lt;br /&gt;
    print(info.runways[rwy].stopway);&lt;br /&gt;
    print(info.runways[rwy].threshold);&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===airwaysRoute() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = airwaysRoute(start, end[, type]);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1933|t=Source}}&lt;br /&gt;
|text = {{see also|Nasal Flightplan}}&lt;br /&gt;
This function returns a vector containing waypoints between two given waypoints. The returned waypoints are ghosts, but can be accessed in the same way as a Nasal hash. See [[Nasal Flightplan]] for more information.&lt;br /&gt;
|param1 = start&lt;br /&gt;
|param1text = Start waypoint, in the form of a waypoint ghost, such as that provided by {{func link|flightplan()}}.&lt;br /&gt;
|param2 = end&lt;br /&gt;
|param2text = Same as above.&lt;br /&gt;
|param3 = type&lt;br /&gt;
|param3text = Instructs the function to compute a high level route (when set to &amp;quot;highlevel&amp;quot;), or a low level route (when set to &amp;quot;lowlevel&amp;quot;). Defaults to &amp;quot;highlevel.&amp;quot;&lt;br /&gt;
|example1text = In the [[route manager]] dialog, add two waypoints to the flightplan, ideally ones that are far apart (tip: use the [[Map]] for this). Then run this code in your Nasal Console.&lt;br /&gt;
|example1 = var fp = flightplan();&lt;br /&gt;
var start = fp.getWP(0);&lt;br /&gt;
var end = fp.getWP(fp.getPlanSize() - 1);&lt;br /&gt;
var rt = airwaysRoute(start, end);&lt;br /&gt;
foreach(var wp; rt){&lt;br /&gt;
    print(wp.wp_name); # print the waypoints in the computed route&lt;br /&gt;
}&lt;br /&gt;
|example2text = Exactly the same as above, but computes a low level path.&lt;br /&gt;
|example2 = var fp = flightplan();&lt;br /&gt;
var start = fp.getWP(0);&lt;br /&gt;
var end = fp.getWP(fp.getPlanSize() - 1);&lt;br /&gt;
var rt = airwaysRoute(start, end, &amp;quot;lowlevel&amp;quot;);&lt;br /&gt;
foreach(var wp; rt){&lt;br /&gt;
    print(wp.wp_name); # print the waypoints in the computed route&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===airway()===&lt;br /&gt;
&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = airway(ident [, pos]);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=2644|t=Source}}&lt;br /&gt;
|text = {{see also|Nasal Flightplan}}&lt;br /&gt;
This function returns a ghost containing an airway of a specified id.&lt;br /&gt;
|param1 = ident&lt;br /&gt;
|param1text = a Positioned ghost (leg, navaid, airport) and so on, passed to the search function.&lt;br /&gt;
|param2 = pos&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===assert()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = assert(condition[, message]);&lt;br /&gt;
|source = {{fgdata file|Nasal/globals.nas|t=Source}}&lt;br /&gt;
|version = 3.2&lt;br /&gt;
|commit = {{fgdata commit|8b16a7|t=commit}}&lt;br /&gt;
|text = Returns either true if the condition evaluates as true, or aborts with a {{func link|die()}} call, which can be customised.&lt;br /&gt;
|param1 = condition&lt;br /&gt;
|param1text = Condition to evaluate.&lt;br /&gt;
|param2 = message&lt;br /&gt;
|param2text = Optional message that will be used in any {{func link|die()}} call. Defaults to &amp;quot;assertion failed!&amp;quot;&lt;br /&gt;
|example1 = var a = 1;&lt;br /&gt;
var b = 2;&lt;br /&gt;
print(assert(a &amp;lt; b)); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
|example2 = var a = 1;&lt;br /&gt;
var b = 2;&lt;br /&gt;
assert(a &amp;gt; b, 'a is not greater than b'); # aborts with a custom error message&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===carttogeod()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = carttogeod(x, y, z);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=945|t=Source}}&lt;br /&gt;
|text = Converts {{wikipedia|ECEF|Earth-centered, Earth-fixed}} coordinates (x, y and z) to {{wikipedia|geodetic coordinates}} (latitude, longitude, and altitude). A vector is returned containing latitude and longitude, both in degrees, and altitude, which is returned in metres above the equatorial radius of Earth as defined by the {{wikipedia|WGS 84}} (6,378,137 metres).&amp;lt;ref&amp;gt;{{simgear file|simgear/math/sg_geodesy.hxx|l=43}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = Mandatory x-axis value, in metres.&lt;br /&gt;
|param2 = y&lt;br /&gt;
|param2text = Mandatory y-axis value, in metres.&lt;br /&gt;
|param3 = z&lt;br /&gt;
|param3text = Mandatory z-axis value, in metres.&lt;br /&gt;
|example1 = var (lat, lon, alt) = carttogeod(6378137, 0, 0); # point is the intersection of the prime meridian and equator.&lt;br /&gt;
print(&amp;quot;Latitude: &amp;quot;, lat); # prints lat, lon and alt, which are all zero, see above&lt;br /&gt;
print(&amp;quot;Longitude: &amp;quot;, lon);&lt;br /&gt;
print(&amp;quot;Altitude: &amp;quot;, alt);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===cmdarg()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|private = _cmdarg()&lt;br /&gt;
|syntax = cmdarg();&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=513|t=Part 1}} {{!}} {{fgdata file|Nasal/globals.nas|t=Part 2}}&lt;br /&gt;
|text = &amp;lt;code&amp;gt;cmdarg()&amp;lt;/code&amp;gt; returns the property root of certain types of XML files. These could be nodes in the [[Property Tree]], or temporary and/or non-public nodes outside the Property tree. &lt;br /&gt;
It is used by Nasal scripts embedded in XML files. It returns a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object (see {{fgdata file|Nasal/props.nas}}), and you can use all of its methods on the returned value. &amp;lt;code&amp;gt;cmdarg()&amp;lt;/code&amp;gt; should only be used in four types/places of XML files:&lt;br /&gt;
* Bindings: This is needed so that the value of a joystick's axis can be accessed internally.&lt;br /&gt;
* Dialogs: This will return the root of the dialog in the Property Tree. This is useful for dialogs that are created/modified procedurally (e.g. for populating/changing widgets while loading the dialog). &lt;br /&gt;
* Embedded Canvases: The Nasal code behind [[Canvas]] windows [[Howto:Adding a canvas to a GUI dialog|embedded in PUI dialogs]] can use it to accessing the root directory of their Canvas.&lt;br /&gt;
* Animation XML files: If the animation XML file is used in an AI/MP model, &amp;lt;code&amp;gt;cmdarg()&amp;lt;/code&amp;gt; will return the root of the AI model in the &amp;lt;code&amp;gt;/ai/models/&amp;lt;/code&amp;gt; directory. Examples: &amp;lt;code&amp;gt;/ai/models/aircraft[3]/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/ai/models/multiplayer[1]/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should not use &amp;lt;code&amp;gt;cmdarg()&amp;lt;/code&amp;gt; in places other than those stated above. Although it won't cause an error, it will return the value of the last legitimate &amp;lt;code&amp;gt;cmdarg()&amp;lt;/code&amp;gt; call. &lt;br /&gt;
&lt;br /&gt;
Also, you should not delay &amp;lt;code&amp;gt;cmdarg()&amp;lt;/code&amp;gt; using {{func link|maketimer()}}, {{func link|settimer()}} or {{func link|setlistener()}}, because it will return an unrelated property.&lt;br /&gt;
|example1 = fgcommand(&amp;quot;dialog-show&amp;quot;, {&amp;quot;dialog-name&amp;quot;: &amp;quot;cmdarg-demo&amp;quot;});&lt;br /&gt;
|example1text = &amp;lt;br&amp;gt;This example demonstrates the usage of &amp;lt;code&amp;gt;cmdarg()&amp;lt;/code&amp;gt; in a binding.  Save the below XML snippet as &amp;lt;tt&amp;gt;[[$FG_ROOT]]/gui/dialogs/cmdarg-demo.xml&amp;lt;/tt&amp;gt;. Then run the Nasal snippet below in your [[Nasal Console]]. Upon clicking {{button|Close}}, a message will be printed sowing the root of the binding in the Property Tree.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt;cmdarg-demo&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;vbox&amp;lt;/layout&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;text&amp;gt;&lt;br /&gt;
  &amp;lt;label&amp;gt;Click &amp;quot;Close&amp;quot; to activate the demonstration (a message in the console).&amp;lt;/label&amp;gt;&lt;br /&gt;
&amp;lt;/text&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;button&amp;gt;&lt;br /&gt;
  &amp;lt;legend&amp;gt;Close&amp;lt;/legend&amp;gt;&lt;br /&gt;
  &amp;lt;binding&amp;gt;&lt;br /&gt;
    &amp;lt;command&amp;gt;nasal&amp;lt;/command&amp;gt;&lt;br /&gt;
    &amp;lt;script&amp;gt;print(&amp;quot;Button binding root: '&amp;quot; ~ cmdarg().getPath() ~ &amp;quot;'&amp;quot;);&amp;lt;/script&amp;gt;&lt;br /&gt;
  &amp;lt;/binding&amp;gt;&lt;br /&gt;
  &amp;lt;binding&amp;gt;&lt;br /&gt;
    &amp;lt;command&amp;gt;dialog-close&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/button&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|example2text = This example demonstrates the usage of &amp;lt;code&amp;gt;cmdarg()&amp;lt;/code&amp;gt; in Nasal code within dialogs.  Open &amp;lt;tt&amp;gt;[[$FG_ROOT]]/gui/dialogs/cmdarg-demo.xml&amp;lt;/tt&amp;gt; from the previous example, copy &amp;amp; paste the code below, and save it. Then run the same Nasal snippet as the previous example in your Nasal Console. If you click {{button|Click me!}}, the button's label will change to &amp;quot;I've been changed!&amp;quot;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt;cmdarg-demo&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;vbox&amp;lt;/layout&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;text&amp;gt;&lt;br /&gt;
  &amp;lt;label&amp;gt;Click &amp;quot;Click me!&amp;quot; to activate the demonstration (the button's label will change).&amp;lt;/label&amp;gt;&lt;br /&gt;
&amp;lt;/text&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;button&amp;gt;&lt;br /&gt;
  &amp;lt;legend&amp;gt;Click me!&amp;lt;/legend&amp;gt;&lt;br /&gt;
  &amp;lt;binding&amp;gt;&lt;br /&gt;
    &amp;lt;command&amp;gt;nasal&amp;lt;/command&amp;gt;&lt;br /&gt;
    &amp;lt;script&amp;gt;change_label();&amp;lt;/script&amp;gt;&lt;br /&gt;
  &amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/button&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;button&amp;gt;&lt;br /&gt;
  &amp;lt;legend&amp;gt;Close&amp;lt;/legend&amp;gt;&lt;br /&gt;
  &amp;lt;binding&amp;gt;&lt;br /&gt;
    &amp;lt;command&amp;gt;dialog-close&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/button&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nasal&amp;gt;&lt;br /&gt;
  &amp;lt;open&amp;gt;&amp;lt;![CDATA[&lt;br /&gt;
    var dlg_root = cmdarg();&lt;br /&gt;
    var dlg_name = {&amp;quot;dialog-name&amp;quot;: &amp;quot;cmdarg-demo&amp;quot;};&lt;br /&gt;
    var change_label = func {&lt;br /&gt;
        dlg_root.getNode(&amp;quot;button[0]/legend&amp;quot;).setValue(&amp;quot;I've been changed!&amp;quot;);&lt;br /&gt;
        fgcommand(&amp;quot;dialog-close&amp;quot;, dlg_name);&lt;br /&gt;
        fgcommand(&amp;quot;dialog-show&amp;quot;, dlg_name);&lt;br /&gt;
    }&lt;br /&gt;
  ]]&amp;gt;&amp;lt;/open&amp;gt;&lt;br /&gt;
&amp;lt;/nasal&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|example3text = For an example of &amp;lt;code&amp;gt;cmdarg()&amp;lt;/code&amp;gt; used with Canvas, please see [[Howto:Adding a canvas to a GUI dialog#FGPlot|Howto:Adding a canvas to a GUI dialog]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===courseAndDistance()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = courseAndDistance(to);&lt;br /&gt;
courseAndDistance(from, to);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1668|t=Source}}&lt;br /&gt;
|text = Returns a vector containing the course from one point to another and the distance between them in nautical miles. The course is the initial bearing (see [http://www.movable-type.co.uk/scripts/latlong.html#bearing here]), and is in the range 0–360. Both arguments can be one of:&lt;br /&gt;
:* An &amp;lt;code&amp;gt;airport&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;runway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;taxiway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;fix&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;waypoint&amp;lt;/code&amp;gt; ghost type&lt;br /&gt;
:* A hash with ''lat'' and ''lon'' members&lt;br /&gt;
:* A geo.Coord object with geodetic coordinates (cartesian coordinates will not be accepted)&lt;br /&gt;
|param1 = from&lt;br /&gt;
|param1text = Optional parameter defining the from where the function should calculate its results. If the function is given one argument ('''to'''), the aircraft's current position will be used. As well as the argument types as defined above, this argument can be two numbers separated with a comma, as if the function is taking three arguments. See example 5 below.&lt;br /&gt;
|param2 = to&lt;br /&gt;
|param2text = Like the first parameter, but defines the second point.&lt;br /&gt;
|example1text = This example demonstrates the usage of the function with the &amp;lt;code&amp;gt;airport&amp;lt;/code&amp;gt; ghost type.&lt;br /&gt;
|example1 = var from = airportinfo(&amp;quot;KSFO&amp;quot;);&lt;br /&gt;
var to = airportinfo(&amp;quot;KSQL&amp;quot;);&lt;br /&gt;
var (course, dist) = courseAndDistance(from, to);&lt;br /&gt;
print(course); # prints course from KSFO to KSQL&lt;br /&gt;
print(dist); # prints distance in nm from KSFO to KSQL&lt;br /&gt;
|example2text = This example demonstrates the usage of the function with hashes containing ''lat'' and ''lon''.&lt;br /&gt;
|example2 = var from = {lat: 0, lon: 0};&lt;br /&gt;
var to = {lat: 1, lon: 1};&lt;br /&gt;
var (course, dist) = courseAndDistance(from, to);&lt;br /&gt;
print(course);&lt;br /&gt;
print(dist);&lt;br /&gt;
|example3text = This example demonstrates usage of a geo.Coord object.&lt;br /&gt;
|example3 = var from = geo.Coord.new().set_latlon(0, 0);&lt;br /&gt;
var to = geo.Coord.new().set_latlon(1, 1);&lt;br /&gt;
var (course, dist) = courseAndDistance(from, to);&lt;br /&gt;
print(course);&lt;br /&gt;
print(dist);&lt;br /&gt;
|example4text = This example demonstrates usage of differing parameter types.&lt;br /&gt;
|example4 = var from = airportinfo(&amp;quot;KSFO&amp;quot;);&lt;br /&gt;
var to = geo.Coord.new().set_latlon(0, 0);&lt;br /&gt;
var (course, dist) = courseAndDistance(from, to);&lt;br /&gt;
print(course);&lt;br /&gt;
print(dist);&lt;br /&gt;
|example5text = The same as above, but the other way round.&lt;br /&gt;
|example5 = var to = {lat: 1, lon: 1};&lt;br /&gt;
var (course, dist) = courseAndDistance(0, 0, to);&lt;br /&gt;
print(course);&lt;br /&gt;
print(dist);&lt;br /&gt;
|example6text = Usage of just one parameter.&lt;br /&gt;
|example6 = var dest = airportinfo(&amp;quot;KSQL&amp;quot;);&lt;br /&gt;
var (course, dist) = courseAndDistance(dest);&lt;br /&gt;
print(&amp;quot;Turn to heading &amp;quot;, math.round(course), &amp;quot;. You have &amp;quot;, sprintf(&amp;quot;%.2f&amp;quot;, dist), &amp;quot; nm to go&amp;quot;);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===createFlightplan()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = createFlightplan(path);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=2331|t=Source}}&lt;br /&gt;
|text = Creates an empty flightplan object. It accepts one argument, ''path'' passed an absolute path to a .fgfp / .gpx file, it will populate the flightplan with waypoints from the file.&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Optional parameter defining the file from which a flightplan will be populated.&lt;br /&gt;
|example1 = &lt;br /&gt;
var path = getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ &amp;quot;/Export/test.fgfp&amp;quot;;&lt;br /&gt;
var flightplan = createFlightplan(path);&lt;br /&gt;
debug.dump(flightplan);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===createDiscontinuity()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = createDiscontinuity();&lt;br /&gt;
|text = Returns a &amp;lt;code&amp;gt;waypoint&amp;lt;/code&amp;gt; ghost object. A route discontinuity is inserted by an {{abbr|FMS|Flight Management System}} when it is unsure how to connect two waypoints.&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=2045|t=Source}}&lt;br /&gt;
|version = 2016.1&lt;br /&gt;
|commit = {{flightgear commit|caead6|t=commit}}&lt;br /&gt;
}}&lt;br /&gt;
===createViaTo()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = createViaTo(airway, waypoint);&lt;br /&gt;
|text = Returns a &amp;lt;code&amp;gt;waypoint&amp;lt;/code&amp;gt; ghost object. It represents a route &amp;quot;via '''airway''' to '''waypoint'''&amp;quot;.&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=2009|t=Source}}&lt;br /&gt;
|version = 2016.1&lt;br /&gt;
|commit = {{flightgear commit|caead6|t=commit}}&lt;br /&gt;
|param1 = airway&lt;br /&gt;
|param1text = The name of an airway.&lt;br /&gt;
|param2 = waypoint&lt;br /&gt;
|param2text = Must be in the airway and one of:&lt;br /&gt;
* The name of a waypoint.&lt;br /&gt;
* An &amp;lt;code&amp;gt;airport&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;runway&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;fix&amp;lt;/code&amp;gt; ghost object.&lt;br /&gt;
}}&lt;br /&gt;
===createWP()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = createWP(pos, name[, flag]);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1964|t=Source}}&lt;br /&gt;
|text = Creates a new waypoint ghost object.&lt;br /&gt;
|param1 = pos&lt;br /&gt;
|param1text = Dictates the position of the new waypoint. It can be one of the following:&lt;br /&gt;
:* An &amp;lt;code&amp;gt;airport&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;runway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;taxiway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;fix&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;waypoint&amp;lt;/code&amp;gt; ghost type&lt;br /&gt;
:* A hash with ''lat'' and ''lon'' members&lt;br /&gt;
:* A geo.Coord object&lt;br /&gt;
:* Two numbers separated by a comma, as if the function is taking three arguments. See example 4 below.&lt;br /&gt;
|param2 = name&lt;br /&gt;
|param2text = String that will become the name of the new waypoint.&lt;br /&gt;
|param3 = flag&lt;br /&gt;
|param3text = Optional string that will tell FlightGear what type of waypoint it is. Must be one of &amp;quot;sid,&amp;quot; &amp;quot;star,&amp;quot; &amp;quot;approach,&amp;quot; &amp;quot;missed,&amp;quot; or &amp;quot;pseudo.&amp;quot;&lt;br /&gt;
|example1text = Creates a waypoint directly in front and 1 km away and appends it to the flight plan.&lt;br /&gt;
|example1 = var pos = geo.aircraft_position().apply_course_distance(getprop(&amp;quot;/orientation/heading-deg&amp;quot;), 1000);&lt;br /&gt;
var wp = createWP(pos, &amp;quot;NEWWP&amp;quot;);&lt;br /&gt;
var fp = flightplan();&lt;br /&gt;
fp.appendWP(wp);&lt;br /&gt;
|example2 = var pos = geo.aircraft_position().apply_course_distance(getprop(&amp;quot;/orientation/heading-deg&amp;quot;), 1000);&lt;br /&gt;
var wp = createWP({lat: pos.lat(), lon: pos.lon()}, &amp;quot;NEWWP&amp;quot;);&lt;br /&gt;
var fp = flightplan();&lt;br /&gt;
fp.appendWP(wp);&lt;br /&gt;
|example3 = var apt = airportinfo();&lt;br /&gt;
var wp = createWP(apt, &amp;quot;NEWWP&amp;quot;);&lt;br /&gt;
var fp = flightplan();&lt;br /&gt;
fp.appendWP(wp);&lt;br /&gt;
|example4 = var pos = geo.aircraft_position().apply_course_distance(getprop(&amp;quot;/orientation/heading-deg&amp;quot;), 1000);&lt;br /&gt;
var wp = createWP(pos.lat(), pos.lon(), &amp;quot;NEWWP&amp;quot;);&lt;br /&gt;
var fp = flightplan();&lt;br /&gt;
fp.appendWP(wp);&lt;br /&gt;
|example5text = Creates a new waypoint and adds it to the flight plan. Waypoints of the type &amp;quot;pseudo&amp;quot; are then removed from the flight plan, including the new waypoint. The {{func link|print()}} statements show this.&lt;br /&gt;
|example5 = var pos = geo.aircraft_position().apply_course_distance(getprop(&amp;quot;/orientation/heading-deg&amp;quot;), 1000);&lt;br /&gt;
var wp = createWP(pos, &amp;quot;NEWWP&amp;quot;, &amp;quot;pseudo&amp;quot;);&lt;br /&gt;
var fp = flightplan();&lt;br /&gt;
fp.appendWP(wp);&lt;br /&gt;
print(fp.getPlanSize());&lt;br /&gt;
fp.clearWPType(&amp;quot;pseudo&amp;quot;);&lt;br /&gt;
print(fp.getPlanSize());&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===createWPFrom()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = createWPFrom(object[, flag]);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1989|t=Source}}&lt;br /&gt;
|text = Creates a new waypoint object from another object.&lt;br /&gt;
|param1 = object&lt;br /&gt;
|param1text = A ghost object. Must be a ghost type that is one of &amp;quot;airport,&amp;quot; &amp;quot;navaid,&amp;quot; &amp;quot;runway,&amp;quot; or &amp;quot;fix.&amp;quot;&lt;br /&gt;
|param2 = flag&lt;br /&gt;
|param2text = Optional string that will tell FlightGear what type of waypoint it is. Must be one of &amp;quot;sid,&amp;quot; &amp;quot;star,&amp;quot; &amp;quot;approach,&amp;quot; &amp;quot;missed,&amp;quot; or &amp;quot;pseudo.&amp;quot;&lt;br /&gt;
|example1text = Creates a new waypoint and appends it to the flight plan.&lt;br /&gt;
|example1 = var apt = airportinfo(&amp;quot;KSFO&amp;quot;);&lt;br /&gt;
var wp = createWPFrom(apt);&lt;br /&gt;
var fp = flightplan();&lt;br /&gt;
fp.appendWP(wp);&lt;br /&gt;
|example2text = Creates a new waypoint and appends it to the flight plan. This way point is then removed; the {{func link|print()}} statements prove this.&lt;br /&gt;
|example2 = var apt = airportinfo(&amp;quot;KSFO&amp;quot;);&lt;br /&gt;
var wp = createWPFrom(apt, &amp;quot;pseudo&amp;quot;);&lt;br /&gt;
print(wp.wp_name);&lt;br /&gt;
var fp = flightplan();&lt;br /&gt;
fp.appendWP(wp);&lt;br /&gt;
print(fp.getPlanSize());&lt;br /&gt;
fp.clearWPType(&amp;quot;pseudo&amp;quot;);&lt;br /&gt;
print(fp.getPlanSize());&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===defined()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = defined(symbol);&lt;br /&gt;
|source = {{fgdata file|Nasal/globals.nas|t=Source}}&lt;br /&gt;
|text = Returns 1 (true) or 0 (false) depending on whether a variable exists.&lt;br /&gt;
|param1 = symbol&lt;br /&gt;
|param1text = A string that will be what the function searches for.&lt;br /&gt;
|example1 = var number = 12;&lt;br /&gt;
var check_exist = func {&lt;br /&gt;
    print(&amp;quot;Variable 'number' &amp;quot;, defined(&amp;quot;number&amp;quot;) == 1 ? &amp;quot;exists&amp;quot; : &amp;quot;does not exist&amp;quot;); # 'number' does exist&lt;br /&gt;
    print(&amp;quot;Variable 'number2' &amp;quot;, defined(&amp;quot;number2&amp;quot;) == 1 ? &amp;quot;exists&amp;quot; : &amp;quot;does not exist&amp;quot;); # 'number2' does not exist&lt;br /&gt;
}&lt;br /&gt;
check_exist();&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===directory()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = directory(path);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=572|t=Source}}&lt;br /&gt;
|text = Returns a vector containing a list of the folders and files in a given file path or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; if the path doesn't exist. Hidden folders and files are not added to the vector.&lt;br /&gt;
{{inote|The first two elements of the vector will be &amp;lt;code&amp;gt;'.'&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;'..'&amp;lt;/code&amp;gt;. These are for navigating back up the file tree, but have no use in Nasal. They can be safely removed from the vector.}}&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Absolute file path.&lt;br /&gt;
|example1text = Gets the folders and files in [[$FG_ROOT]], and then removes the extra first two elements (see note above). &lt;br /&gt;
|example1 = var dir = directory(getprop(&amp;quot;/sim/fg-root&amp;quot;)); # get directory&lt;br /&gt;
dir = subvec(dir, 2); # strips off the first two elements&lt;br /&gt;
debug.dump(dir); # dump the vector&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===fgcommand()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = fgcommand(cmd[, args]);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=456|t=Part 1}} {{!}} {{fgdata file|Nasal/globals.nas|t=Part 2}}&lt;br /&gt;
|text = Runs an fgcommand. See also {{readme file|commands}} and [[Bindings]] for more information. See {{flightgear file|src/Main/fg_commands.cxx|l=1425}} for the full list of fgcommands. Note that fgcommands generated by {{func link|addcommand()}} can also be run using this function. Also, the full list of fgcommands depends on the version of FlightGear you have. Returns 1 (true) if the fgcommand succeeded or 0 (false) if it failed.&lt;br /&gt;
|param1 = cmd&lt;br /&gt;
|param1text = String that is the name of the command that is to be run.&lt;br /&gt;
|param2 = args&lt;br /&gt;
|param2text = If the fgcommand takes arguments, they are inputted using this argument. Can either be a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object, or a hash (see examples below).&lt;br /&gt;
|example1 = fgcommand(&amp;quot;null&amp;quot;); # does nothing&lt;br /&gt;
|example2 = var args = props.Node.new({'script': 'print(&amp;quot;Running fgcommand&amp;quot;);'});&lt;br /&gt;
if (fgcommand(&amp;quot;nasal&amp;quot;, args)) { # prints &amp;quot;Running fgcommand&amp;quot; and then one of these print statements&lt;br /&gt;
    print(&amp;quot;Fgcommand succeeded&amp;quot;);&lt;br /&gt;
} else {&lt;br /&gt;
    print(&amp;quot;Fgcommand encountered a problem&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
|example3 = var args = { 'dialog-name': 'about' };&lt;br /&gt;
fgcommand(&amp;quot;dialog-show&amp;quot;, args); # shows the 'about' dialog&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===findAirportsByICAO() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = findAirportsByICAO(search[, type]);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1096|t=Source}}&lt;br /&gt;
|text = Returns a vector containing &amp;lt;code&amp;gt;airport&amp;lt;/code&amp;gt; ghost objects which are (by default) airports whose ICAO code matches the search string. The results are sorted by range from closest to furthest.&lt;br /&gt;
|param1 = search&lt;br /&gt;
|param1text = Search string for the function. Can either be a partial or a full ICAO code.&lt;br /&gt;
:{{icaution|The more matches there are for the given code, the longer the function will take. Passing just one character (e.g., &amp;quot;K&amp;quot;), might make FlightGear hang for a certain amount of time.}}&lt;br /&gt;
|param2 = type&lt;br /&gt;
|param2text = This will narrow the search to airports of a certain type. By default, only airports are searched for. May be one of &amp;quot;airport,&amp;quot; &amp;quot;heliport,&amp;quot; or &amp;quot;seaport.&amp;quot;&lt;br /&gt;
|example1 = var apts = findAirportsByICAO(&amp;quot;KSF&amp;quot;); # finds all airports matching &amp;quot;KSF&amp;quot;&lt;br /&gt;
foreach(var apt; apts){&lt;br /&gt;
    print(apt.name, &amp;quot; (&amp;quot;, apt.id, &amp;quot;)&amp;quot;); # prints them&lt;br /&gt;
}&lt;br /&gt;
|example2 = var apts = findAirportsByICAO(&amp;quot;SP0&amp;quot;, &amp;quot;seaport&amp;quot;); # finds all seaplane bases matching &amp;quot;SP0&amp;quot;&lt;br /&gt;
foreach(var apt; apts){&lt;br /&gt;
    print(apt.name, &amp;quot; (&amp;quot;, apt.id, &amp;quot;)&amp;quot;); # prints them&lt;br /&gt;
}&lt;br /&gt;
|example3 = var apt = findAirportsByICAO(&amp;quot;XBET&amp;quot;); # one way to check if an airport does exist&amp;quot;&lt;br /&gt;
if (size(apt) == 0) {&lt;br /&gt;
    print(&amp;quot;Airport does not exist&amp;quot;); # this one will be printed&lt;br /&gt;
} else {&lt;br /&gt;
    print(&amp;quot;Airport does exist&amp;quot;);&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===findAirportsWithinRange()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = findAirportsWithinRange([pos, ]range[, type]);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1066|t=Source}}&lt;br /&gt;
|text = Returns a vector of &amp;lt;code&amp;gt;airport&amp;lt;/code&amp;gt; ghost object which are (by default) airports that are within a given range of a given position, or the aircraft's current position. The results are sorted by range from closest to furthest.&lt;br /&gt;
|param1 = pos&lt;br /&gt;
|param1text = Optional position to search around. If not given, the aircraft's current position will be used. Can be one of:&lt;br /&gt;
:* An &amp;lt;code&amp;gt;airport&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;runway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;taxiway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;fix&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;waypoint&amp;lt;/code&amp;gt; ghost type&lt;br /&gt;
:* A hash with ''lat'' and ''lon'' members&lt;br /&gt;
:* A geo.Coord object&lt;br /&gt;
:* Two numbers separated by a comma, as if the function is taking three arguments. Example: &amp;lt;code&amp;gt;findAirportsWithinRange(lat, lon, range, type);&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param2 = range&lt;br /&gt;
|param2text = Mandatory number giving the range in nautical miles within which to search for airports/heliports/seaplane bases.only airports are searched for.&lt;br /&gt;
|param3 = type&lt;br /&gt;
|param3text = This will narrow the search to airports of a certain type. By default, only airports are searched for. May be one of &amp;quot;airport,&amp;quot; &amp;quot;heliport,&amp;quot; or &amp;quot;seaport.&amp;quot;&lt;br /&gt;
|example1text = Searches for airports within 10 nm of [[KSFO]].&lt;br /&gt;
|example1 = var pos = airportinfo(&amp;quot;KSFO&amp;quot;);&lt;br /&gt;
var apts = findAirportsWithinRange(pos, 10);&lt;br /&gt;
foreach(var apt; apts){&lt;br /&gt;
    print(apt.name, &amp;quot; (&amp;quot;, apt.id, &amp;quot;)&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
|example2text = Searches for seaplane bases within 15 nm of [[KSFO]].&lt;br /&gt;
|example2 = var pos = airportinfo(&amp;quot;KSFO&amp;quot;);&lt;br /&gt;
var apts = findAirportsWithinRange(pos, 15, &amp;quot;seaport&amp;quot;);&lt;br /&gt;
foreach(var apt; apts){&lt;br /&gt;
    print(apt.name, &amp;quot; (&amp;quot;, apt.id, &amp;quot;)&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
|example3text = Searches for airports within 10 nm of your current position.&lt;br /&gt;
|example3 = var apts = findAirportsWithinRange(10);&lt;br /&gt;
foreach(var apt; apts){&lt;br /&gt;
    print(apt.name, &amp;quot; (&amp;quot;, apt.id, &amp;quot;)&amp;quot;);&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===findCommByFrequencyMHz()===&lt;br /&gt;
 findCommByFrequencyMHz([pos, ]freq[, type]);&lt;br /&gt;
[[sourceforge:p/flightgear/flightgear/ci/next/tree/src/Scripting/NasalPositioned.cxx#l1547|source]]&lt;br /&gt;
&lt;br /&gt;
Returns a &amp;lt;code&amp;gt;comm&amp;lt;/code&amp;gt; ghost object for a station matching a given frequency. If there is more than one station with that frequency, the nearest station is returned.&lt;br /&gt;
&lt;br /&gt;
'''pos'''&lt;br /&gt;
&lt;br /&gt;
: Optional position to search around. If not given, the aircraft's current position will be used. Can be one of:&lt;br /&gt;
:* An &amp;lt;code&amp;gt;airport&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;runway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;taxiway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;fix&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;waypoint&amp;lt;/code&amp;gt; ghost type&lt;br /&gt;
:* A hash with ''lat'' and ''lon'' members&lt;br /&gt;
:* A geo.Coord object&lt;br /&gt;
:* Two numbers separated by a comma, as if the function is taking three arguments. Example: &amp;lt;code&amp;gt;findCommByFrequencyMHz(lat, lon, freq, type);&amp;lt;/code&amp;gt;.&lt;br /&gt;
; freq&lt;br /&gt;
: Frequency, in megahertz, of the station to search for.&lt;br /&gt;
; type&lt;br /&gt;
: This will narrow the search to station of a certain type. Defaults to &amp;quot;all.&amp;quot; For the full list of accepted type arguments, see flightgear/src/Navaids/positioned.cxx (line 160)&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var com = findCommByFrequencyMHz(123.6);&lt;br /&gt;
 print(&amp;quot;ID: &amp;quot;, com.id); # prints info about the comm station&lt;br /&gt;
 print(&amp;quot;Name: &amp;quot;, com.name);&lt;br /&gt;
 print(&amp;quot;Latitude: &amp;quot;, com.lat);&lt;br /&gt;
 print(&amp;quot;Longitude: &amp;quot;, com.lon);&lt;br /&gt;
 print(&amp;quot;Type: &amp;quot;, com.type);&lt;br /&gt;
 print(&amp;quot;Frequency: &amp;quot;, sprintf(&amp;quot;%.3f&amp;quot;, com.frequency), &amp;quot; Mhz&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
=== findFixesByID() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = findFixesByID([pos, ]id);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1627|t=Source}}&lt;br /&gt;
|text = Returns a vector containing &amp;lt;code&amp;gt;fix&amp;lt;/code&amp;gt; ghost objects matching a given ID, sorted by range from a certain position.&lt;br /&gt;
{{inote|Fixes are (usually) also known as waypoints.}}&lt;br /&gt;
|param1 = pos&lt;br /&gt;
|param1text = Optional position to search around. If not given, the aircraft's current position will be used. Can be one of:&lt;br /&gt;
:* An &amp;lt;code&amp;gt;airport&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;runway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;taxiway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;fix&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;waypoint&amp;lt;/code&amp;gt; ghost type&lt;br /&gt;
:* A hash with ''lat'' and ''lon'' members&lt;br /&gt;
:* A geo.Coord object&lt;br /&gt;
:* Two numbers separated by a comma, as if the function is taking three arguments. Example: &amp;lt;code&amp;gt;findFixesByID(lat, lon, id);&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param2 = id&lt;br /&gt;
|param2text = Full or partial ID of the fix to search for.&lt;br /&gt;
:{{inote|1=Inputting a partial ID does not work correctly (see [http://forum.flightgear.org/viewtopic.php?f=30&amp;amp;t=28129 here]). It is best to just input a full ID.}}&lt;br /&gt;
|example1 = var fixes = findFixesByID(&amp;quot;POGIC&amp;quot;);&lt;br /&gt;
foreach(var fix; fixes){&lt;br /&gt;
    print(fix.id, &amp;quot; - lat: &amp;quot;, fix.lat, &amp;quot; {{!}} lon: &amp;quot;, fix.lon); # prints information about POGIC&lt;br /&gt;
}&lt;br /&gt;
|example2 = var fix = findFixesByID(&amp;quot;ZUNAP&amp;quot;);&lt;br /&gt;
fix = fix[0];&lt;br /&gt;
var (course, dist) = courseAndDistance(fix);&lt;br /&gt;
print(&amp;quot;Turn to heading &amp;quot;, math.round(course), &amp;quot;. You have &amp;quot;, sprintf(&amp;quot;%.2f&amp;quot;, dist), &amp;quot; nm to go to reach &amp;quot;, fixes[0].id);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===findNavaidByFrequencyMHz()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = findNavaidByFrequencyMHz([pos, ]freq[, type]);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1547|t=Source}}&lt;br /&gt;
|text = Returns a &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt; ghost object for a navaid matching a given frequency. If there is more than one navaid with that frequency, the nearest station is returned.&lt;br /&gt;
|param1 = pos&lt;br /&gt;
|param1text = Optional position to search around. If not given, the aircraft's current position will be used. Can be one of:&lt;br /&gt;
:* An &amp;lt;code&amp;gt;airport&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;runway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;taxiway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;fix&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;waypoint&amp;lt;/code&amp;gt; ghost type&lt;br /&gt;
:* A hash with ''lat'' and ''lon'' members&lt;br /&gt;
:* A geo.Coord object&lt;br /&gt;
:* Two numbers separated by a comma, as if the function is taking three arguments. Example: &amp;lt;code&amp;gt;findNavaidByFrequencyMHz(lat, lon, freq, type);&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param2 = freq&lt;br /&gt;
|param2text = Frequency, in megahertz, of the navaid to search for.&lt;br /&gt;
|param3 = type&lt;br /&gt;
|param3text = This will narrow the search to navaids of a certain type. Defaults to &amp;quot;all.&amp;quot; For the full list of accepted type arguments, see {{flightgear file|src/Navaids/positioned.cxx|l=127}}.&lt;br /&gt;
|example1 = var navaid = findNavaidByFrequencyMHz(109.55);&lt;br /&gt;
print(&amp;quot;ID: &amp;quot;, navaid.id); # prints info about the navaid&lt;br /&gt;
print(&amp;quot;Name: &amp;quot;, navaid.name);&lt;br /&gt;
print(&amp;quot;Latitude: &amp;quot;, navaid.lat);&lt;br /&gt;
print(&amp;quot;Longitude: &amp;quot;, navaid.lon);&lt;br /&gt;
print(&amp;quot;Elevation (AMSL): &amp;quot;, navaid.elevation, &amp;quot; m&amp;quot;);&lt;br /&gt;
print(&amp;quot;Type: &amp;quot;, navaid.type);&lt;br /&gt;
print(&amp;quot;Frequency: &amp;quot;, sprintf(&amp;quot;%.3f&amp;quot;, navaid.frequency / 100), &amp;quot; Mhz&amp;quot;);&lt;br /&gt;
print(&amp;quot;Range: &amp;quot;, navaid.range_nm, &amp;quot; nm&amp;quot;);&lt;br /&gt;
if(navaid.course) print(&amp;quot;Course: &amp;quot;, navaid.course);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== findNavaidsByFrequencyMHz()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = findNavaidsByFrequencyMHz([pos, ]freq[, type]);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1572|t=Source}}&lt;br /&gt;
|text = Returns a vector conatining &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt; ghost objects for navaids that match a given frequency, sorted from nearest to furthest.&lt;br /&gt;
|param1 = pos&lt;br /&gt;
|param1text = Optional position to search around. If not given, the aircraft's current position will be used. Can be one of:&lt;br /&gt;
:* An &amp;lt;code&amp;gt;airport&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;runway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;taxiway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;fix&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;waypoint&amp;lt;/code&amp;gt; ghost type&lt;br /&gt;
:* A hash with ''lat'' and ''lon'' members&lt;br /&gt;
:* A geo.Coord object&lt;br /&gt;
:* Two numbers separated by a comma, as if the function is taking three arguments. Example: &amp;lt;code&amp;gt;findNavaidsByFrequencyMHz(lat, lon, freq, type);&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param2 = freq&lt;br /&gt;
|param2text = Frequency, in megahertz, of the navaid to search for.&lt;br /&gt;
|param3 = type&lt;br /&gt;
|param3text = This will narrow the search to navaids of a certain type. Defaults to &amp;quot;all.&amp;quot; For the full list of accepted type arguments, see {{flightgear file|src/Navaids/positioned.cxx|l=127}}.&lt;br /&gt;
|example1 = var navaids = findNavaidsByFrequencyMHz(109.55);&lt;br /&gt;
foreach(var navaid; navaids){&lt;br /&gt;
    print(&amp;quot;--&amp;quot;);&lt;br /&gt;
    print(&amp;quot;ID: &amp;quot;, navaid.id); # prints info about the navaid&lt;br /&gt;
    print(&amp;quot;Name: &amp;quot;, navaid.name);&lt;br /&gt;
    print(&amp;quot;Latitude: &amp;quot;, navaid.lat);&lt;br /&gt;
    print(&amp;quot;Longitude: &amp;quot;, navaid.lon);&lt;br /&gt;
    print(&amp;quot;Elevation (AMSL): &amp;quot;, navaid.elevation, &amp;quot; m&amp;quot;);&lt;br /&gt;
    print(&amp;quot;Type: &amp;quot;, navaid.type);&lt;br /&gt;
    print(&amp;quot;Frequency: &amp;quot;, sprintf(&amp;quot;%.3f&amp;quot;, navaid.frequency / 100), &amp;quot; Mhz&amp;quot;);&lt;br /&gt;
    print(&amp;quot;Range: &amp;quot;, navaid.range_nm, &amp;quot; nm&amp;quot;);&lt;br /&gt;
    if(navaid.course) print(&amp;quot;Course: &amp;quot;, navaid.course);&lt;br /&gt;
    print(&amp;quot;--&amp;quot;);&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===findNavaidsByID()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = findNavaidsByID([pos, ]id[, type]);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1600|t=Source}}&lt;br /&gt;
|text = Returns a vector containing &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt; ghost objects matching a given ID, sorted by range from a certain position.&lt;br /&gt;
|param1 = pos&lt;br /&gt;
|param1text = Optional position to search around. If not given, the aircraft's current position will be used. Can be one of:&lt;br /&gt;
:* An &amp;lt;code&amp;gt;airport&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;runway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;taxiway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;fix&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;waypoint&amp;lt;/code&amp;gt; ghost type&lt;br /&gt;
:* A hash with ''lat'' and ''lon'' members&lt;br /&gt;
:* A geo.Coord object&lt;br /&gt;
:* Two numbers separated by a comma, as if the function is taking three arguments. Example: &amp;lt;code&amp;gt;findNavaidsByID(lat, lon, id, type);&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param2 = id&lt;br /&gt;
|param2text = Full or partial ID of the fix to search for.&lt;br /&gt;
:{{inote|1=Inputting a partial ID does not work correctly (see [http://forum.flightgear.org/viewtopic.php?f=30&amp;amp;t=28129 here]). It is best to just input a full ID.}}&lt;br /&gt;
|param3 = type&lt;br /&gt;
|param3text = This will narrow the search to navaids of a certain type. Defaults to &amp;quot;all.&amp;quot; For the full list of accepted type arguments, see {{flightgear file|src/Navaids/positioned.cxx|l=127}}.&lt;br /&gt;
|example1 = var navaid = findNavaidsByID(&amp;quot;MXW&amp;quot;);&lt;br /&gt;
navaid = navaid[0];&lt;br /&gt;
print(&amp;quot;ID: &amp;quot;, navaid.id); # prints info about 'MXW' (a VOR station)&lt;br /&gt;
print(&amp;quot;Name: &amp;quot;, navaid.name);&lt;br /&gt;
print(&amp;quot;Latitude: &amp;quot;, navaid.lat);&lt;br /&gt;
print(&amp;quot;Longitude: &amp;quot;, navaid.lon);&lt;br /&gt;
print(&amp;quot;Elevation (AMSL): &amp;quot;, navaid.elevation, &amp;quot; m&amp;quot;);&lt;br /&gt;
print(&amp;quot;Type: &amp;quot;, navaid.type);&lt;br /&gt;
print(&amp;quot;Frequency: &amp;quot;, sprintf(&amp;quot;%.3f&amp;quot;, navaid.frequency / 1000), &amp;quot; Mhz&amp;quot;);&lt;br /&gt;
print(&amp;quot;Range: &amp;quot;, navaid.range_nm, &amp;quot; nm&amp;quot;);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===findNavaidsWithinRange()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = findNavaidsWithinRange([pos, ]range[, type]);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1518|t=Source}}&lt;br /&gt;
|text = Returns a vector of &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt; ghost objects which are within a given range of a given position (by default the aircraft's current position). The results are sorted from closest to furthest.&lt;br /&gt;
|param1 = pos&lt;br /&gt;
|param1text = Optional position to search around. If not given, the aircraft's current position will be used. Can be one of:&lt;br /&gt;
:* An &amp;lt;code&amp;gt;airport&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;runway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;taxiway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;fix&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;waypoint&amp;lt;/code&amp;gt; ghost type&lt;br /&gt;
:* A hash with ''lat'' and ''lon'' members&lt;br /&gt;
:* A geo.Coord object&lt;br /&gt;
:* Two numbers separated by a comma, as if the function is taking three arguments. Example: &amp;lt;code&amp;gt;findNavaidsWithinRange(lat, lon, range, type);&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param2 = range&lt;br /&gt;
|param2text = Mandatory number giving the range in nautical miles within which to search for navaids.&lt;br /&gt;
|param3 = type&lt;br /&gt;
|param3text = This will narrow the search to navaids of a certain type. Defaults to &amp;quot;all.&amp;quot; For the full list of accepted type arguments, see {{flightgear file|src/Navaids/positioned.cxx|l=127}}.&lt;br /&gt;
|example1text = Searches for navaids within 10 nm of [[KSFO]].&lt;br /&gt;
|example1 = var pos = airportinfo(&amp;quot;KSFO&amp;quot;);&lt;br /&gt;
var navs = findNavaidsWithinRange(pos, 10);&lt;br /&gt;
foreach(var nav; navs){&lt;br /&gt;
    print(nav.name, &amp;quot; (ID: &amp;quot;, nav.id, &amp;quot;)&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
|example2text = Searches for navaids within 10 nm of your current position.&lt;br /&gt;
|example2 = var navs = findNavaidsWithinRange(10);&lt;br /&gt;
foreach(var nav; navs){&lt;br /&gt;
    print(nav.name, &amp;quot; (ID: &amp;quot;, nav.id, &amp;quot;)&amp;quot;);&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===finddata()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = finddata(path);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=603|t=Source}}&lt;br /&gt;
|text = Takes a relative path and tries to return an absolute one. It works by appending the relative path to some paths and testing to see if they exist. As of FlightGear v3.7, these paths are the TerraSync directory (tested first) and [[$FG_ROOT]]. &lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = A relative path as a string.&lt;br /&gt;
|example1 = var path = finddata(&amp;quot;Aircraft/Generic&amp;quot;);&lt;br /&gt;
print(path); # prints the absolute path to $FG_ROOT/Aircraft/Generic&lt;br /&gt;
|example2 = var path = finddata(&amp;quot;Airports&amp;quot;);&lt;br /&gt;
print(path); # prints the absolute path to &amp;lt;TerraSync dir&amp;gt;/Airports&lt;br /&gt;
|example3 = var path = finddata(&amp;quot;preferences.xml&amp;quot;);&lt;br /&gt;
print(path); # prints the absolute path to $FG_ROOT/preferences.xml&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===flightplan()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = flightplan([path]);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1738|t=Source}}&lt;br /&gt;
|text = {{see also|Nasal Flightplan}}&lt;br /&gt;
Returns a flight plan object, either one for the current flight plan, or one loaded from a given path.&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Optional path to flight plan XML file.&lt;br /&gt;
|example1text = Gets the active flight plan and gets the ID of the current waypoint. Note that this example requires a flight plan to be set in the [[Route Manager]] first.&lt;br /&gt;
|example1 = var fp = flightplan();&lt;br /&gt;
print(fp.getWP(fp.current).id);&lt;br /&gt;
|example2text = Creates a new flight plan from an XML file and prints the IDs of the waypoints. Note that this example requires a flight plan to have been created and saved as &amp;lt;tt&amp;gt;''[[$FG_HOME]]/fp-demo.xml''&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|example2 = var path = getprop('/sim/fg-home') ~ '/fp-demo.xml';&lt;br /&gt;
var fp = flightplan(path);&lt;br /&gt;
for(var i = 0; i &amp;lt; fp.getPlanSize(); i += 1){&lt;br /&gt;
    print(fp.getWP(i).id);&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===geodinfo()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geodinfo(lat, lon[, max_alt]);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=981|t=Source}}&lt;br /&gt;
|text = Returns a vector containing two entries or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; if no information could be obtained because the terrain tile wasn't loaded. The first entry in the vector is the elevation (in meters) for the given point, and the second is a hash with information about the assigned material (as defined in &amp;lt;tt&amp;gt;''[[$FG_ROOT]]/Materials''&amp;lt;/tt&amp;gt;), or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; if there was no material information available (for example, because there is an untextured building at that location). The structure of the hash is as follows (see also {{readme file|materials}}):&lt;br /&gt;
* '''light_coverage:''' The coverage of a single point of light in m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;.&lt;br /&gt;
* '''bumpiness:''' Normalized bumpiness factor for the material.&lt;br /&gt;
* '''load_resistance:''' The amount of pressure in N/m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; the material can withstand without deformation.&lt;br /&gt;
* '''solid:''' 1 (true) or false (0) depending on whether the material is solid or not.&lt;br /&gt;
* '''names:''' Vector of scenery types (usually generated by [[TerraGear]]) that will use this material. &lt;br /&gt;
* '''friction_factor:''' Normalized friction factor of the material.&lt;br /&gt;
* '''rolling_friction:''' The rolling friction coefficient of the material.&lt;br /&gt;
&lt;br /&gt;
Note that this function is a ''very'' CPU-intensive operation, particularly in FlightGear v2.4 and earlier. It is advised to use this function as little as possible.&lt;br /&gt;
|param1 = lat&lt;br /&gt;
|param1text = Latitude, inputted as a number.&lt;br /&gt;
|param2 = lon&lt;br /&gt;
|param2text = Longitude, inputted as a number.&lt;br /&gt;
|param3 = max_alt&lt;br /&gt;
|param3text = The altitude, in metres, from which the function will begin searching for the height of the terrain. Defaults to 10,000 metres. If the terrain is higher than this argument specifies, &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; will be returned.&lt;br /&gt;
|example1text = Dumps information about ground underneath the aircraft.&lt;br /&gt;
|example1 = var pos = geo.aircraft_position();&lt;br /&gt;
var info = geodinfo(pos.lat(), pos.lon());&lt;br /&gt;
debug.dump(info);&lt;br /&gt;
|example2text = Prints whether the ground underneath the aircraft is solid or is water.&lt;br /&gt;
|example2 = var pos = geo.aircraft_position();&lt;br /&gt;
var info = geodinfo(pos.lat(), pos.lon());&lt;br /&gt;
if (info != nil and info[1] != nil) {&lt;br /&gt;
    print(&amp;quot;The ground underneath the aircraft is &amp;quot;, info[1].solid == 1 ? &amp;quot;solid.&amp;quot; : &amp;quot;water.&amp;quot;);&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== geodtocart() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geodtocart(lat, lon, alt);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=962|t=Source}}&lt;br /&gt;
|text = Converts {{wikipedia|geodetic coordinates}} (latitude, longitude, and altitude) to {{wikipedia|ECEF|Earth-centered, Earth-fixed}} coordinates (x, y and z). A vector is returned containing x, y, and z in metres. The equatorial radius of earth used is that defined by the {{wikipedia|WGS 84}} (6,378,137 metres). All argument are mandatory.&lt;br /&gt;
|param1 = lat&lt;br /&gt;
|param1text = Latitude, in degrees.&lt;br /&gt;
|param2 = lon&lt;br /&gt;
|param2text = Longitude, in degrees.&lt;br /&gt;
|param3 = alt&lt;br /&gt;
|param3text = Altitude, in metres.&lt;br /&gt;
|example1 = var (x, y, z) = geodtocart(0, 0, 0); # point is the intersection of the prime meridian and equator.&lt;br /&gt;
print(&amp;quot;x: &amp;quot;, x); # prints &amp;quot;x: 6378137&amp;quot;&lt;br /&gt;
print(&amp;quot;y: &amp;quot;, y); # prints &amp;quot;y: 0&amp;quot;&lt;br /&gt;
print(&amp;quot;z: &amp;quot;, z); # prints &amp;quot;y: 0&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== get_cart_ground_intersection()===&lt;br /&gt;
Introduced in 2017.2.1, see [[Terrain Detection]].&lt;br /&gt;
&lt;br /&gt;
===getprop()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = &amp;lt;nowiki&amp;gt;getprop(path[, path[, ...]]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=345|t=Source}}&lt;br /&gt;
|text = Returns the value of a node in the [[Property Tree]] or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; if the node does not exist or the value is not a number (NaN).&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = There needs to be at least one argument, but there is no limit to the maximum amount of arguments that can be given. The arguments will be concatenated together to form a property tree path. The arguments must be strings, but in FlightGear v3.2 onwards, there is also support (added by {{flightgear commit|34ed79}}) for numeric arguments as indices. See example 2 below.&lt;br /&gt;
|example1 = print(&amp;quot;You have FlightGear v&amp;quot;, getprop(&amp;quot;/sim/version/flightgear&amp;quot;)); # prints FlightGear version&lt;br /&gt;
|example2text = Note that the example below will only work in FlightGear 3.2 and above.&lt;br /&gt;
|example2 = for(var i = 0; i &amp;lt; 8; i += 1){&lt;br /&gt;
    print(&amp;quot;View #&amp;quot;, i + 1, &amp;quot; is named &amp;quot;, getprop(&amp;quot;/sim/view&amp;quot;, i, &amp;quot;name&amp;quot;));&lt;br /&gt;
}&lt;br /&gt;
|example3text = Same as above, but is supported by all versions of FlightGear.&lt;br /&gt;
|example3 = for(var i = 0; i &amp;lt; 8; i += 1){&lt;br /&gt;
    print(&amp;quot;View #&amp;quot;, i + 1, &amp;quot; is named &amp;quot;, getprop(&amp;quot;/sim/view[&amp;quot; ~ i ~ &amp;quot;]/name&amp;quot;));&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
==== See also====&lt;br /&gt;
{{note| If you have to read/write the same property multiple times (e.g. in an update loop), it is more efficient to use a node object: &lt;br /&gt;
To get a Node rather than its value, use &amp;lt;code&amp;gt;props.globals.getNode()&amp;lt;/code&amp;gt; - see [[Nasal_library/props]]. }}&lt;br /&gt;
&lt;br /&gt;
===greatCircleMove()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = greatCircleMove([pos, ]course, dist);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1681|t=Source}}&lt;br /&gt;
|text = Calculates a new set of geodetic coordinates using inputs of course and distance, either from the aircraft's current position (by default) or from another set of coordinates. Returns a hash containing two members, ''lat'' and ''lon'' (latitude and longitude respectively).&lt;br /&gt;
|param1 = pos&lt;br /&gt;
|param1text = Optional position to calculate from. If not given, the aircraft's current position will be used. Can be one of:&lt;br /&gt;
:* An &amp;lt;code&amp;gt;airport&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;runway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;taxiway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;fix&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;waypoint&amp;lt;/code&amp;gt; ghost object.&lt;br /&gt;
:* A hash with ''lat'' and ''lon'' members&lt;br /&gt;
:* A &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; object&lt;br /&gt;
:* A lat/lon pair, that is, a pair of numbers (latitude followed by longitude) separated by a comma: &amp;lt;code&amp;gt;greatCircleMove(lat,lon, ...)&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param2 = course&lt;br /&gt;
|param2text = Course to new set of coordinates, in degrees (in the range 0–360).&lt;br /&gt;
|param3 = dist&lt;br /&gt;
|param3text = Distance in nautical miles to the new set of coordinates.&lt;br /&gt;
|example1 = var pos = greatCircleMove(0,0, 0, 1);&lt;br /&gt;
debug.dump(pos); # print hash with coordinates&lt;br /&gt;
|example2 = var fix = findFixesByID(&amp;quot;POGIC&amp;quot;);&lt;br /&gt;
fix = fix[0];&lt;br /&gt;
var pos = greatCircleMove(fix, 45, 10);&lt;br /&gt;
debug.dump(pos); # print hash with coordinates&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===interpolate()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|private = _interpolate()&lt;br /&gt;
|syntax = &amp;lt;nowiki&amp;gt;interpolate(prop, value1, time1[, value2, time2[, ...]]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=522|t=Part 1}} {{!}} {{fgdata file|Nasal/globals.nas|t=Part 2}}&lt;br /&gt;
|text = Linearly interpolates a node in the property tree to a given value in a specified time. The value/time pairs will be run one after the other in the order that they are passed to the function. Note that the interpolation will continue even when the simulation is paused.&lt;br /&gt;
|param1 = prop&lt;br /&gt;
|param1text = String or &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object that indicates a node in the property tree to be used.&lt;br /&gt;
|param2 = value''n''&lt;br /&gt;
|param2text = Target value to change the property to in the set amount of time. This should be a number.&lt;br /&gt;
|param3 = time''n''&lt;br /&gt;
|param3text = Time in seconds, that will be taken for the interpolation.&lt;br /&gt;
|example1text = Paste the code below into the Nasal Console and execute. Then, open the Property Browser and look for the property. Finally, run the code again, and watch the value of the property change.&lt;br /&gt;
|example1 = setprop(&amp;quot;/test&amp;quot;, 0); # (re-)set property&lt;br /&gt;
interpolate(&amp;quot;/test&amp;quot;,&lt;br /&gt;
    50, 5, # interpolate to 50 in 5 seconds&lt;br /&gt;
    10, 2, # interpolate to 10 in 2 seconds&lt;br /&gt;
    0, 5); # interpolate to 0 in 5 seconds&lt;br /&gt;
|example2 = # Apply the left brake at 20% per second&lt;br /&gt;
var prop = &amp;quot;controls/gear/brake-left&amp;quot;;&lt;br /&gt;
var dist = 1 - getprop(prop);&lt;br /&gt;
if (dist == 1) {&lt;br /&gt;
    interpolate(prop, 1, dist / 0.2);&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===isa()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = isa(object, class);&lt;br /&gt;
|source = {{fgdata file|Nasal/globals.nas|t=Source}}&lt;br /&gt;
|text = Checks if an object is an instance of, or inherits from, a second object (or class), returning 1 (true) if it is and 0 (false) if otherwise.&lt;br /&gt;
|param1 = object&lt;br /&gt;
|param1text = Object to check.&lt;br /&gt;
|param2 = class&lt;br /&gt;
|param2text = Class/object to check that '''object''' inherits from or is an instance of.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
if(isa(coord, geo.Coord)){&lt;br /&gt;
    print(&amp;quot;Variable 'coord' is an instance of class 'geo.Coord'&amp;quot;); # this one will be printed&lt;br /&gt;
} else {&lt;br /&gt;
    print(&amp;quot;Variable 'coord' is not an instance of class 'geo.Coord'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
|example2 = var coord = geo.Coord.new();&lt;br /&gt;
if(isa(coord, props.Node)){&lt;br /&gt;
    print(&amp;quot;Variable 'coord' is an instance of class 'props.Node'&amp;quot;);&lt;br /&gt;
} else {&lt;br /&gt;
    print(&amp;quot;Variable 'coord' is not an instance of class 'props.Node'&amp;quot;); # this one will be printed&lt;br /&gt;
}&lt;br /&gt;
|example3text = The example below demonstrates checking of inheritance.&lt;br /&gt;
|example3 = var Const = {&lt;br /&gt;
    constant: 2,&lt;br /&gt;
    getConst: func {&lt;br /&gt;
        return me.constant;&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
var Add = {&lt;br /&gt;
    new: func {&lt;br /&gt;
        return { parents: [Add, Const] };&lt;br /&gt;
    },&lt;br /&gt;
&lt;br /&gt;
    addToConst: func(a){&lt;br /&gt;
        return a * me.getConst();&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
var m = Add.new();&lt;br /&gt;
print(m.addToConst(4));&lt;br /&gt;
&lt;br /&gt;
if(isa(m, Add)) print(&amp;quot;Variable 'm' is an instance of class 'Add'&amp;quot;); # will be printed&lt;br /&gt;
if(isa(m, Const)) print(&amp;quot;Variable 'm' is an instance of class 'Const'&amp;quot;); # will also be printed&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===logprint()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = &amp;lt;nowiki&amp;gt;logprint(priority[, msg[, msg[, ...]]]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=431|t=Source}}&lt;br /&gt;
|text = Concatenates a message and logs it with a given priority level. Unlike {{func link|print()}} and {{func link|printlog()}}, message outputted by this function will be logged in your &amp;lt;code&amp;gt;[[Commonly used debugging tools#fgfs.log|fgfs.log]]&amp;lt;/code&amp;gt; file as coming from the Nasal file itself rather than from {{flightgear file|src/Scripting/NasalSys.cxx}}.&lt;br /&gt;
|param1 = priority&lt;br /&gt;
|param1text = Number specifying the priority level of the outputted message:&lt;br /&gt;
:{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Number !! Debug type&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} 1 {{!!}} Bulk&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} 2 {{!!}} Debug&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} 3 {{!!}} Info&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} 4 {{!!}} Warn&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} 5 {{!!}} Alert&lt;br /&gt;
{{!}}}&lt;br /&gt;
|param2 = msg&lt;br /&gt;
|param2text = The message. There is no limit to the arguments you give give. They will be concatenated together before logging.&lt;br /&gt;
|example1 = # logs the value of pi to three decimal places with log level 3&lt;br /&gt;
logprint(3, &amp;quot;pi = &amp;quot;, sprintf(&amp;quot;%.3f&amp;quot;, math.pi));&lt;br /&gt;
|example2 = logprint(5, &amp;quot;Alert! This is an important message!&amp;quot;);&lt;br /&gt;
}}&lt;br /&gt;
{{note| &lt;br /&gt;
The following constants have been added to the development branch of FlightGear (&amp;quot;next&amp;quot;) and will be releases with FG 2020.1 so you won't have to remember the numbers anymore:&lt;br /&gt;
&lt;br /&gt;
LOG_BULK, LOG_WARN, LOG_DEBUG, LOG_INFO, LOG_ALERT, DEV_WARN, DEV_ALERT }}&lt;br /&gt;
&lt;br /&gt;
===magvar() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = magvar([pos]);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1642|t=Source}}&lt;br /&gt;
|text = Returns the {{wikipedia|magnetic variation}} at a given set of coordinates. The table below gives the magnetic model used depending on the version of FlightGear.&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! FlightGear versions !! Model !! Reference date&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} 3.6 and above {{!!}} {{wikipedia|World Magnetic Model}} (WMM) 2015 {{!!}} 1 January 2015&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} 0.9.11-pre1 to 3.4 {{!!}} WMM 2005 {{!!}} 1 January 2005&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} 0.7.3 to 0.9.10 {{!!}} WMM 2000 {{!!}} 1 January 2000&lt;br /&gt;
{{!}}}&lt;br /&gt;
|param1 = pos&lt;br /&gt;
|param1text = Optional position to calculate from. If not given, the aircraft's current position will be used. Can be one of:&lt;br /&gt;
:* An &amp;lt;code&amp;gt;airport&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;runway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;taxiway&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;fix&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;waypoint&amp;lt;/code&amp;gt; ghost object.&lt;br /&gt;
:* A hash with ''lat'' and ''lon'' members&lt;br /&gt;
:* A &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; object&lt;br /&gt;
:* A lat/lon pair, that is, a pair of numbers (latitude followed by longitude) separated by a comma: &amp;lt;code&amp;gt;magvar(lat,lon)&amp;lt;/code&amp;gt;.&lt;br /&gt;
|example1 = print(magvar(0, 0)); # prints the magnetic variation at 0, 0&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===maketimer() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = maketimer(interval[, self], function);&lt;br /&gt;
|source = ''Implemented using the {{API Link|flightgear|class|TimerObj}} class.''&amp;lt;br&amp;gt;{{flightgear file|src/Scripting/NasalSys.cxx|l=90|t=Part 1}} {{!}} {{flightgear file|src/Scripting/NasalSys.cxx|l=533|t=Part 2}}&lt;br /&gt;
|version = 2.12&lt;br /&gt;
|commit = {{flightgear commit|ab939f|t=commit}}&lt;br /&gt;
|text = Returns a timer object containing the following methods and members:&lt;br /&gt;
* '''start()''': Starts the timer.&lt;br /&gt;
* '''stop()''': Stops the timer.&lt;br /&gt;
* '''restart(interval)''': Restarts the timer with the given interval.&lt;br /&gt;
* '''singleShot''': Bool showing whether the timer is only to be run once, or continuously until told to stop. Can be both set and read from (see examples).&lt;br /&gt;
* '''isRunning''': Read-only bool telling whether the timer is currently running.&lt;br /&gt;
* '''simulatedTime''': (FG 2017.1+; {{flightgear commit|0af316|t=commit}}) Bool telling whether the timer is using simulated time (which accounts for pause, etc.). Defaults to false (use real time). Can be both read and set. This cannot be changed while the timer is running.&lt;br /&gt;
Unlike {{func link|settimer()}}, which it replaces, &amp;lt;code&amp;gt;maketimer()&amp;lt;/code&amp;gt; provides more control over the timer. In addition, it can help reduce memory usage.&lt;br /&gt;
|param1 = interval&lt;br /&gt;
|param1text = Interval in seconds for the timer.&lt;br /&gt;
|param2 = self&lt;br /&gt;
|param2text = Optional parameter specifying what any &amp;lt;code&amp;gt;'''me'''&amp;lt;/code&amp;gt; references in the function being called will refer to.&lt;br /&gt;
|param3 = function&lt;br /&gt;
|param3text = Function to be called at the given interval.&lt;br /&gt;
|example1 = var timer = maketimer(1, func(){&lt;br /&gt;
    print(&amp;quot;Hello, World!&amp;quot;); # print &amp;quot;Hello, World!&amp;quot; once every second (call timer.stop() to stop it)&lt;br /&gt;
});&lt;br /&gt;
timer.start();&lt;br /&gt;
|example2 = var timer = maketimer(1, math, func(){&lt;br /&gt;
    print(me.math); # 'me' reference is the 'math' namespace&lt;br /&gt;
});&lt;br /&gt;
timer.singleShot = 1; # timer will only be run once&lt;br /&gt;
timer.start();&lt;br /&gt;
|example3 = var timer = maketimer(1, func(){&lt;br /&gt;
    print(&amp;quot;Hello, World!&amp;quot;); # print &amp;quot;Hello, World!&amp;quot; once every second (call timer.stop() to stop it)&lt;br /&gt;
});&lt;br /&gt;
timer.start();&lt;br /&gt;
print(timer.isRunning); # prints 1&lt;br /&gt;
|example4text = In the example below, &amp;quot;Hello, World!&amp;quot; will be printed after one second the first time, and after two seconds thereafter.&lt;br /&gt;
|example4 = var update = func(){&lt;br /&gt;
    print(&amp;quot;Hello, World!&amp;quot;);&lt;br /&gt;
    timer.restart(2); # restarts the timer with a two second interval&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
var timer = maketimer(1, update);&lt;br /&gt;
timer.singleShot = 1;&lt;br /&gt;
timer.start();&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===maketimestamp()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = maketimestamp()&lt;br /&gt;
|source = ''Implemented using the {{API Link|flightgear|class|TimeStampObj}} class.''&amp;lt;br&amp;gt;{{flightgear file|src/Scripting/NasalSys.cxx|l=214|t=Part 1}} {{!}} {{flightgear file|src/Scripting/NasalSys.cxx|l=589|t=Part 2}}&lt;br /&gt;
|version = 2019.2&lt;br /&gt;
|commit = {{flightgear commit|7db06300|t=commit}}&lt;br /&gt;
|text = Returns a time stamp object to allow high resolution timing of Nasal operations. When created the timer will automatically be stamped. The object has the following methods:&lt;br /&gt;
* '''stamp()''': Resets the timing operation. Call this first.&lt;br /&gt;
* '''elapsedMSec()''': returns number of milliseconds elapsed since stamp() called. Resolution may vary depending on platform but is usually at least millisecond accuracy.&lt;br /&gt;
* '''elapsedUSec()''': returns number of microseconds elapsed since stamp() called. Resolution may vary depending on platform but is usually at least millisecond accuracy.&lt;br /&gt;
|&lt;br /&gt;
|example1text = In the example below the number of milliseconds elapsed will be printed.&lt;br /&gt;
|example1 = var timestamp = maketimestamp();&lt;br /&gt;
timestamp.stamp();&lt;br /&gt;
print(timestamp.elapsedMSec(), &amp;quot;ms elapsed&amp;quot;);&lt;br /&gt;
print(timestamp.elapsedMSec(), &amp;quot;ms elapsed&amp;quot;);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===md5()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = md5(string);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=758|t=Source}}&lt;br /&gt;
|version = 3.2&lt;br /&gt;
|commit = {{flightgear commit|cfbf9e|t=commit}}&lt;br /&gt;
|text = Returns a the {{wikipedia|MD5}} hash (as a string) of the inputted string.&lt;br /&gt;
|param1 = string&lt;br /&gt;
|param1text = String the generate the hash of. Mandatory.&lt;br /&gt;
|example1text = The below code should output &amp;lt;code&amp;gt;65a8e27d8879283831b664bd8b7f0ad4&amp;lt;/code&amp;gt;.&lt;br /&gt;
|example1 = print(md5(&amp;quot;Hello, World!&amp;quot;));&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===navinfo()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = navinfo(lat, lon, type, id);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1453|t=Source}}&lt;br /&gt;
|text = Returns vector &amp;lt;code&amp;gt;navaid&amp;lt;/code&amp;gt; ghost objects matching the given '''type''' and '''id''' or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; on error.&lt;br /&gt;
|param1 = lat ''and'' lon&lt;br /&gt;
|param1text = If given, the returned navaids will be put into order of ascending distance from the location.&lt;br /&gt;
|param2 = type&lt;br /&gt;
|param2text = Narrows the search to the given type. Must be one of &amp;quot;any,&amp;quot; &amp;quot;fix,&amp;quot; &amp;quot;vor,&amp;quot; &amp;quot;ndb,&amp;quot; &amp;quot;ils,&amp;quot; &amp;quot;dme,&amp;quot; or &amp;quot;tacan.&amp;quot; Defaults to the equivalent of &amp;quot;any.&amp;quot;&lt;br /&gt;
|param3 = id&lt;br /&gt;
|param3text = ID to search for. Note that, although all the parameters are technically optional, this parameter must be given, otherwise an empty vector will be returned.&lt;br /&gt;
|example1 = navinfo(&amp;quot;vor&amp;quot;); # returns all VORs&lt;br /&gt;
|example2 = navinfo(&amp;quot;HAM&amp;quot;); # return all navaids whose names start with &amp;quot;HAM&amp;quot;&lt;br /&gt;
|example3 = navinfo(&amp;quot;vor&amp;quot;, &amp;quot;HAM&amp;quot;); # return all VORs whose names start with &amp;quot;HAM&amp;quot;&lt;br /&gt;
|example4 = navinfo(34,48,&amp;quot;vor&amp;quot;,&amp;quot;HAM&amp;quot;); # return all VORs whose names start with &amp;quot;HAM&amp;quot; and sorted by distance relative to 34°, 48°&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===parse_markdown()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = parse_markdown(markdown);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=745|t=Part 1}} {{!}} {{simgear file|simgear/misc/SimpleMarkdown.cxx|t=Part 2}} &lt;br /&gt;
|version = 3.2&lt;br /&gt;
|text = Parses a string containing {{wikipedia|Markdown}} and returns the result as a string. As of FlightGear 2016.1, it is just a simple parser, and does the following:&lt;br /&gt;
* It strips whitespace from the beginning of the string.&lt;br /&gt;
* It supports [http://daringfireball.net/projects/markdown/syntax#p paragraphs and line breaks].&lt;br /&gt;
* It collapses whitespace.&lt;br /&gt;
* It converts unordered [http://daringfireball.net/projects/markdown/syntax#list lists] to use a bullet character (&amp;amp;bull;). Note that the bullet character is implemented in hexadecimal UTF-8 character bytes (&amp;lt;code&amp;gt;E2 80 A2&amp;lt;/code&amp;gt;), as so may not work properly when the being displayed in an encoding other than UTF-8.&lt;br /&gt;
|param1 = markdown&lt;br /&gt;
|param1text = String containing Markdown to be parsed.&lt;br /&gt;
|example1text = &lt;br /&gt;
Save the below code as &amp;lt;tt&amp;gt;''[[$FG_ROOT]]/gui/dialogs/test.xml''&amp;lt;/tt&amp;gt;, then run the Nasal code below it to open the dialog. To change the markdown to be parsed, simply change the code in the highlighted section, save it, and reload the GUI (&amp;lt;tt&amp;gt;Debug &amp;gt; Reload GUI&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;41-50&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt;test&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;vbox&amp;lt;/layout&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;group&amp;gt;&lt;br /&gt;
    &amp;lt;layout&amp;gt;hbox&amp;lt;/layout&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;empty&amp;gt;&lt;br /&gt;
        &amp;lt;stretch&amp;gt;true&amp;lt;/stretch&amp;gt;&lt;br /&gt;
    &amp;lt;/empty&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;text&amp;gt;&lt;br /&gt;
        &amp;lt;label&amp;gt;parse_markdown() test dialog&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;/text&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;empty&amp;gt;&lt;br /&gt;
        &amp;lt;stretch&amp;gt;true&amp;lt;/stretch&amp;gt;&lt;br /&gt;
    &amp;lt;/empty&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;button&amp;gt;&lt;br /&gt;
        &amp;lt;legend&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
        &amp;lt;pref-width&amp;gt;16&amp;lt;/pref-width&amp;gt;&lt;br /&gt;
        &amp;lt;pref-height&amp;gt;16&amp;lt;/pref-height&amp;gt;&lt;br /&gt;
        &amp;lt;binding&amp;gt;&lt;br /&gt;
            &amp;lt;command&amp;gt;dialog-close&amp;lt;/command&amp;gt;&lt;br /&gt;
        &amp;lt;/binding&amp;gt;&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/group&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;canvas&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;Canvas plot&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;stretch&amp;gt;true&amp;lt;/stretch&amp;gt;&lt;br /&gt;
    &amp;lt;pref-width&amp;gt;400&amp;lt;/pref-width&amp;gt;&lt;br /&gt;
    &amp;lt;pref-height&amp;gt;300&amp;lt;/pref-height&amp;gt;&lt;br /&gt;
    &amp;lt;nasal&amp;gt;&lt;br /&gt;
        &amp;lt;load&amp;gt;&amp;lt;![CDATA[&lt;br /&gt;
var text = 'Items:&lt;br /&gt;
* apples&lt;br /&gt;
* oranges&lt;br /&gt;
* pears&lt;br /&gt;
&lt;br /&gt;
Some text.&lt;br /&gt;
Some more items:&lt;br /&gt;
* apples&lt;br /&gt;
* oranges&lt;br /&gt;
* pears';&lt;br /&gt;
&lt;br /&gt;
var parsed = parse_markdown(text);&lt;br /&gt;
&lt;br /&gt;
var root_canvas = canvas.get(cmdarg());&lt;br /&gt;
root_canvas.setColorBackground(255, 255, 255);&lt;br /&gt;
var root = root_canvas.createGroup();&lt;br /&gt;
&lt;br /&gt;
var text_dis = root.createChild(&amp;quot;text&amp;quot;)&lt;br /&gt;
    .setText(parsed)&lt;br /&gt;
    .setTranslation(5, 5)&lt;br /&gt;
    .setFont(&amp;quot;LiberationFonts\LiberationSans-Regular.ttf&amp;quot;)&lt;br /&gt;
    .setFontSize(15)&lt;br /&gt;
    .setColor(0, 0, 0)&lt;br /&gt;
    .setDrawMode(canvas.Text.TEXT)&lt;br /&gt;
    .setAlignment(&amp;quot;left-top&amp;quot;);&lt;br /&gt;
        ]]&amp;gt;&amp;lt;/load&amp;gt;&lt;br /&gt;
    &amp;lt;/nasal&amp;gt;&lt;br /&gt;
&amp;lt;/canvas&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|example1 = fgcommand(&amp;quot;dialog-show&amp;quot;, {&amp;quot;dialog-name&amp;quot;: &amp;quot;test&amp;quot;});&lt;br /&gt;
|example2text = The example below parses Markdown and outputs it in a HTML document. The parsed text is placed in &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; inline&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; tags. To change the Markdown to be parsed, simply edit the variable &amp;lt;tt&amp;gt;markdown&amp;lt;/tt&amp;gt; at the top of the code.&lt;br /&gt;
|example2 = &amp;lt;nowiki&amp;gt;var markdown = 'Items:&lt;br /&gt;
* apples&lt;br /&gt;
* oranges&lt;br /&gt;
* pears&lt;br /&gt;
&lt;br /&gt;
Some text.&lt;br /&gt;
Some more items:&lt;br /&gt;
* apples&lt;br /&gt;
* oranges&lt;br /&gt;
* pears';&lt;br /&gt;
&lt;br /&gt;
var parsed = parse_markdown(markdown);&lt;br /&gt;
&lt;br /&gt;
debug.dump(parsed);&lt;br /&gt;
&lt;br /&gt;
var path = string.normpath(getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ '/Export/parse_markdown()-test.html');&lt;br /&gt;
&lt;br /&gt;
var file = io.open(path, &amp;quot;w&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
var html = &amp;quot;&amp;lt;!DOCTYPE html&amp;gt;\n\n&amp;lt;html&amp;gt;\n\n&amp;lt;head&amp;gt;\n\t&amp;lt;meta charset=\&amp;quot;UTF-8\&amp;quot;&amp;gt;\n\t&amp;lt;title&amp;gt;parse_markdown() test generated by Nasal&amp;lt;/title&amp;gt;\n&amp;lt;/head&amp;gt;\n\n&amp;lt;body&amp;gt;\n\t&amp;lt;pre&amp;gt;&amp;quot; ~ parsed ~ &amp;quot;&amp;lt;/pre&amp;gt;\n&amp;lt;/body&amp;gt;\n\n&amp;lt;/html&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
io.write(file, html);&lt;br /&gt;
io.close(file);&lt;br /&gt;
print(&amp;quot;Done, file ready for viewing (&amp;quot; ~ path ~ &amp;quot;)&amp;quot;);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===parsexml()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = &amp;lt;nowiki&amp;gt;parsexml(path[, start[, end[, data[, pro_ins]]]]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=710|t=Source}}&lt;br /&gt;
|text = This function is an interface into the built-in [http://expat.sourceforge.net/ Expat XML parser]. The absolute path to the file is returned as string, or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; is returned on error.&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Mandatory absolute path to the XML file to be parsed.&lt;br /&gt;
|param2 = start&lt;br /&gt;
|param2text = Optional callback function that will be called for every starting tag. The function should take two argument: the tag name and a hash containing attributes.&lt;br /&gt;
|param3 = end&lt;br /&gt;
|param3text = Optional callback function that will be called for every ending tag. The function should take one argument: the tag name.&lt;br /&gt;
|param4 = data&lt;br /&gt;
|param4text = Optional callback function that will be called for every piece of data within a set of tags. The function should take one argument: the data as a string.&lt;br /&gt;
|param5 = pro_ins&lt;br /&gt;
|param5text = Optional callback function that will be called for every {{wikipedia|Processing Instruction|processing instruction}}. The function should take two argument: the target and the data string.&lt;br /&gt;
|example1text = Save the below XML code in &amp;lt;tt&amp;gt;''[[$FG_HOME]]/Export/demo.xml''&amp;lt;/tt&amp;gt;. Then, execute the Nasal code below in the Nasal Console. The XML will be parsed and each bit of the code will be printed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml-stylesheet type=&amp;quot;text/xsl&amp;quot; href=&amp;quot;style.xsl&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;foo&amp;gt;&lt;br /&gt;
  &amp;lt;blah type=&amp;quot;string&amp;quot;&amp;gt;&amp;lt;![CDATA[ &amp;lt;sender&amp;gt;John Smith&amp;lt;/sender&amp;gt; ]]&amp;gt;&amp;lt;/blah&amp;gt;&lt;br /&gt;
  &amp;lt;blah2 type=&amp;quot;string&amp;quot;&amp;gt;Orange &amp;amp;amp; lemons&amp;lt;/blah2&amp;gt;&lt;br /&gt;
&amp;lt;/foo&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|example1 = var start = func(name, attr){&lt;br /&gt;
    print(&amp;quot;Starting tag: '&amp;quot;, name, &amp;quot;'&amp;quot;);&lt;br /&gt;
    foreach(var a; keys(attr)){&lt;br /&gt;
        print(&amp;quot;\twith attribute &amp;quot;, a, '=&amp;quot;', attr[a], '&amp;quot;');&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
var end = func(name){&lt;br /&gt;
    print(&amp;quot;Ending tag: '&amp;quot;, name, &amp;quot;'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
var data = func(data){&lt;br /&gt;
    print(&amp;quot;Data = '&amp;quot;, data, &amp;quot;'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
var pro_instr = func(target, data){&lt;br /&gt;
    print(&amp;quot;Processing instruction: target = '&amp;quot;, target, &amp;quot;', data = '&amp;quot;, data, &amp;quot;'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
parsexml(getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ '/Export/demo.xml', start, end, data, pro_instr);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===print()===&lt;br /&gt;
{{Note|As of 07/2020, we are in the process of slowly deprecating and removing Nasal print() (in fgdata) where possible in favor of log [[#logprint()]] which takes a priority level.&lt;br /&gt;
&lt;br /&gt;
This is part of the goal that we achieve zero output at log-level at alert, and everything shown at ‘warn; is really a warning, not just information.&amp;lt;ref&amp;gt;https://sourceforge.net/p/flightgear/mailman/message/37042224/&amp;lt;/ref&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = &amp;lt;nowiki&amp;gt;print(data[, data[, ...]]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=415|t=Source}}&lt;br /&gt;
|text = Concatenates its arguments and then prints it to the terminal and the [[Commonly used debugging tools#fgfs.log|log]]. Note that a newline is automatically added.&lt;br /&gt;
|param1 = data&lt;br /&gt;
|param1text = Data to print. Only strings and numbers can be printed; other data types will not be. There many be any number of arguments; they will just be concatenated together.&lt;br /&gt;
|example1 = print(&amp;quot;Just&amp;quot;, &amp;quot; a &amp;quot;, &amp;quot;test&amp;quot;); # prints &amp;quot;Just a test&amp;quot;&lt;br /&gt;
|example2 = print(&amp;quot;pi = &amp;quot;, math.pi); # prints &amp;quot;pi = 3.141592...&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== printf() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = &amp;lt;nowiki&amp;gt;printf(format[, arg[, arg, [...]]]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|source = {{fgdata file|Nasal/globals.nas|t=Source}}&lt;br /&gt;
|text = Creates and prints a formatted string. For a description of its arguments, see {{func link|sprintf()}} (it is, in fact, implemented using &amp;lt;code&amp;gt;sprintf()&amp;lt;/code&amp;gt;).&lt;br /&gt;
|example1 = printf(&amp;quot;In hexadecimal, 100000 = %X&amp;quot;, 186A0); # prints &amp;quot;In hexadecimal, 100000 = 186A0&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===printlog()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = &amp;lt;nowiki&amp;gt;printlog(level, data[, data[, ...]]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|source = {{fgdata file|Nasal/globals.nas|t=Source}}&lt;br /&gt;
|text = Prints the given message with the given log level. If the log level is higher or equal to &amp;lt;code&amp;gt;/sim/logging/priority&amp;lt;/code&amp;gt;, it is printed.&lt;br /&gt;
|param1 = level&lt;br /&gt;
|param1text = Mandatory log level as a string. Must be one of &amp;quot;none,&amp;quot; &amp;quot;bulk,&amp;quot; &amp;quot;debug,&amp;quot; &amp;quot;info,&amp;quot; &amp;quot;warn,&amp;quot; or &amp;quot;alert.&amp;quot; Note that &amp;quot;none&amp;quot; will mean that the message will never be printed.&lt;br /&gt;
|param2 = data&lt;br /&gt;
|param2text = Data to be printed. Only strings and numbers will be printed; others will not be. There may be any number of arguments; they will just be concatenated together.&lt;br /&gt;
|example1 = printlog(&amp;quot;alert&amp;quot;, &amp;quot;This is an alert&amp;quot;); # message will be printed&lt;br /&gt;
|example2 = printlog(&amp;quot;info&amp;quot;, &amp;quot;Just informing you about something&amp;quot;); # message will be printed only if log level is set to &amp;quot;info&amp;quot; or less&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===rand()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = rand();&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=554|t=Source}}&lt;br /&gt;
|text = Returns a random floating point number between 0 (inclusive) and 1 (exclusive). It takes no arguments.&lt;br /&gt;
|example1 = print(rand()); # prints random number&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===registerFlightPlanDelegate()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = registerFlightPlanDelegate(init_func);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1879|t=Source}}&lt;br /&gt;
|text = Registers a flight plan delegate. See &amp;lt;tt&amp;gt;''{{fgdata file|Nasal/route_manager.nas|t=$FG_ROOT/Nasal/route_manager.nas}}''&amp;lt;/tt&amp;gt; for examples.&lt;br /&gt;
|param1 = init_func&lt;br /&gt;
|param1text = Initialization function which will be called during FlightGear's startup.&lt;br /&gt;
}}&lt;br /&gt;
===removecommand()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = removecommand(cmd);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=668|t=Source}}&lt;br /&gt;
|text = Removes the given fgcommand. Returns &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{caution|This will remove '''any''' [[fgcommands|fgcommand]], even those implemented in C++, so use with caution!}}&lt;br /&gt;
|param1 = cmd&lt;br /&gt;
|param1text = String specifying the name of the command to remove.&lt;br /&gt;
|example1 = addcommand(&amp;quot;hello&amp;quot;, func(){&lt;br /&gt;
    print(&amp;quot;Hello&amp;quot;);&lt;br /&gt;
});&lt;br /&gt;
fgcommand(&amp;quot;hello&amp;quot;); # &amp;quot;Hello&amp;quot; will be printed&lt;br /&gt;
removecommand(&amp;quot;hello&amp;quot;); # removes it&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===removelistener()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = removelistener(id);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=1384|t=Part 1}} {{!}} {{flightgear file|src/Scripting/NasalSys.cxx|l=506|t=Part 2}}&lt;br /&gt;
|text = Removes and deactivates the given listener and returns the number of listeners left or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; on error.&lt;br /&gt;
{{note|It is good practice to remove listeners when they are not required anymore. This prevents the listeners reducing FlightGear's run performance.}}&lt;br /&gt;
|param1 = id&lt;br /&gt;
|param1text = ID of listener as returned by {{func link|setlistener()}}.&lt;br /&gt;
|example1 = var ls = setlistener(&amp;quot;/sim/test&amp;quot;, func(){&lt;br /&gt;
    print(&amp;quot;Property '/sim/test' has been changed&amp;quot;);&lt;br /&gt;
});&lt;br /&gt;
setprop(&amp;quot;/sim/test&amp;quot;, &amp;quot;blah&amp;quot;); # trigger listener&lt;br /&gt;
var rem = removelistener(ls); # remove listener&lt;br /&gt;
print(&amp;quot;There are &amp;quot;, rem, &amp;quot; listeners remaining&amp;quot;);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===resolvepath()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = resolvepath(path);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=604|t=Source}}&lt;br /&gt;
|text = Takes a relative path as a string and uses [[SimGear]]'s path-resolving framework to return an absolute path as a string. If the path could not be resolved, an empty string is returned. See [[Resolving Paths]] for a detailed description of the algorithm. This function can also be used to check if a file exists.&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Relative path to be completed.&lt;br /&gt;
|example1 = print(resolvepath(&amp;quot;Nasal/globals.nas&amp;quot;)); # prints the equivalent of $FG_ROOT/Nasal/globals.nas&lt;br /&gt;
|example2 = print(resolvepath(&amp;quot;blah&amp;quot;)); # prints nothing; could not be resolved&lt;br /&gt;
|example3 = var file_path = resolvepath(&amp;quot;Aircraft/SenecaII/some-file&amp;quot;);&lt;br /&gt;
if (file_path != &amp;quot;&amp;quot;){&lt;br /&gt;
    gui.popupTip(&amp;quot;some-file found&amp;quot;, 2);&lt;br /&gt;
} else {&lt;br /&gt;
    gui.popupTip(&amp;quot;some-file not found&amp;quot;, 2);&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===setlistener()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = &amp;lt;nowiki&amp;gt;setlistener(node, code[, init[, type]]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|private = _setlistener()&lt;br /&gt;
|source = {{flightgear file|src/Scripting/Nasal|l=499|t=Part 1}} {{!}} {{flightgear file|src/Scripting/Nasal|l=1350|t=Part 2}}&amp;lt;br&amp;gt;''Listener implemented using the {{API Link|flightgear|class|FGNasalListener}} class.''&lt;br /&gt;
|text = Creates a listener which will be triggered when the given property is changed (depending on the '''type'''). A unique integer ID is returned; this can later be used as the argument to {{func link|removelistener()}}.&lt;br /&gt;
{{note|Listeners are known to be a source of resource leaks. To avoid this, please take measures such as:&lt;br /&gt;
* Using {{func link|removelistener()}} when they are not needed any more.&lt;br /&gt;
* Using a single initialization listener.&lt;br /&gt;
* Avoiding tying listeners to properties that are rapidly updated (e.g., many times per frame).&lt;br /&gt;
}}&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = Mandatory string or &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object pointing to a property in the [[Property Tree]].&lt;br /&gt;
|param2 = code&lt;br /&gt;
|param2text = Mandatory callback function to execute when the listener is triggered. The function can take up to four arguments in the following order:&lt;br /&gt;
* '''changed''': a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object pointing to the changed node.&lt;br /&gt;
* '''listen''': a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object pointing to the listened-to node. Note that this argument maybe different depending on the '''type'''.&lt;br /&gt;
* '''mode''': an integer telling how the listener was triggered. 0 means that the value was changed. 1 means that a child property was added. -1 means that a child property was removed.&lt;br /&gt;
* '''is_child''': boolean telling whether '''changed''' is a child property of the listened-to '''node''' or not. 1 (true) if it is, 0 (false) otherwise.&lt;br /&gt;
|param3 = init&lt;br /&gt;
|param3text = If set to 1 (true), the listener will additionally be triggered when it is created. This argument is optional and defaults to 0 (false).&lt;br /&gt;
|param4 = type&lt;br /&gt;
|param4text = Integer specifying the listener's behavior. 0 means that the listener will only trigger when the property is changed. 1 means that the trigger will always be triggered when the property is written to. 2 will mean that the listener will be triggered even if child properties are modified. This argument is optional and defaults to 1.&lt;br /&gt;
|example1 = var prop = props.globals.initNode(&amp;quot;/sim/test&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;STRING&amp;quot;); # create property&lt;br /&gt;
var id = setlistener(&amp;quot;/sim/test&amp;quot;, func(n){ # create listener&lt;br /&gt;
    print(&amp;quot;Value: &amp;quot;, n.getValue());&lt;br /&gt;
});&lt;br /&gt;
setprop(&amp;quot;/sim/test&amp;quot;, &amp;quot;blah&amp;quot;); # trigger listener&lt;br /&gt;
removelistener(id); # remove listener&lt;br /&gt;
prop.remove(); # remove property&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===setprop()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = &amp;lt;nowiki&amp;gt;setprop(path[, path[, ...]], value);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=385|t=Source}}&lt;br /&gt;
|text = Sets the value of a property in the [[Property Tree]]. If the property does not exist, it will be created. Returns 1 (true) on success or 0 (false) if there was an error.&lt;br /&gt;
{{note|If you want to remove a property, you will have to use one of the &amp;lt;code&amp;gt;props&amp;lt;/code&amp;gt; helpers:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
props.globals.getNode(&amp;quot;foo/bar&amp;quot;).remove(); # take out the complete node&lt;br /&gt;
props.globals.getNode(&amp;quot;foo&amp;quot;).removeChild(&amp;quot;bar&amp;quot;); # take out a certain child node&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = There needs to be at least one '''path''' argument, but there is no limit to the maximum amount that can be given. They will be concatenated together to form a property tree path. The arguments must be strings, but in FlightGear v3.2 onwards, there also is support (added by {{flightgear commit|34ed79}}) for numeric arguments as indices. See example 2 below.&lt;br /&gt;
|param2 = value&lt;br /&gt;
|param2text = Value to write to the given property. Must be either a string or a number.&lt;br /&gt;
|example1 = setprop(&amp;quot;/sim/demo&amp;quot;, &amp;quot;This is a demo&amp;quot;);&lt;br /&gt;
|example2text = Note that the example below will only work in FlightGear 3.2 and above.&lt;br /&gt;
|example2 = for(var i = 0; i &amp;lt; 3; i += 1){&lt;br /&gt;
    setprop(&amp;quot;/sim/demo&amp;quot;, i, &amp;quot;Demo #&amp;quot; ~ i));&lt;br /&gt;
}&lt;br /&gt;
|example3text = Same as above, but is supported by all versions of FlightGear.&lt;br /&gt;
|example3 = for(var i = 0; i &amp;lt; 3; i += 1){&lt;br /&gt;
    setprop(&amp;quot;/sim/demo[&amp;quot; ~ i ~ &amp;quot;]&amp;quot;, &amp;quot;Demo #&amp;quot; ~ i));&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
====See also====&lt;br /&gt;
{{note| If you have to read/write the same property multiple times (e.g. in an update loop), it is more efficient to use a node object: &lt;br /&gt;
To get a Node rather than its value, use &amp;lt;code&amp;gt;props.globals.getNode()&amp;lt;/code&amp;gt; - see [[Nasal_library/props]]. }}&lt;br /&gt;
&lt;br /&gt;
===settimer() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = settimer(function, delta[, realtime]);&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=499|t=Part 1}} {{!}} {{flightgear file|src/Scripting/NasalSys.cxx|l=1286|t=Part 2}}&lt;br /&gt;
|text = Runs the given function a specified amount of seconds after the current time. Returns &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{note|Improper use of &amp;lt;code&amp;gt;settimer()&amp;lt;/code&amp;gt; may cause resource leaks. It is also highly recommended that the newer {{func link|maketimer()}} should be used instead of this function.}} &lt;br /&gt;
|param1 = function&lt;br /&gt;
|param1text = Mandatory function that will be called. It may be necessary to enclose code in an anonymous function (see example).&lt;br /&gt;
|param2 = delta&lt;br /&gt;
|param2text = Mandatory amount of time in seconds after which the function will be called.&lt;br /&gt;
|param3 = realtime&lt;br /&gt;
|param3text = If 1 (true), &amp;quot;real time&amp;quot; will be used instead of &amp;quot;simulation time.&amp;quot; Defaults to 0 (false). Note that if &amp;quot;simulation time&amp;quot; is used, the timer will not run while FlightGear is paused.&lt;br /&gt;
|example1 = var myFunc = func(){&lt;br /&gt;
    print(&amp;quot;Hello&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
settimer(myFunc, 2); # runs myFunc after 2 seconds&lt;br /&gt;
|example2 = var sqr = func(a){&lt;br /&gt;
    return a * a;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
settimer(func(){&lt;br /&gt;
    print(sqr(2)); # will print 4 after 2 seconds&lt;br /&gt;
}, 2);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===srand() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = srand();&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=559|t=Source}}&lt;br /&gt;
|text = Makes the pseudorandom number generator (see {{func link|rand()}}) generate a new {{wikipedia|random seed|noicon=1}} based on time. Returns 0.&lt;br /&gt;
}}&lt;br /&gt;
===systime()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = systime();&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=770|t=Source}}&lt;br /&gt;
|text = Returns the {{wikipedia|Unix time}} (seconds since since 00:00:00 UTC, 1/1/1970) as a floating point number with high resolution. This function is useful for benchmarking purposes (see example 2).&lt;br /&gt;
{{note|1=High resolution timers under Windows can produce inaccurate or fixed sub-millisecond results.&amp;lt;ref&amp;gt;{{cite web|url=http://forum.flightgear.org/viewtopic.php?f=30&amp;amp;t=29259|title=Nasal: systime() ??!?|author=Necolatis|date=Apr 2nd, 2016}}&amp;lt;/ref&amp;gt; This is due to the underlying {{func link|GetSystemTimeAsFileTime()|link=https://msdn.microsoft.com/en-us/library/windows/desktop/ms724397(v=vs.85).aspx}} API call, which depends on hardware availability of suitable high resolution timers. See also [https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408(v=vs.85).aspx Acquiring high-resolution time stamps]}}&lt;br /&gt;
|example1 = print(&amp;quot;Unix time: &amp;quot;, systime()); # prints Unix time&lt;br /&gt;
|example2 = var myFunc = func(){&lt;br /&gt;
    for(var i = 0; i &amp;lt;= 10; i += 1){&lt;br /&gt;
        print(&amp;quot;Interation #&amp;quot;, i);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
var t = systime(); # record time&lt;br /&gt;
myFunc(); # run function&lt;br /&gt;
var t2 = systime(); # record new time&lt;br /&gt;
print(&amp;quot;myFunc() took &amp;quot;, t2 - t, &amp;quot; seconds&amp;quot;); # print result&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===thisfunc()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = thisfunc();&lt;br /&gt;
|source = {{fgdata file|Nasal/globals.nas|t=Source}}&lt;br /&gt;
|text = Returns the function from which this function is called. This allows a function to reliably and safely call itself from within a closure.&lt;br /&gt;
|example1 = var stringify_vec = func(input){&lt;br /&gt;
    if (typeof(input) == &amp;quot;scalar&amp;quot;){&lt;br /&gt;
        return sprintf(&amp;quot;%s&amp;quot;, input);&lt;br /&gt;
    } elsif (typeof(input) == &amp;quot;vector&amp;quot;) {&lt;br /&gt;
        if (size(input) == 0) return &amp;quot;[]&amp;quot;;&lt;br /&gt;
        var this = thisfunc();&lt;br /&gt;
        var buffer = &amp;quot;[&amp;quot;;&lt;br /&gt;
        for(var i = 0; i &amp;lt; size(input); i += 1){&lt;br /&gt;
            buffer ~= this(input[i]);&lt;br /&gt;
            if (i == size(input) - 1) {&lt;br /&gt;
                buffer ~= &amp;quot;]&amp;quot;;&lt;br /&gt;
            } else {&lt;br /&gt;
                buffer ~= &amp;quot;, &amp;quot;;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        return buffer;&lt;br /&gt;
    } else {&lt;br /&gt;
        die(&amp;quot;stringify_vec(): Error! Invalid input. Must be a vector or scalar&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
var test_vec = [&amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;, 1, 2, 3];&lt;br /&gt;
debug.dump(stringify_vec(test_vec)); # prints &amp;quot;[a, b, c, 1, 2, 3]&amp;quot;&lt;br /&gt;
test_vec = [];&lt;br /&gt;
debug.dump(stringify_vec(test_vec)); # prints &amp;quot;[]&amp;quot;&lt;br /&gt;
test_vec = {};&lt;br /&gt;
debug.dump(stringify_vec(test_vec)); # will throw an error&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===tileIndex() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = tileIndex();&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1720|t=Source}}&lt;br /&gt;
|text = Returns the index of the tile at the aircraft's current position as a string. This corresponds to the name of the STG file of the tile. For example, at [[KSFO]], this would be &amp;lt;code&amp;gt;942050&amp;lt;/code&amp;gt;, corresponding to &amp;lt;tt&amp;gt;''[[$FG_SCENERY]]/Terrain/w130n30/w123n3/942050.stg''&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|example1 = print(tileIndex()); # print index&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== tilePath()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = tilePath();&lt;br /&gt;
|source = {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1712|t=Source}}&lt;br /&gt;
|text = Returns the base path of the tile at the aircraft's current position as a string. For example, at KSFO, this would be &amp;lt;code&amp;gt;w130n30/w123n3&amp;lt;/code&amp;gt;, corresponding to &amp;lt;tt&amp;gt;''[[$FG_SCENERY]]/Terrain/w130n30/w123n3''&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|example1 = print(tilePath()); # print path&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== values()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = values(hash);&lt;br /&gt;
|source = {{fgdata file|Nasal/globals.nas|t=Source}}&lt;br /&gt;
|text = Returns a vector containing the values of the given hash.&lt;br /&gt;
|param1 = hash&lt;br /&gt;
|param1text = Mandatory hash to get the values of.&lt;br /&gt;
|example1 = var hash = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: 2,&lt;br /&gt;
    &amp;quot;c&amp;quot;: 3&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
foreach(var val; values(hash)){&lt;br /&gt;
    print(val);&lt;br /&gt;
}&lt;br /&gt;
|example2text = The below example does exactly the same thing as the above example, but does not use &amp;lt;code&amp;gt;values()&amp;lt;/code&amp;gt;:&lt;br /&gt;
|example2 = var hash = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: 2,&lt;br /&gt;
    &amp;quot;c&amp;quot;: 3&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
foreach(var key; keys(hash)){&lt;br /&gt;
    print(hash[key]);&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Extension functions new in FG 2020.1 ==&lt;br /&gt;
The following functions have been added to the nasal core library and will be released with FlightGear version 2020.1. &lt;br /&gt;
Before the release they are available in the development branch &amp;quot;next&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===isfunc()===&lt;br /&gt;
Returns 1 if type or argument is a function, otherwise 0.&lt;br /&gt;
&lt;br /&gt;
===isghost()===&lt;br /&gt;
Returns 1 if type or argument is a ghost, otherwise 0.&lt;br /&gt;
&lt;br /&gt;
=== ishash()===&lt;br /&gt;
Returns 1 if type or argument is a hash, otherwise 0.&lt;br /&gt;
&lt;br /&gt;
===isint()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = isint(x);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|t=Source}}&lt;br /&gt;
|text = Returns 1 if argument has a numeric value and x == floor(x), e.g. integer.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===isnum()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = isnum(x);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|t=Source}}&lt;br /&gt;
|text = Returns 1 if typeof(x) is &amp;quot;scalar&amp;quot; and x has a numeric value otherwise 0. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===isscalar()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = isscalar(x);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|t=Source}}&lt;br /&gt;
|text = Returns 1 if type or argument is a scalar (string or numeric), otherwise (vector, hash, func, ...) it returns 0. This is useful to check if a variable can be converted to string e.g. when useing the string concat operator &amp;quot;~&amp;quot;. &lt;br /&gt;
|example1 = var a = &amp;quot;foo&amp;quot;; &lt;br /&gt;
var b=42;&lt;br /&gt;
if (isscalar(a) and isscalar(b)) print(a~b);&lt;br /&gt;
if (isstr(a)) print(&amp;quot;a is a string&amp;quot;);&lt;br /&gt;
if (isint(b)) print(&amp;quot;b is an integer&amp;quot;);&lt;br /&gt;
# if (isscalar(a))... is equivalent to if (typeof(a) == &amp;quot;scalar&amp;quot;)...&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===isstr()===&lt;br /&gt;
Returns 1 if type or argument is a string, otherwise 0. &lt;br /&gt;
&lt;br /&gt;
===isvec()===&lt;br /&gt;
Returns 1 if type or argument is a vector, otherwise 0.&lt;br /&gt;
&lt;br /&gt;
===vecindex()===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = vecindex(vector, value);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/lib.c|t=Source}}&lt;br /&gt;
|text = Returns the index of value or nil, if value is not found in vector.&lt;br /&gt;
|example1=&lt;br /&gt;
var myvector = [&amp;quot;apple&amp;quot;, &amp;quot;bananna&amp;quot;, &amp;quot;coconut&amp;quot;];&lt;br /&gt;
# to check if a vector contains a certain value compare vecindex to nil&lt;br /&gt;
if (vecindex(myvector, &amp;quot;apple&amp;quot;) != nil) {&lt;br /&gt;
    print(&amp;quot;found apple&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
# WARNING: this will not work as desired because index is 0&lt;br /&gt;
if (vecindex(myvector, &amp;quot;apple&amp;quot;)) {&lt;br /&gt;
    print(&amp;quot;found apple&amp;quot;);&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
Various global constants (technically variables) are provided for use in converting between different units. They are all found in {{fgdata file|Nasal/globals.nas|text=$FG_ROOT/Nasal/globals.nas}}.&lt;br /&gt;
&lt;br /&gt;
===D2R===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = var radians = degrees * D2R;&lt;br /&gt;
|text = Converts an angle from degrees to radians when multiplied by the angle in degrees. Equal to &amp;lt;code&amp;gt;π / 180&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
===FPS2KT===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = var knots = feet_per_second * FPS2KT;&lt;br /&gt;
|text = Converts a velocity from feet per second to knots when multiplied by the velocity in feet per second. Approximately equal to 0.5925.&lt;br /&gt;
}}&lt;br /&gt;
===FT2M===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = var metres = feet * FT2M;&lt;br /&gt;
|text = Converts a length from feet to metres when multiplied by the length in feet. Equal to 0.3048.&lt;br /&gt;
}}&lt;br /&gt;
===GAL2L ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = var litres = gallons * GAL2L;&lt;br /&gt;
|text = Converts a volume from US liquid gallons to litres when multiplied by the volume in gallons. Approximately equal to 3.7854.&lt;br /&gt;
}}&lt;br /&gt;
===IN2M===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = var metres = inches * IN2M;&lt;br /&gt;
|text = Converts a length from inches to metres when multiplied by the length in inches. Equal to 0.0254.&lt;br /&gt;
}}&lt;br /&gt;
===KG2LB===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = var pounds = kilograms * KG2LB;&lt;br /&gt;
|text = Converts a mass from kilograms to pounds when multiplied by the mass in kilograms. Approximately equal to 2.2046.&lt;br /&gt;
}}&lt;br /&gt;
===KT2FPS===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = var feet_per_second = knots * KT2FPS;&lt;br /&gt;
|text = Converts a velocity from knots to feet per second when multiplied by the velocity in knots. Approximately equal to 1.6878.&lt;br /&gt;
}}&lt;br /&gt;
===KT2MPS===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = var metres_per_second = knots * KT2MPS;&lt;br /&gt;
|text = Converts a velocity from knots to metres per second when multiplied by the velocity in knots. Approximately equal to 0.5144.&lt;br /&gt;
}}&lt;br /&gt;
===L2GAL===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = var gallons = litres * L2GAL;&lt;br /&gt;
|text = Converts a volume from litres to US liquid gallons when multiplied by the volume in litres. Approximately equal to 0.2642.&lt;br /&gt;
}}&lt;br /&gt;
===LB2KG===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = var kilograms = pounds * LB2KG;&lt;br /&gt;
|text = Converts a mass from pounds to kilograms when multiplied by the mass in pounds. Approximately equal to 0.4536.&lt;br /&gt;
}}&lt;br /&gt;
===M2FT ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = var feet = metres * M2FT;&lt;br /&gt;
|text = Converts a length from metres to feet when multiplied by the length in metres. Approximately equal to 3.2808.&lt;br /&gt;
}}&lt;br /&gt;
===M2IN===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = var inches = metres * M2IN;&lt;br /&gt;
|text = Converts a length from metres to inches when multiplied by the length in metres. Approximately equal to 39.3701.&lt;br /&gt;
}}&lt;br /&gt;
===M2NM ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = var nautical_miles = metres * M2NM;&lt;br /&gt;
|text = Converts a length from metres to nautical miles when multiplied by the length in metres. Approximately equal to 0.00054.&lt;br /&gt;
}}&lt;br /&gt;
===MPS2KT ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = var knots = metres_per_second * MPS2KT;&lt;br /&gt;
|text = Converts a velocity from metres per second to knots when multiplied by the velocity in metres per second. Approximately equal to 1.9438.&lt;br /&gt;
}}&lt;br /&gt;
===NM2M ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = var metres = nautical_miles * NM2M;&lt;br /&gt;
|text = Converts a length from nautical miles to metres when multiplied by the length in nautical miles. Equal to 1,852.&lt;br /&gt;
}}&lt;br /&gt;
===R2D===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = var degrees = radians * R2D;&lt;br /&gt;
|text = Converts an angle from radians to degrees when multiplied by the angle in radians. Equal to &amp;lt;code&amp;gt;180 / π&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Appendix}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Nasal namespaces}}&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=140020</id>
		<title>Aircraft properties reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=140020"/>
		<updated>2024-06-30T13:05:40Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Annunciators [draft] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PropertyTree}}&lt;br /&gt;
&lt;br /&gt;
This is a generic '''aircraft properties reference'''.  There are many properties that are very common in aircraft, and many of them are present even in a very simple aircraft.  However, a complete description that matches all the properties is very unlikely to be written, as aircraft can be very different from each other.&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|2}}&lt;br /&gt;
&lt;br /&gt;
== What are properties? ==&lt;br /&gt;
{{main article|Property tree}}&lt;br /&gt;
=== The property tree ===&lt;br /&gt;
Most parts of FlightGear communicate with each other through key-value pair properties in the [[property tree]].  The properties represent both the input from the pilot, the values determining the position and velocity of the aircraft, the values used for animating the aircraft, and pretty much anything else.&lt;br /&gt;
&lt;br /&gt;
While many properties will be common between most aircraft, many properties will also be different between aircraft.  This becomes obvious if one consider the many different configurations (aircraft/helicopter/car, control surface and landing gear layout, number and locations of engines, etc) and propulsions systems (types of engines, types of fuels etc.) an aircraft can have.  There are also different flight dynamic models (FDMs) that have different needs.  In addition many properties will by necessity be aircraft specific, though developers should make a conscious effort to have properties map to more common ones if that is possible.&lt;br /&gt;
&lt;br /&gt;
=== Where are the properties defined? ===&lt;br /&gt;
There are a couple ways that the properties are set, but a fair amount of them just &amp;quot;appear&amp;quot; without being documented anywhere.  There are several places to look for properties.  One is in the aircraft files, starting from the aircraft specific [[aircraft-set.xml]] file, another is the [[Nasal]] files, and the last place (and often most useful!) is &amp;quot;grepping&amp;quot; (searching) through the C++ code.&lt;br /&gt;
&lt;br /&gt;
To determine how a property works and what it does often requires looking through any code that uses it.  This is a part of FlightGear that we could certainly document better&lt;br /&gt;
&lt;br /&gt;
== Annunciators [draft] ==&lt;br /&gt;
!! This section is work in progress !!&lt;br /&gt;
&lt;br /&gt;
The /instrumentation/annunciators section shall provide a central place for&lt;br /&gt;
&lt;br /&gt;
* aircrafts to write annunciator status data&lt;br /&gt;
* 3D aircraft models and external devices (like joysticks, yokes, throttle quadrants or custom made cockpit hardware) to read such data and drive status lights etc.&lt;br /&gt;
&lt;br /&gt;
Some of the props are automatically calculated by property rules in $FGDATA/Aircraft/Generic/generic-annunciators.xml other properties have to be calculated by the actual aircraft.&lt;br /&gt;
&lt;br /&gt;
The aircraft.nas module provides aircraft.light which allows easy implementation of blinking lights. Such lights have a bool property 'state' which tells if the light is on or off.&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/annunciators/doors&lt;br /&gt;
/instrumentation/annunciators/master-caution/state  # aircraft.light&lt;br /&gt;
/instrumentation/annunciators/master-warning/state  # aircraft.light&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/enabled&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/alt&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/apr&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/hdg&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/ias&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/nav&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/rev&lt;br /&gt;
/instrumentation/annunciators/autoflight/ap/mode/vs&lt;br /&gt;
/instrumentation/annunciators/autoflight/flightdirector/enabled&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/engines/&lt;br /&gt;
/instrumentation/annunciators/engines/apu/enabled&lt;br /&gt;
/instrumentation/annunciators/engines/apu/fire&lt;br /&gt;
# summary props, 'sum' of all engines&lt;br /&gt;
/instrumentation/annunciators/engines/fire&lt;br /&gt;
/instrumentation/annunciators/engines/oil-pressure-low&lt;br /&gt;
/instrumentation/annunciators/engines/starter&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# for &amp;lt;gear-name&amp;gt; in {nose, left, right}&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/down&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/in-transition&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/unsafe&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/up&lt;br /&gt;
# gear summary&lt;br /&gt;
/instrumentation/annunciators/gear/down&lt;br /&gt;
/instrumentation/annunciators/gear/in-transition&lt;br /&gt;
/instrumentation/annunciators/gear/unsafe&lt;br /&gt;
/instrumentation/annunciators/gear/up &lt;br /&gt;
/instrumentation/annunciators/gear/parking-brake&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/systems/anti-ice/enabled&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/aux-pump&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/system[]/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/system[]/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/vacuum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Consumables ==&lt;br /&gt;
:''See also [[#Fuel]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lb&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lbs&lt;br /&gt;
/consumables/fuel/tank[%d]/level-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/capacity-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/density-ppg&lt;br /&gt;
/consumables/fuel/total-fuel-lbs&lt;br /&gt;
/consumables/fuel/total-gal_us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Controls ==&lt;br /&gt;
These properties should, and usually do correspond to how various cockpit controls are set.  Consider these the pilot input.&lt;br /&gt;
&lt;br /&gt;
=== Anti-ice ===&lt;br /&gt;
These properties control the various anti-ice properties that may be present in an aircraft.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/anti-ice/wing-heat&lt;br /&gt;
/controls/anti-ice/pitot-heat&lt;br /&gt;
/controls/anti-ice/wiper&lt;br /&gt;
/controls/anti-ice/window-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/carb-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/inlet-heat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== APU ===&lt;br /&gt;
These properties control any auxiliary power unit, in essence a small turbine engine driving generators, hydraulic pumps etc. before and after the aircraft's engines are up an running.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/APU/off-start-run&lt;br /&gt;
/controls/APU/fire-switch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Armament ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/armament/master-arm&lt;br /&gt;
/controls/armament/station-select&lt;br /&gt;
/controls/armament/release-all&lt;br /&gt;
/controls/armament/station[%d]/stick-size&lt;br /&gt;
/controls/armament/station[%d]/release-stick&lt;br /&gt;
/controls/armament/station[%d]/release-all&lt;br /&gt;
/controls/armament/station[%d]/jettison-all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Autoflight ===&lt;br /&gt;
These properties control the autopilot on certain airplanes. For [[IT-AUTOFLIGHT]] based systems, see [[IT-AUTOFLIGHT#Interface_Reference|here]].&lt;br /&gt;
&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/autoflight/autopilot[%d]/engage&lt;br /&gt;
/controls/autoflight/autothrottle-arm&lt;br /&gt;
/controls/autoflight/autothrottle-engage&lt;br /&gt;
/controls/autoflight/heading-select&lt;br /&gt;
/controls/autoflight/altitude-select&lt;br /&gt;
/controls/autoflight/bank-angle-select&lt;br /&gt;
/controls/autoflight/vertical-speed-select&lt;br /&gt;
/controls/autoflight/speed-select&lt;br /&gt;
/controls/autoflight/mach-select&lt;br /&gt;
/controls/autoflight/vertical-mode&lt;br /&gt;
/controls/autoflight/lateral-mode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Electric ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/electric/battery-switch&lt;br /&gt;
/controls/electric/external-power&lt;br /&gt;
/controls/electric/APU-generator&lt;br /&gt;
/controls/electric/engine[%d]/generator&lt;br /&gt;
/controls/electric/engine[%d]/bus-tie&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Engines ===&lt;br /&gt;
Engines are numbered engine[0] for a single engine to engine[0] to engine[3] for a 747 for example. (The model allows for up to 12 engines rumour has it ;-)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/engines/throttle_idle&lt;br /&gt;
/controls/engines/engine[%d]/throttle&lt;br /&gt;
/controls/engines/engine[%d]/starter&lt;br /&gt;
/controls/engines/engine[%d]/fuel-pump&lt;br /&gt;
/controls/engines/engine[%d]/fire-switch&lt;br /&gt;
/controls/engines/engine[%d]/fire-bottle-discharge&lt;br /&gt;
/controls/engines/engine[%d]/cutoff&lt;br /&gt;
/controls/engines/engine[%d]/mixture&lt;br /&gt;
/controls/engines/engine[%d]/propeller-pitch&lt;br /&gt;
/controls/engines/engine[%d]/magnetos&lt;br /&gt;
/controls/engines/engine[%d]/boost&lt;br /&gt;
/controls/engines/engine[%d]/WEP&lt;br /&gt;
/controls/engines/engine[%d]/cowl-flaps-norm&lt;br /&gt;
/controls/engines/engine[%d]/feather&lt;br /&gt;
/controls/engines/engine[%d]/ignition&lt;br /&gt;
/controls/engines/engine[%d]/augmentation&lt;br /&gt;
/controls/engines/engine[%d]/afterburner&lt;br /&gt;
/controls/engines/engine[%d]/reverser&lt;br /&gt;
/controls/engines/engine[%d]/water-injection&lt;br /&gt;
/controls/engines/engine[%d]/condition&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Flight controls ===&lt;br /&gt;
These properties control the flight controls surfaces, though often through a mechanical, analog or digital flight control system (FCS) that may or may not be modeled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/flight/aileron&lt;br /&gt;
/controls/flight/aileron-trim&lt;br /&gt;
/controls/flight/elevator&lt;br /&gt;
/controls/flight/elevator-trim&lt;br /&gt;
/controls/flight/rudder&lt;br /&gt;
/controls/flight/rudder-trim&lt;br /&gt;
/controls/flight/flaps&lt;br /&gt;
/controls/flight/slats&lt;br /&gt;
/controls/flight/BLC			// Boundary Layer Control&lt;br /&gt;
/controls/flight/spoilers&lt;br /&gt;
/controls/flight/speedbrake&lt;br /&gt;
/controls/flight/wing-sweep&lt;br /&gt;
/controls/flight/wing-fold&lt;br /&gt;
/controls/flight/drag-chute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The positions of the controls are usually put in &amp;lt;code&amp;gt;/surface-positions/&amp;lt;/code&amp;gt; at the discretion of the aircraft designer. These usually drive the animations of the control surfaces. They are either normalized (like &amp;lt;code&amp;gt;/surface-positions/elevator-pos-norm&amp;lt;/code&amp;gt;) or in degrees, and sometimes the aileron is split left/right.&lt;br /&gt;
&lt;br /&gt;
=== Fuel ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/fuel/dump-valve&lt;br /&gt;
/controls/fuel/tank[%d]/fuel_selector&lt;br /&gt;
/controls/fuel/tank[%d]/to_engine&lt;br /&gt;
/controls/fuel/tank[%d]/to_tank&lt;br /&gt;
/controls/fuel/tank[%d]/boost-pump[%d]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Gear ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/gear/brake-left&lt;br /&gt;
/controls/gear/brake-right&lt;br /&gt;
/controls/gear/brake-parking&lt;br /&gt;
/controls/gear/steering // Used if rudder is not sufficient for control of steering&lt;br /&gt;
/controls/gear/gear-down&lt;br /&gt;
/controls/gear/antiskid // Deprecated?&lt;br /&gt;
/controls/gear/tailhook&lt;br /&gt;
/controls/gear/tailwheel-lock&lt;br /&gt;
/controls/gear/wheel[%d]/alternate-extension&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Hydraulics ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/hydraulic/system[%d]/engine-pump&lt;br /&gt;
/controls/hydraulic/system[%d]/electric-pump&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Lights ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/lighting/landing-lights&lt;br /&gt;
/controls/lighting/turn-off-lights&lt;br /&gt;
/controls/lighting/formation-lights&lt;br /&gt;
/controls/lighting/taxi-light&lt;br /&gt;
/controls/lighting/logo-lights&lt;br /&gt;
/controls/lighting/nav-lights&lt;br /&gt;
/controls/lighting/beacon&lt;br /&gt;
/controls/lighting/strobe&lt;br /&gt;
/controls/lighting/panel-norm&lt;br /&gt;
/controls/lighting/instruments-norm&lt;br /&gt;
/controls/lighting/dome-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pneumatic ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pneumatic/APU-bleed&lt;br /&gt;
/controls/pneumatic/engine[%d]/bleed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pressurization ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pressurization/mode&lt;br /&gt;
/controls/pressurization/dump&lt;br /&gt;
/controls/pressurization/outflow-valve&lt;br /&gt;
/controls/pressurization/pack[%d]/pack-on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Seat ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/seat/vertical-adjust&lt;br /&gt;
/controls/seat/fore-aft-adjust&lt;br /&gt;
/controls/seat/cmd_selector_valve&lt;br /&gt;
/controls/seat/eject[%d]/initiate&lt;br /&gt;
/controls/seat/eject[%d]/status&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Engines ==&lt;br /&gt;
Status of engines. See also: /controls/engines/ &lt;br /&gt;
=== Common ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/fuel-flow-gph&lt;br /&gt;
/engines/engine[%d]/fuel-flow_pph&lt;br /&gt;
/engines/engine[%d]/thrust_lb&lt;br /&gt;
/engines/engine[%d]/running&lt;br /&gt;
/engines/engine[%d]/starter&lt;br /&gt;
/engines/engine[%d]/cranking&lt;br /&gt;
/engines/engine[%d]/fire&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turbine ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/n1&lt;br /&gt;
/engines/engine[%d]/n2&lt;br /&gt;
/engines/engine[%d]/epr&lt;br /&gt;
/engines/engine[%d]/augmentation&lt;br /&gt;
/engines/engine[%d]/water-injection&lt;br /&gt;
/engines/engine[%d]/ignition&lt;br /&gt;
/engines/engine[%d]/nozzle-pos-norm&lt;br /&gt;
/engines/engine[%d]/inlet-pos-norm&lt;br /&gt;
/engines/engine[%d]/reversed&lt;br /&gt;
/engines/engine[%d]/cutoff&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Piston ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/mp-osi&lt;br /&gt;
/engines/engine[%d]/egt-degf&lt;br /&gt;
/engines/engine[%d]/oil-temperature-degf&lt;br /&gt;
/engines/engine[%d]/oil-pressure-psi&lt;br /&gt;
/engines/engine[%d]/cht-degf&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Propeller ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
/engines/engine[%d]/pitch&lt;br /&gt;
/engines/engine[%d]/torque&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Flight Dynamics Model ==&lt;br /&gt;
=== Position ===&lt;br /&gt;
This will return the current position of the aircraft within FlightGear. This is also the stuff that is transmitted in [[Howto:Multiplayer|multiplayer]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/position/&lt;br /&gt;
/position/altitiude-ft ()&lt;br /&gt;
/position/altitude-agl-ft (22.46983965)&lt;br /&gt;
/position/altitude-ft (28.24368289)&lt;br /&gt;
/position/ground-elev-ft (-0.43513529)&lt;br /&gt;
/position/ground-elev-m (-0.1326292364)&lt;br /&gt;
/position/latitude-deg (37.61371436)&lt;br /&gt;
/position/latitude-string (37*36 49.4N)&lt;br /&gt;
/position/longitude-deg (-122.3576508)&lt;br /&gt;
/position/longitude-string (-122*21 27.5W)&lt;br /&gt;
/position/sea-level-radius-ft (20899648.76)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Orientation ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/orientation/roll-deg&lt;br /&gt;
/orientation/pitch-deg&lt;br /&gt;
/orientation/heading-deg&lt;br /&gt;
&lt;br /&gt;
/orientation/roll-rate-degps&lt;br /&gt;
/orientation/pitch-rate-degps&lt;br /&gt;
/orientation/yaw-rate-degps&lt;br /&gt;
&lt;br /&gt;
/orientation/side-slip-rad&lt;br /&gt;
/orientation/side-slip-deg&lt;br /&gt;
/orientation/alpha-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Velocities ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/velocities/airspeed-kt&lt;br /&gt;
/velocities/mach&lt;br /&gt;
/velocities/speed-north-fps&lt;br /&gt;
/velocities/speed-east-fps&lt;br /&gt;
/velocities/speed-down-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/uBody-fps&lt;br /&gt;
/velocities/vBody-fps&lt;br /&gt;
/velocities/wBody-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/vertical-speed-fps&lt;br /&gt;
/velocities/glideslope&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Acceleration ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/accelerations/nlf&lt;br /&gt;
&lt;br /&gt;
/accelerations/ned/north-accel-fps_sec&lt;br /&gt;
/accelerations/ned/east-accel-fps_sec&lt;br /&gt;
/accelerations/ned/down-accel-fps_sec&lt;br /&gt;
&lt;br /&gt;
/accelerations/pilot/x-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/y-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/z-accel-fps_sec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Gear ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gear/serviceable&lt;br /&gt;
/gear/gear[%d]/cast-angle-deg // The angle of the wheel where 0 is pointing straight forward&lt;br /&gt;
/gear/gear[%d]/compression-m&lt;br /&gt;
/gear/gear[%d]/compression-norm&lt;br /&gt;
/gear/gear[%d]/ground-friction-factor&lt;br /&gt;
/gear/gear[%d]/ground-is-solid&lt;br /&gt;
/gear/gear[%d]/has-brake&lt;br /&gt;
/gear/gear[%d]/rollspeed-ms // Speed of the wheel's rotation in meters per second&lt;br /&gt;
/gear/gear[%d]/wow // Weight-on-wheel&lt;br /&gt;
/gear/gear[%d]/xoffset-in&lt;br /&gt;
/gear/gear[%d]/yoffset-in&lt;br /&gt;
/gear/gear[%d]/zoffset-in&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf[%d]/&lt;br /&gt;
/instrumentation/airspeed-indicator/&lt;br /&gt;
/instrumentation/altimeter/&lt;br /&gt;
/instrumentation/annunciator/&lt;br /&gt;
/instrumentation/attitude-indicator/&lt;br /&gt;
/instrumentation/clock/&lt;br /&gt;
/instrumentation/comm[%d]/&lt;br /&gt;
/instrumentation/dme/&lt;br /&gt;
/instrumentation/efis/&lt;br /&gt;
/instrumentation/encoder/&lt;br /&gt;
/instrumentation/flightdirector/&lt;br /&gt;
/instrumentation/gps/&lt;br /&gt;
/instrumentation/gps-annunciator/&lt;br /&gt;
/instrumentation/heading-indicator/&lt;br /&gt;
/instrumentation/heading-indicator-fg/&lt;br /&gt;
/instrumentation/magnetic-compass/&lt;br /&gt;
/instrumentation/marker-beacon/&lt;br /&gt;
/instrumentation/nav[%d]/&lt;br /&gt;
/instrumentation/radar/&lt;br /&gt;
/instrumentation/slip-skid-ball/&lt;br /&gt;
/instrumentation/tacan[%d]/&lt;br /&gt;
/instrumentation/transponder/&lt;br /&gt;
/instrumentation/turn-indicator/&lt;br /&gt;
/instrumentation/vertical-speed-indicator/&lt;br /&gt;
/instrumentation/wxradar/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation ADF ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf[%d]/adf-btn&lt;br /&gt;
/instrumentation/adf[%d]/bro-btn&lt;br /&gt;
/instrumentation/adf[%d]/display-mode&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/running&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/start-time&lt;br /&gt;
/instrumentation/adf[%d]/enroute-timer/time&lt;br /&gt;
/instrumentation/adf[%d]/error-deg&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/running&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/start-time&lt;br /&gt;
/instrumentation/adf[%d]/flight-timer/time&lt;br /&gt;
/instrumentation/adf[%d]/flt-btn&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/dial-1-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/dial-100-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/selected-khz&lt;br /&gt;
/instrumentation/adf[%d]/frequencies/standby-khz&lt;br /&gt;
/instrumentation/adf[%d]/frq-btn&lt;br /&gt;
/instrumentation/adf[%d]/ident&lt;br /&gt;
/instrumentation/adf[[%d]/ident-audible&lt;br /&gt;
/instrumentation/adf[%d]/in-range&lt;br /&gt;
/instrumentation/adf[%d]/indicated-bearing-deg&lt;br /&gt;
/instrumentation/adf[%d]/mode&lt;br /&gt;
/instrumentation/adf[%d]/model&lt;br /&gt;
/instrumentation/adf[%d]/operable&lt;br /&gt;
/instrumentation/adf[%d]/power-btn&lt;br /&gt;
/instrumentation/adf[%d]/right-display&lt;br /&gt;
/instrumentation/adf[%d]/rotation-deg&lt;br /&gt;
/instrumentation/adf[%d]/serviceable&lt;br /&gt;
/instrumentation/adf[%d]/set-btn&lt;br /&gt;
/instrumentation/adf[%d]/volume&lt;br /&gt;
/instrumentation/adf[%d]/volume-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation comm radio ===&lt;br /&gt;
See [[Aircraft_properties_reference/Instrumentation/COMM]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation NAV radio ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/nav[%d]/audio-btn&lt;br /&gt;
/instrumentation/nav[%d]/back-course-btn&lt;br /&gt;
/instrumentation/nav[%d]/cdi/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/crosstrack-error-m&lt;br /&gt;
/instrumentation/nav[%d]/crosstrack-heading-error-deg&lt;br /&gt;
/instrumentation/nav[%d]/data-is-valid&lt;br /&gt;
/instrumentation/nav[%d]/dme-in-range&lt;br /&gt;
/instrumentation/nav[%d]/filtered-cdiNAV0-deflection&lt;br /&gt;
/instrumentation/nav[%d]/filtered-gsNAV0-deflection&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/dial-khz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/dial-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/is-localizer-frequency&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/selected-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/selected-mhz-fmt&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/standby-mhz&lt;br /&gt;
/instrumentation/nav[%d]/frequencies/standby-mhz-fmt&lt;br /&gt;
/instrumentation/nav[%d]/from-flag&lt;br /&gt;
/instrumentation/nav[%d]/frq-swap-btn&lt;br /&gt;
/instrumentation/nav[%d]/gs/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/gs-direct-deg&lt;br /&gt;
/instrumentation/nav[%d]/gs-distance&lt;br /&gt;
/instrumentation/nav[%d]/gs-in-range&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection-deg&lt;br /&gt;
/instrumentation/nav[%d]/gs-needle-deflection-norm&lt;br /&gt;
/instrumentation/nav[%d]/gs-rate-of-climb&lt;br /&gt;
/instrumentation/nav[%d]/gs-rate-of-climb-fpm&lt;br /&gt;
/instrumentation/nav[%d]/has-gs&lt;br /&gt;
/instrumentation/nav[%d]/heading-deg&lt;br /&gt;
/instrumentation/nav[%d]/heading-needle-deflection&lt;br /&gt;
/instrumentation/nav[%d]/heading-needle-deflection-norm&lt;br /&gt;
/instrumentation/nav[%d]/ident&lt;br /&gt;
/instrumentation/nav[%d]/ident-audible&lt;br /&gt;
/instrumentation/nav[%d]/in-range&lt;br /&gt;
/instrumentation/nav[%d]/nav-distance&lt;br /&gt;
/instrumentation/nav[%d]/nav-id&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc1&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc2&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc3&lt;br /&gt;
/instrumentation/nav[%d]/nav-id_asc4&lt;br /&gt;
/instrumentation/nav[%d]/nav-loc&lt;br /&gt;
/instrumentation/nav[%d]/operable&lt;br /&gt;
/instrumentation/nav[%d]/power-btn&lt;br /&gt;
/instrumentation/nav[%d]/radials/actual-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/reciprocal-radial-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/selected-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/target-auto-hdg-deg&lt;br /&gt;
/instrumentation/nav[%d]/radials/arget-radial-deg&lt;br /&gt;
/instrumentation/nav[%d]/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/signal-quality-norm&lt;br /&gt;
/instrumentation/nav[%d]/slaved-to-gps&lt;br /&gt;
/instrumentation/nav[%d]/time-to-intercept-sec&lt;br /&gt;
/instrumentation/nav[%d]/to-flag&lt;br /&gt;
/instrumentation/nav[%d]/to-from/serviceable&lt;br /&gt;
/instrumentation/nav[%d]/volume&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Instrumentation Tacan ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/tacan[%d]/display/channel&lt;br /&gt;
/instrumentation/tacan[%d]/display/x-shift&lt;br /&gt;
/instrumentation/tacan[%d]/display/y-shift&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[1]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[2]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[3]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-channel[4]&lt;br /&gt;
/instrumentation/tacan[%d]/frequencies/selected-mhz&lt;br /&gt;
/instrumentation/tacan[%d]/ident&lt;br /&gt;
/instrumentation/tacan[%d]/in-range&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-bearing-true-deg&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-distance-nm&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-ground-speed-kt&lt;br /&gt;
/instrumentation/tacan[%d]/indicated-time-min&lt;br /&gt;
/instrumentation/tacan[%d]/name&lt;br /&gt;
/instrumentation/tacan[%d]/serviceable&lt;br /&gt;
/instrumentation/tacan[%d]/switch-position&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rotors (YASim only) ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/rotors/gear/torque-sound-filtered // Unused?&lt;br /&gt;
/rotors/gear/total-torque&lt;br /&gt;
/rotors/{name}/balance&lt;br /&gt;
/rotors/{name}/blade[%d]/flap-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/incidence-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/position-deg // Position relative to model&lt;br /&gt;
/rotors/{name}/bladesvisible // Used for animations&lt;br /&gt;
/rotors/{name}/cone%d-deg //e.g. cone-deg or cone2-deg&lt;br /&gt;
/rotors/{name}/roll-deg&lt;br /&gt;
/rotors/{name}/rpm&lt;br /&gt;
/rotors/{name}/stall&lt;br /&gt;
/rotors/{name}/stall-filtered&lt;br /&gt;
/rotors/{name}/tilt&lt;br /&gt;
/rotors/{name}/torque&lt;br /&gt;
/rotors/{name}/yaw-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For how to animate rotors using these properties, see [[Howto:Animate helicopters]].&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Aircraft-set.xml]]&lt;br /&gt;
* [[Multiplayer protocol]]&lt;br /&gt;
* [[Property browser]]&lt;br /&gt;
* [[PropertyList XML files]]&lt;br /&gt;
* [[Property tree]]&lt;br /&gt;
&lt;br /&gt;
=== Readme files ===&lt;br /&gt;
* {{readme file|properties}}&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
==== Consumables ====&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.hxx}}&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Flight Dynamics Model ====&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Instrumentation ====&lt;br /&gt;
* {{flightgear file|src/Instrumentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Property Tree]]&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Property_browser&amp;diff=139778</id>
		<title>Property browser</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Property_browser&amp;diff=139778"/>
		<updated>2024-04-23T09:56:07Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Add availability note for new prop browser features&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Property_Browser.jpg|thumb|270px|The property browser window]]&lt;br /&gt;
{{PropertyTree}}&lt;br /&gt;
&lt;br /&gt;
The [[FlightGear]] '''property browser''' is a dialog used to browse, in-simulator, through all properties. Properties are internal, runtime state variables in FlightGear. The property browser cannot only be used to inspect all sorts of internal variables at runtime, but it can also be used to change the values of most properties easily (some being conceputally read-only, i.e. because they're exclusively written-to by a certain subsystem such as the FDM). For instance, you cannot change your frame rate by changing the frame counter obviously. &lt;br /&gt;
&lt;br /&gt;
== Opening the property browser ==&lt;br /&gt;
The property browser can be opened while FlightGear is running either:&lt;br /&gt;
* By pressing the {{key press|/}} key (forward slash)&lt;br /&gt;
* Through the main [[menubar|menu]]: &amp;lt;tt&amp;gt;Debug &amp;gt; Browse Internal Properties&amp;lt;/tt&amp;gt; (in older version: &amp;lt;tt&amp;gt;File &amp;gt; Browse Internal Properties&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Browse around to see the different data fields that are available. Just about everything interesting/useful is published in the property system. The browser allows you to inspect and even change values in the live running copy of FG.&lt;br /&gt;
&lt;br /&gt;
=== Property Key Handler ===&lt;br /&gt;
&lt;br /&gt;
The property key handler provides a better experience for developers when using the property tree and is suited to keyboard operations. See [[Property Key Handler]] for more information.&lt;br /&gt;
&lt;br /&gt;
== Tied properties ==&lt;br /&gt;
{{Note|The origin of tied properties was largely to address&lt;br /&gt;
&amp;quot;hypothetical&amp;quot; performance concerns in the early days.  Coders could&lt;br /&gt;
continue to use native compiled variables and simultaneously expose them to&lt;br /&gt;
the property system.  Early property system skepticism included issues like&lt;br /&gt;
performance and use of global structures.  Those have largely not proven&lt;br /&gt;
out to be actual issues.  So without looking deep into how much&lt;br /&gt;
effort/change/impact this would require, I think for the most part the&lt;br /&gt;
whole tied property aspect of the api could go away and the property system&lt;br /&gt;
api would simplify quite a bit.&amp;lt;ref&amp;gt;https://sourceforge.net/p/flightgear/mailman/message/37280934/&amp;lt;/ref&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
Some properties are so called ''tied'' properties which are directly mapped to internal C++ variables and they cannot be modified using the property browser, we are currently trying to get rid of tied properties, see [[Howto:Use_Property_Tree_Objects]] for details.&lt;br /&gt;
&lt;br /&gt;
In addition, even some non-tied properties cannot be modified because they are by default constantly written/modified by another subsystem (in C++/Nasal space), possibly updating properties at frame rate, this applies for example to the frame rate counter, which is constantly updated by C++ code - so trying to set it from Nasal would be kind of pointless.&lt;br /&gt;
&lt;br /&gt;
Also certain properties are only read/applied during initialization/re-initialization (startup/reset) of the sim, while others require the corresponding subsystems to be reinitialized.&lt;br /&gt;
&lt;br /&gt;
== Tips and tricks ==&lt;br /&gt;
Apart from setting a property by clicking it and using the text field and Set button, there is many things that can be done through the property browser:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Mouse click while holding on keyboard  &lt;br /&gt;
!Function&lt;br /&gt;
!Comment&lt;br /&gt;
|-&lt;br /&gt;
|ctrl&lt;br /&gt;
|on '.' toggle verbose mode&lt;br /&gt;
on '..' goto root&lt;br /&gt;
on any bool property: toggle true/false value&lt;br /&gt;
|Verbose mode is explained below&lt;br /&gt;
|-&lt;br /&gt;
|shift&lt;br /&gt;
|on '.' dump properties to console&lt;br /&gt;
display property in top left corner of the flightgear screen&lt;br /&gt;
|To ''remove the property'' ctrl-shift-click another property&lt;br /&gt;
|-&lt;br /&gt;
|alt&lt;br /&gt;
|toggle trace_write attribute of the selected property&lt;br /&gt;
|Since 04/2024 on 'next'; details below in 'verbose mode'&lt;br /&gt;
|-&lt;br /&gt;
|ctrl+alt&lt;br /&gt;
|toggle trace_read attribute of the selected property&lt;br /&gt;
|Since 04/2024 on 'next'; details below in 'verbose mode'&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Verbose mode ==&lt;br /&gt;
In verbose mode, toggled by ctrl-clicking an &amp;quot;&amp;lt;tt&amp;gt;.&amp;lt;/tt&amp;gt;&amp;quot; entry or toggling &amp;lt;code&amp;gt;/sim/gui/dialogs/property-browser/show-flags&amp;lt;/code&amp;gt;, some additional information is shown as flags like this&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;foo = '123.456' (double; AT)&amp;lt;/code&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
! Flag&lt;br /&gt;
! Meaning&lt;br /&gt;
! Comment&lt;br /&gt;
|-&lt;br /&gt;
| r || Read protected || Showing that a property can not be read.&lt;br /&gt;
|-&lt;br /&gt;
| w || Write protected || Showing that a property can not be written to.&lt;br /&gt;
|-&lt;br /&gt;
| R || Trace read operations || rowspan=&amp;quot;2&amp;quot; | In &amp;lt;code&amp;gt;--log-level=info&amp;lt;/code&amp;gt; create log line with TRACE prefix on write/read operation; set with &amp;lt;code&amp;gt;&amp;lt;foo trace-write=&amp;quot;y&amp;quot;&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
Since 04/2024 on next R and W flag can be set on the fly via the property browser (see above)&lt;br /&gt;
|-&lt;br /&gt;
| W || Trace write operations&lt;br /&gt;
|-&lt;br /&gt;
| A || Archive bit set || Makes writeProperties() also save this property in restricted mode (&amp;quot;save flight&amp;quot;), while all others are only saved in full mode.&lt;br /&gt;
|-&lt;br /&gt;
| U || User archive bit set || Saved into ~/.fgfs/autosave.xml, and restored next time. &amp;lt;!-- When FlightGear starts? --&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| T || Tied property || Only the C/C++ code that owns a tied property can write to it. Also, listeners will not be triggered.&lt;br /&gt;
|-&lt;br /&gt;
| L&amp;lt;N&amp;gt; || Number of listeners&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|=&amp;gt; &amp;lt;path&amp;gt;&lt;br /&gt;
|Alias target&lt;br /&gt;
|This prop is an alias for &amp;lt;path&amp;gt; (since 04/2024 on 'next')&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= &amp;lt;pre&amp;gt;props.globals.getNode(&amp;quot;/sim/aircraft&amp;quot;).getAttribute(&amp;quot;references&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
does now return the reference counter -- the number of co-owners&lt;br /&gt;
of the shared pointer. This is really only useful for debugging.&lt;br /&gt;
And here's again a summary of all the attribute names:&lt;br /&gt;
&lt;br /&gt;
 children    ... returns number of children (faster than size(n.getChildren()!)&lt;br /&gt;
 listeners   ... return number of attached listeners&lt;br /&gt;
 references  ... returns number of co-owners (+ 2 for own consumption)&lt;br /&gt;
 tied        ... returns whether a node is &amp;quot;tied&amp;quot; (in which case listeners&lt;br /&gt;
                 might not get triggered)&lt;br /&gt;
 alias       ... whether the node is an alias to another node&lt;br /&gt;
 read        ... whether the node is read-protected&lt;br /&gt;
 write       ... whether the node is write-protected&lt;br /&gt;
 archive     ... whether the &amp;quot;archive&amp;quot; flag is set, which makes the&lt;br /&gt;
                 node saved with &amp;quot;Save Flight&amp;quot; in the menu&lt;br /&gt;
 trace-read  ... whether the node is being traced for read operations&lt;br /&gt;
 trace-write ... whether the node is being traced for write operations&lt;br /&gt;
 userarchive ... whether the node will be saved to ~/.fgfs/autosave.xml&lt;br /&gt;
                 on exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/15645291/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] FlightGear/Plib periodic stutter notes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Melchior FRANZ&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Oct 21st, 2007&lt;br /&gt;
  | added   = Oct 21st, 2007&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Other ways to open the property browser ==&lt;br /&gt;
=== Forcing open the browser on startup ===&lt;br /&gt;
You can force the browser to open on startup, through the following command:&lt;br /&gt;
 --prop:browser=/sim/path/that/you/want/to/show&lt;br /&gt;
&lt;br /&gt;
More than one property browser can be opened like this.&lt;br /&gt;
 --prop:browser=position --prop:browser[1]=orientation&lt;br /&gt;
&lt;br /&gt;
=== Opening the property browser through nasal ===&lt;br /&gt;
Calling &amp;lt;code&amp;gt;gui.property_browser(&amp;lt;path&amp;gt;)&amp;lt;/code&amp;gt; opens a property browser for &amp;lt;path&amp;gt;.  While it can be called more than once, though all the dialogues will be drawn on top of each other in the centre of the screen. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
settimer(func {&lt;br /&gt;
    gui.property_browser(&amp;quot;/position&amp;quot;);&lt;br /&gt;
    gui.property_browser(&amp;quot;/orientation&amp;quot;);&lt;br /&gt;
}, 0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Displaying On-Screen property values through nasal ===&lt;br /&gt;
Create a file (let's call it display-props.nas) with instructions such below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
# On-screen displays&lt;br /&gt;
var enableOSD = func {&lt;br /&gt;
    var left  = screen.display.new(20, 10);&lt;br /&gt;
    var right = screen.display.new(-300, 10);&lt;br /&gt;
    &lt;br /&gt;
    left.add(&amp;quot;/orientation/heading-deg&amp;quot;);&lt;br /&gt;
    left.add(&amp;quot;/environment/wind-from-heading-deg&amp;quot;);&lt;br /&gt;
    left.add(&amp;quot;/environment/wind-speed-kt&amp;quot;);&lt;br /&gt;
    right.add(&amp;quot;/controls/flight/rudder&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
enableOSD();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the path/to/display-props.nas in your aircraft -set.xml,&lt;br /&gt;
&lt;br /&gt;
or in your $FG_HOME/ inside a Nasal/ folder.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Property Key Handler]]&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
* {{fgdata source|path=gui/dialogs/property-browser.xml}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Menubar]]&lt;br /&gt;
[[Category:Property Tree]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Property_browser&amp;diff=139777</id>
		<title>Property browser</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Property_browser&amp;diff=139777"/>
		<updated>2024-04-23T09:54:53Z</updated>

		<summary type="html">&lt;p&gt;Jsb: Update property browser /* Tips and tricks */  and /* Verbose mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Property_Browser.jpg|thumb|270px|The property browser window]]&lt;br /&gt;
{{PropertyTree}}&lt;br /&gt;
&lt;br /&gt;
The [[FlightGear]] '''property browser''' is a dialog used to browse, in-simulator, through all properties. Properties are internal, runtime state variables in FlightGear. The property browser cannot only be used to inspect all sorts of internal variables at runtime, but it can also be used to change the values of most properties easily (some being conceputally read-only, i.e. because they're exclusively written-to by a certain subsystem such as the FDM). For instance, you cannot change your frame rate by changing the frame counter obviously. &lt;br /&gt;
&lt;br /&gt;
== Opening the property browser ==&lt;br /&gt;
The property browser can be opened while FlightGear is running either:&lt;br /&gt;
* By pressing the {{key press|/}} key (forward slash)&lt;br /&gt;
* Through the main [[menubar|menu]]: &amp;lt;tt&amp;gt;Debug &amp;gt; Browse Internal Properties&amp;lt;/tt&amp;gt; (in older version: &amp;lt;tt&amp;gt;File &amp;gt; Browse Internal Properties&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Browse around to see the different data fields that are available. Just about everything interesting/useful is published in the property system. The browser allows you to inspect and even change values in the live running copy of FG.&lt;br /&gt;
&lt;br /&gt;
=== Property Key Handler ===&lt;br /&gt;
&lt;br /&gt;
The property key handler provides a better experience for developers when using the property tree and is suited to keyboard operations. See [[Property Key Handler]] for more information.&lt;br /&gt;
&lt;br /&gt;
== Tied properties ==&lt;br /&gt;
{{Note|The origin of tied properties was largely to address&lt;br /&gt;
&amp;quot;hypothetical&amp;quot; performance concerns in the early days.  Coders could&lt;br /&gt;
continue to use native compiled variables and simultaneously expose them to&lt;br /&gt;
the property system.  Early property system skepticism included issues like&lt;br /&gt;
performance and use of global structures.  Those have largely not proven&lt;br /&gt;
out to be actual issues.  So without looking deep into how much&lt;br /&gt;
effort/change/impact this would require, I think for the most part the&lt;br /&gt;
whole tied property aspect of the api could go away and the property system&lt;br /&gt;
api would simplify quite a bit.&amp;lt;ref&amp;gt;https://sourceforge.net/p/flightgear/mailman/message/37280934/&amp;lt;/ref&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
Some properties are so called ''tied'' properties which are directly mapped to internal C++ variables and they cannot be modified using the property browser, we are currently trying to get rid of tied properties, see [[Howto:Use_Property_Tree_Objects]] for details.&lt;br /&gt;
&lt;br /&gt;
In addition, even some non-tied properties cannot be modified because they are by default constantly written/modified by another subsystem (in C++/Nasal space), possibly updating properties at frame rate, this applies for example to the frame rate counter, which is constantly updated by C++ code - so trying to set it from Nasal would be kind of pointless.&lt;br /&gt;
&lt;br /&gt;
Also certain properties are only read/applied during initialization/re-initialization (startup/reset) of the sim, while others require the corresponding subsystems to be reinitialized.&lt;br /&gt;
&lt;br /&gt;
== Tips and tricks ==&lt;br /&gt;
Apart from setting a property by clicking it and using the text field and Set button, there is many things that can be done through the property browser:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Mouse click while holding on keyboard  &lt;br /&gt;
!Function&lt;br /&gt;
!Comment&lt;br /&gt;
|-&lt;br /&gt;
|ctrl&lt;br /&gt;
|on '.' toggle verbose mode&lt;br /&gt;
on '..' goto root&lt;br /&gt;
on any bool property: toggle true/false value&lt;br /&gt;
|Verbose mode is explained below&lt;br /&gt;
|-&lt;br /&gt;
|shift&lt;br /&gt;
|on '.' dump properties to console&lt;br /&gt;
display property in top left corner of the flightgear screen&lt;br /&gt;
|To ''remove the property'' ctrl-shift-click another property&lt;br /&gt;
|-&lt;br /&gt;
|alt&lt;br /&gt;
|toggle trace_write attribute of the selected property&lt;br /&gt;
|Since 04/2024 on next; details below in 'verbose mode'&lt;br /&gt;
|-&lt;br /&gt;
|ctrl+alt&lt;br /&gt;
|toggle trace_read attribute of the selected property&lt;br /&gt;
|Since 04/2024 on next; details below in 'verbose mode'&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Verbose mode ==&lt;br /&gt;
In verbose mode, toggled by ctrl-clicking an &amp;quot;&amp;lt;tt&amp;gt;.&amp;lt;/tt&amp;gt;&amp;quot; entry or toggling &amp;lt;code&amp;gt;/sim/gui/dialogs/property-browser/show-flags&amp;lt;/code&amp;gt;, some additional information is shown as flags like this&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;foo = '123.456' (double; AT)&amp;lt;/code&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
! Flag&lt;br /&gt;
! Meaning&lt;br /&gt;
! Comment&lt;br /&gt;
|-&lt;br /&gt;
| r || Read protected || Showing that a property can not be read.&lt;br /&gt;
|-&lt;br /&gt;
| w || Write protected || Showing that a property can not be written to.&lt;br /&gt;
|-&lt;br /&gt;
| R || Trace read operations || rowspan=&amp;quot;2&amp;quot; | In &amp;lt;code&amp;gt;--log-level=info&amp;lt;/code&amp;gt; create log line with TRACE prefix on write/read operation; set with &amp;lt;code&amp;gt;&amp;lt;foo trace-write=&amp;quot;y&amp;quot;&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
Since 04/2024 on next R and W flag can be set on the fly via the property browser (see above)&lt;br /&gt;
|-&lt;br /&gt;
| W || Trace write operations&lt;br /&gt;
|-&lt;br /&gt;
| A || Archive bit set || Makes writeProperties() also save this property in restricted mode (&amp;quot;save flight&amp;quot;), while all others are only saved in full mode.&lt;br /&gt;
|-&lt;br /&gt;
| U || User archive bit set || Saved into ~/.fgfs/autosave.xml, and restored next time. &amp;lt;!-- When FlightGear starts? --&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| T || Tied property || Only the C/C++ code that owns a tied property can write to it. Also, listeners will not be triggered.&lt;br /&gt;
|-&lt;br /&gt;
| L&amp;lt;N&amp;gt; || Number of listeners&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|=&amp;gt; &amp;lt;path&amp;gt;&lt;br /&gt;
|Alias target&lt;br /&gt;
|This prop is an alias for &amp;lt;path&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= &amp;lt;pre&amp;gt;props.globals.getNode(&amp;quot;/sim/aircraft&amp;quot;).getAttribute(&amp;quot;references&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
does now return the reference counter -- the number of co-owners&lt;br /&gt;
of the shared pointer. This is really only useful for debugging.&lt;br /&gt;
And here's again a summary of all the attribute names:&lt;br /&gt;
&lt;br /&gt;
 children    ... returns number of children (faster than size(n.getChildren()!)&lt;br /&gt;
 listeners   ... return number of attached listeners&lt;br /&gt;
 references  ... returns number of co-owners (+ 2 for own consumption)&lt;br /&gt;
 tied        ... returns whether a node is &amp;quot;tied&amp;quot; (in which case listeners&lt;br /&gt;
                 might not get triggered)&lt;br /&gt;
 alias       ... whether the node is an alias to another node&lt;br /&gt;
 read        ... whether the node is read-protected&lt;br /&gt;
 write       ... whether the node is write-protected&lt;br /&gt;
 archive     ... whether the &amp;quot;archive&amp;quot; flag is set, which makes the&lt;br /&gt;
                 node saved with &amp;quot;Save Flight&amp;quot; in the menu&lt;br /&gt;
 trace-read  ... whether the node is being traced for read operations&lt;br /&gt;
 trace-write ... whether the node is being traced for write operations&lt;br /&gt;
 userarchive ... whether the node will be saved to ~/.fgfs/autosave.xml&lt;br /&gt;
                 on exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/15645291/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] FlightGear/Plib periodic stutter notes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Melchior FRANZ&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Oct 21st, 2007&lt;br /&gt;
  | added   = Oct 21st, 2007&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Other ways to open the property browser ==&lt;br /&gt;
=== Forcing open the browser on startup ===&lt;br /&gt;
You can force the browser to open on startup, through the following command:&lt;br /&gt;
 --prop:browser=/sim/path/that/you/want/to/show&lt;br /&gt;
&lt;br /&gt;
More than one property browser can be opened like this.&lt;br /&gt;
 --prop:browser=position --prop:browser[1]=orientation&lt;br /&gt;
&lt;br /&gt;
=== Opening the property browser through nasal ===&lt;br /&gt;
Calling &amp;lt;code&amp;gt;gui.property_browser(&amp;lt;path&amp;gt;)&amp;lt;/code&amp;gt; opens a property browser for &amp;lt;path&amp;gt;.  While it can be called more than once, though all the dialogues will be drawn on top of each other in the centre of the screen. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
settimer(func {&lt;br /&gt;
    gui.property_browser(&amp;quot;/position&amp;quot;);&lt;br /&gt;
    gui.property_browser(&amp;quot;/orientation&amp;quot;);&lt;br /&gt;
}, 0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Displaying On-Screen property values through nasal ===&lt;br /&gt;
Create a file (let's call it display-props.nas) with instructions such below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
# On-screen displays&lt;br /&gt;
var enableOSD = func {&lt;br /&gt;
    var left  = screen.display.new(20, 10);&lt;br /&gt;
    var right = screen.display.new(-300, 10);&lt;br /&gt;
    &lt;br /&gt;
    left.add(&amp;quot;/orientation/heading-deg&amp;quot;);&lt;br /&gt;
    left.add(&amp;quot;/environment/wind-from-heading-deg&amp;quot;);&lt;br /&gt;
    left.add(&amp;quot;/environment/wind-speed-kt&amp;quot;);&lt;br /&gt;
    right.add(&amp;quot;/controls/flight/rudder&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
enableOSD();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the path/to/display-props.nas in your aircraft -set.xml,&lt;br /&gt;
&lt;br /&gt;
or in your $FG_HOME/ inside a Nasal/ folder.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Property Key Handler]]&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
* {{fgdata source|path=gui/dialogs/property-browser.xml}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Menubar]]&lt;br /&gt;
[[Category:Property Tree]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=139611</id>
		<title>Aircraft properties reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=139611"/>
		<updated>2024-04-02T22:35:37Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Engine Common */ Add fire property&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PropertyTree}}&lt;br /&gt;
&lt;br /&gt;
This is a generic '''aircraft properties reference'''.  There are many properties that are very common in aircraft, and many of them are present even in a very simple aircraft.  However, a complete description that matches all the properties is very unlikely to be written, as aircraft can be very different from each other.&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|2}}&lt;br /&gt;
&lt;br /&gt;
== What are properties? ==&lt;br /&gt;
{{main article|Property tree}}&lt;br /&gt;
=== The property tree ===&lt;br /&gt;
Most parts of FlightGear communicate with each other through key-value pair properties in the [[property tree]].  The properties represent both the input from the pilot, the values determining the position and velocity of the aircraft, the values used for animating the aircraft, and pretty much anything else.&lt;br /&gt;
&lt;br /&gt;
While many properties will be common between most aircraft, many properties will also be different between aircraft.  This becomes obvious if one consider the many different configurations (aircraft/helicopter/car, control surface and landing gear layout, number and locations of engines, etc) and propulsions systems (types of engines, types of fuels etc.) an aircraft can have.  There are also different flight dynamic models (FDMs) that have different needs.  In addition many properties will by necessity be aircraft specific, though developers should make a conscious effort to have properties map to more common ones if that is possible.&lt;br /&gt;
&lt;br /&gt;
=== Where are the properties defined? ===&lt;br /&gt;
There are a couple ways that the properties are set, but a fair amount of them just &amp;quot;appear&amp;quot; without being documented anywhere.  There are several places to look for properties.  One is in the aircraft files, starting from the aircraft specific [[aircraft-set.xml]] file, another is the [[Nasal]] files, and the last place (and often most useful!) is &amp;quot;grepping&amp;quot; (searching) through the C++ code.&lt;br /&gt;
&lt;br /&gt;
To determine how a property works and what it does often requires looking through any code that uses it.  This is a part of FlightGear that we could certainly document better&lt;br /&gt;
&lt;br /&gt;
== Annunciators [draft] ==&lt;br /&gt;
!! This section is work in progress !!&lt;br /&gt;
&lt;br /&gt;
The /instrumentation/annunciators section shall provide a central place for&lt;br /&gt;
&lt;br /&gt;
* aircrafts to write annunciator status data&lt;br /&gt;
* 3D aircraft models and external devices (like joysticks, yokes, throttle quadrants or custom made cockpit hardware) to read such data and drive status lights etc.&lt;br /&gt;
&lt;br /&gt;
Some of the props are automatically calculated by property rules in $FGDATA/Aircraft/Generic/generic-annunciators.xml other properties have to be calculated by the actual aircraft.&lt;br /&gt;
&lt;br /&gt;
The aircraft.nas module provides aircraft.light which allows easy implementation of blinking lights. Such lights have a bool property 'state' which tells if the light is on or off.&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/annunciators/doors&lt;br /&gt;
/instrumentation/annunciators/master-caution/state  # aircraft.light&lt;br /&gt;
/instrumentation/annunciators/master-warning/state  # aircraft.light&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/ap/enabled&lt;br /&gt;
/instrumentation/annunciators/ap/mode/alt&lt;br /&gt;
/instrumentation/annunciators/ap/mode/apr&lt;br /&gt;
/instrumentation/annunciators/ap/mode/hdg&lt;br /&gt;
/instrumentation/annunciators/ap/mode/ias&lt;br /&gt;
/instrumentation/annunciators/ap/mode/nav&lt;br /&gt;
/instrumentation/annunciators/ap/mode/rev&lt;br /&gt;
/instrumentation/annunciators/ap/mode/vs&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/engines/&lt;br /&gt;
/instrumentation/annunciators/engines/apu&lt;br /&gt;
/instrumentation/annunciators/engines/fire&lt;br /&gt;
/instrumentation/annunciators/engines/oil-pressure-low&lt;br /&gt;
/instrumentation/annunciators/engines/starter&lt;br /&gt;
# for &amp;lt;gear-name&amp;gt; in {nose, left, right}&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/down&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/in-transition&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/unsafe&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/up&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/gear/parking-brake&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/systems/anti-ice/enabled&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/aux-pump&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/vacuum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Consumables ==&lt;br /&gt;
:''See also [[#Fuel]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lb&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lbs&lt;br /&gt;
/consumables/fuel/tank[%d]/level-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/capacity-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/density-ppg&lt;br /&gt;
/consumables/fuel/total-fuel-lbs&lt;br /&gt;
/consumables/fuel/total-gal_us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Controls ==&lt;br /&gt;
These properties should, and usually do correspond to how various cockpit controls are set.  Consider these the pilot input.&lt;br /&gt;
&lt;br /&gt;
=== Anti-ice ===&lt;br /&gt;
These properties control the various anti-ice properties that may be present in an aircraft.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/anti-ice/wing-heat&lt;br /&gt;
/controls/anti-ice/pitot-heat&lt;br /&gt;
/controls/anti-ice/wiper&lt;br /&gt;
/controls/anti-ice/window-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/carb-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/inlet-heat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== APU ===&lt;br /&gt;
These properties control any auxiliary power unit, in essence a small turbine engine driving generators, hydraulic pumps etc. before and after the aircraft's engines are up an running.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/APU/off-start-run&lt;br /&gt;
/controls/APU/fire-switch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Armament ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/armament/master-arm&lt;br /&gt;
/controls/armament/station-select&lt;br /&gt;
/controls/armament/release-all&lt;br /&gt;
/controls/armament/station[%d]/stick-size&lt;br /&gt;
/controls/armament/station[%d]/release-stick&lt;br /&gt;
/controls/armament/station[%d]/release-all&lt;br /&gt;
/controls/armament/station[%d]/jettison-all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Autoflight ===&lt;br /&gt;
These properties control the autopilot.&lt;br /&gt;
&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/autoflight/autopilot[%d]/engage&lt;br /&gt;
/controls/autoflight/autothrottle-arm&lt;br /&gt;
/controls/autoflight/autothrottle-engage&lt;br /&gt;
/controls/autoflight/heading-select&lt;br /&gt;
/controls/autoflight/altitude-select&lt;br /&gt;
/controls/autoflight/bank-angle-select&lt;br /&gt;
/controls/autoflight/vertical-speed-select&lt;br /&gt;
/controls/autoflight/speed-select&lt;br /&gt;
/controls/autoflight/mach-select&lt;br /&gt;
/controls/autoflight/vertical-mode&lt;br /&gt;
/controls/autoflight/lateral-mode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Electric ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/electric/battery-switch&lt;br /&gt;
/controls/electric/external-power&lt;br /&gt;
/controls/electric/APU-generator&lt;br /&gt;
/controls/electric/engine[%d]/generator&lt;br /&gt;
/controls/electric/engine[%d]/bus-tie&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Engines ===&lt;br /&gt;
Engines are numbered engine[0] for a single engine to engine[0] to engine[3] for a 747 for example. (The model allows for up to 12 engines rumour has it ;-)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/engines/throttle_idle&lt;br /&gt;
/controls/engines/engine[%d]/throttle&lt;br /&gt;
/controls/engines/engine[%d]/starter&lt;br /&gt;
/controls/engines/engine[%d]/fuel-pump&lt;br /&gt;
/controls/engines/engine[%d]/fire-switch&lt;br /&gt;
/controls/engines/engine[%d]/fire-bottle-discharge&lt;br /&gt;
/controls/engines/engine[%d]/cutoff&lt;br /&gt;
/controls/engines/engine[%d]/mixture&lt;br /&gt;
/controls/engines/engine[%d]/propeller-pitch&lt;br /&gt;
/controls/engines/engine[%d]/magnetos&lt;br /&gt;
/controls/engines/engine[%d]/boost&lt;br /&gt;
/controls/engines/engine[%d]/WEP&lt;br /&gt;
/controls/engines/engine[%d]/cowl-flaps-norm&lt;br /&gt;
/controls/engines/engine[%d]/feather&lt;br /&gt;
/controls/engines/engine[%d]/ignition&lt;br /&gt;
/controls/engines/engine[%d]/augmentation&lt;br /&gt;
/controls/engines/engine[%d]/afterburner&lt;br /&gt;
/controls/engines/engine[%d]/reverser&lt;br /&gt;
/controls/engines/engine[%d]/water-injection&lt;br /&gt;
/controls/engines/engine[%d]/condition&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Flight controls ===&lt;br /&gt;
These properties control the flight controls surfaces, though often through a mechanical, analog or digital flight control system (FCS) that may or may not be modeled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/flight/aileron&lt;br /&gt;
/controls/flight/aileron-trim&lt;br /&gt;
/controls/flight/elevator&lt;br /&gt;
/controls/flight/elevator-trim&lt;br /&gt;
/controls/flight/rudder&lt;br /&gt;
/controls/flight/rudder-trim&lt;br /&gt;
/controls/flight/flaps&lt;br /&gt;
/controls/flight/slats&lt;br /&gt;
/controls/flight/BLC			// Boundary Layer Control&lt;br /&gt;
/controls/flight/spoilers&lt;br /&gt;
/controls/flight/speedbrake&lt;br /&gt;
/controls/flight/wing-sweep&lt;br /&gt;
/controls/flight/wing-fold&lt;br /&gt;
/controls/flight/drag-chute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The positions of the controls are usually put in &amp;lt;code&amp;gt;/surface-positions/&amp;lt;/code&amp;gt; at the discretion of the aircraft designer. These usually drive the animations of the control surfaces. They are either normalized (like &amp;lt;code&amp;gt;/surface-positions/elevator-pos-norm&amp;lt;/code&amp;gt;) or in degrees, and sometimes the aileron is split left/right.&lt;br /&gt;
&lt;br /&gt;
=== Fuel ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/fuel/dump-valve&lt;br /&gt;
/controls/fuel/tank[%d]/fuel_selector&lt;br /&gt;
/controls/fuel/tank[%d]/to_engine&lt;br /&gt;
/controls/fuel/tank[%d]/to_tank&lt;br /&gt;
/controls/fuel/tank[%d]/boost-pump[%d]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Gear ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/gear/brake-left&lt;br /&gt;
/controls/gear/brake-right&lt;br /&gt;
/controls/gear/brake-parking&lt;br /&gt;
/controls/gear/steering // Used if rudder is not sufficient for control of steering&lt;br /&gt;
/controls/gear/gear-down&lt;br /&gt;
/controls/gear/antiskid // Deprecated?&lt;br /&gt;
/controls/gear/tailhook&lt;br /&gt;
/controls/gear/tailwheel-lock&lt;br /&gt;
/controls/gear/wheel[%d]/alternate-extension&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Hydraulics ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/hydraulic/system[%d]/engine-pump&lt;br /&gt;
/controls/hydraulic/system[%d]/electric-pump&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Lights ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/lighting/landing-lights&lt;br /&gt;
/controls/lighting/turn-off-lights&lt;br /&gt;
/controls/lighting/formation-lights&lt;br /&gt;
/controls/lighting/taxi-light&lt;br /&gt;
/controls/lighting/logo-lights&lt;br /&gt;
/controls/lighting/nav-lights&lt;br /&gt;
/controls/lighting/beacon&lt;br /&gt;
/controls/lighting/strobe&lt;br /&gt;
/controls/lighting/panel-norm&lt;br /&gt;
/controls/lighting/instruments-norm&lt;br /&gt;
/controls/lighting/dome-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pneumatic ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pneumatic/APU-bleed&lt;br /&gt;
/controls/pneumatic/engine[%d]/bleed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pressurization ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pressurization/mode&lt;br /&gt;
/controls/pressurization/dump&lt;br /&gt;
/controls/pressurization/outflow-valve&lt;br /&gt;
/controls/pressurization/pack[%d]/pack-on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Seat ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/seat/vertical-adjust&lt;br /&gt;
/controls/seat/fore-aft-adjust&lt;br /&gt;
/controls/seat/cmd_selector_valve&lt;br /&gt;
/controls/seat/eject[%d]/initiate&lt;br /&gt;
/controls/seat/eject[%d]/status&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Engines ==&lt;br /&gt;
Status of engines. See also: /controls/engines/ &lt;br /&gt;
=== Common ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/fuel-flow-gph&lt;br /&gt;
/engines/engine[%d]/fuel-flow_pph&lt;br /&gt;
/engines/engine[%d]/thrust_lb&lt;br /&gt;
/engines/engine[%d]/running&lt;br /&gt;
/engines/engine[%d]/starter&lt;br /&gt;
/engines/engine[%d]/cranking&lt;br /&gt;
/engines/engine[%d]/fire&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turbine ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/n1&lt;br /&gt;
/engines/engine[%d]/n2&lt;br /&gt;
/engines/engine[%d]/epr&lt;br /&gt;
/engines/engine[%d]/augmentation&lt;br /&gt;
/engines/engine[%d]/water-injection&lt;br /&gt;
/engines/engine[%d]/ignition&lt;br /&gt;
/engines/engine[%d]/nozzle-pos-norm&lt;br /&gt;
/engines/engine[%d]/inlet-pos-norm&lt;br /&gt;
/engines/engine[%d]/reversed&lt;br /&gt;
/engines/engine[%d]/cutoff&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Piston ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/mp-osi&lt;br /&gt;
/engines/engine[%d]/egt-degf&lt;br /&gt;
/engines/engine[%d]/oil-temperature-degf&lt;br /&gt;
/engines/engine[%d]/oil-pressure-psi&lt;br /&gt;
/engines/engine[%d]/cht-degf&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Propeller ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
/engines/engine[%d]/pitch&lt;br /&gt;
/engines/engine[%d]/torque&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Flight Dynamics Model ==&lt;br /&gt;
=== Position ===&lt;br /&gt;
This will return the current position of the aircraft within FlightGear. This is also the stuff that is transmitted in [[Howto:Multiplayer|multiplayer]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/position/&lt;br /&gt;
/position/altitiude-ft ()&lt;br /&gt;
/position/altitude-agl-ft (22.46983965)&lt;br /&gt;
/position/altitude-ft (28.24368289)&lt;br /&gt;
/position/ground-elev-ft (-0.43513529)&lt;br /&gt;
/position/ground-elev-m (-0.1326292364)&lt;br /&gt;
/position/latitude-deg (37.61371436)&lt;br /&gt;
/position/latitude-string (37*36 49.4N)&lt;br /&gt;
/position/longitude-deg (-122.3576508)&lt;br /&gt;
/position/longitude-string (-122*21 27.5W)&lt;br /&gt;
/position/sea-level-radius-ft (20899648.76)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Orientation ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/orientation/roll-deg&lt;br /&gt;
/orientation/pitch-deg&lt;br /&gt;
/orientation/heading-deg&lt;br /&gt;
&lt;br /&gt;
/orientation/roll-rate-degps&lt;br /&gt;
/orientation/pitch-rate-degps&lt;br /&gt;
/orientation/yaw-rate-degps&lt;br /&gt;
&lt;br /&gt;
/orientation/side-slip-rad&lt;br /&gt;
/orientation/side-slip-deg&lt;br /&gt;
/orientation/alpha-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Velocities ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/velocities/airspeed-kt&lt;br /&gt;
/velocities/mach&lt;br /&gt;
/velocities/speed-north-fps&lt;br /&gt;
/velocities/speed-east-fps&lt;br /&gt;
/velocities/speed-down-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/uBody-fps&lt;br /&gt;
/velocities/vBody-fps&lt;br /&gt;
/velocities/wBody-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/vertical-speed-fps&lt;br /&gt;
/velocities/glideslope&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Acceleration ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/accelerations/nlf&lt;br /&gt;
&lt;br /&gt;
/accelerations/ned/north-accel-fps_sec&lt;br /&gt;
/accelerations/ned/east-accel-fps_sec&lt;br /&gt;
/accelerations/ned/down-accel-fps_sec&lt;br /&gt;
&lt;br /&gt;
/accelerations/pilot/x-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/y-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/z-accel-fps_sec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Gear ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gear/serviceable&lt;br /&gt;
/gear/gear[%d]/cast-angle-deg // The angle of the wheel where 0 is pointing straight forward&lt;br /&gt;
/gear/gear[%d]/compression-m&lt;br /&gt;
/gear/gear[%d]/compression-norm&lt;br /&gt;
/gear/gear[%d]/ground-friction-factor&lt;br /&gt;
/gear/gear[%d]/ground-is-solid&lt;br /&gt;
/gear/gear[%d]/has-brake&lt;br /&gt;
/gear/gear[%d]/rollspeed-ms // Speed of the wheel's rotation in meters per second&lt;br /&gt;
/gear/gear[%d]/wow // Weight-on-wheel&lt;br /&gt;
/gear/gear[%d]/xoffset-in&lt;br /&gt;
/gear/gear[%d]/yoffset-in&lt;br /&gt;
/gear/gear[%d]/zoffset-in&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf/&lt;br /&gt;
/instrumentation/airspeed-indicator/&lt;br /&gt;
/instrumentation/altimeter/&lt;br /&gt;
/instrumentation/annunciator/&lt;br /&gt;
/instrumentation/attitude-indicator/&lt;br /&gt;
/instrumentation/clock/&lt;br /&gt;
/instrumentation/comm/&lt;br /&gt;
/instrumentation/comm[1]/&lt;br /&gt;
/instrumentation/dme/&lt;br /&gt;
/instrumentation/efis/&lt;br /&gt;
/instrumentation/encoder/&lt;br /&gt;
/instrumentation/flightdirector/&lt;br /&gt;
/instrumentation/gps/&lt;br /&gt;
/instrumentation/gps-annunciator/&lt;br /&gt;
/instrumentation/heading-indicator/&lt;br /&gt;
/instrumentation/heading-indicator-fg/&lt;br /&gt;
/instrumentation/magnetic-compass/&lt;br /&gt;
/instrumentation/marker-beacon/&lt;br /&gt;
/instrumentation/nav/&lt;br /&gt;
/instrumentation/nav[1]/&lt;br /&gt;
/instrumentation/radar/&lt;br /&gt;
/instrumentation/slip-skid-ball/&lt;br /&gt;
/instrumentation/tacan/&lt;br /&gt;
/instrumentation/transponder/&lt;br /&gt;
/instrumentation/turn-indicator/&lt;br /&gt;
/instrumentation/vertical-speed-indicator/&lt;br /&gt;
/instrumentation/wxradar/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rotors (YASim only) ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/rotors/gear/torque-sound-filtered // Unused?&lt;br /&gt;
/rotors/gear/total-torque&lt;br /&gt;
/rotors/{name}/balance&lt;br /&gt;
/rotors/{name}/blade[%d]/flap-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/incidence-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/position-deg // Position relative to model&lt;br /&gt;
/rotors/{name}/bladesvisible // Used for animations&lt;br /&gt;
/rotors/{name}/cone%d-deg //e.g. cone-deg or cone2-deg&lt;br /&gt;
/rotors/{name}/roll-deg&lt;br /&gt;
/rotors/{name}/rpm&lt;br /&gt;
/rotors/{name}/stall&lt;br /&gt;
/rotors/{name}/stall-filtered&lt;br /&gt;
/rotors/{name}/tilt&lt;br /&gt;
/rotors/{name}/torque&lt;br /&gt;
/rotors/{name}/yaw-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For how to animate rotors using these properties, see [[Howto:Animate helicopters]].&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Aircraft-set.xml]]&lt;br /&gt;
* [[Multiplayer protocol]]&lt;br /&gt;
* [[Property browser]]&lt;br /&gt;
* [[PropertyList XML files]]&lt;br /&gt;
* [[Property tree]]&lt;br /&gt;
&lt;br /&gt;
=== Readme files ===&lt;br /&gt;
* {{readme file|properties}}&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
==== Consumables ====&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.hxx}}&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Flight Dynamics Model ====&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Instrumentation ====&lt;br /&gt;
* {{flightgear file|src/Instrumentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Property Tree]]&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=139601</id>
		<title>Aircraft properties reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=139601"/>
		<updated>2024-04-02T10:17:13Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Annunciators [draft] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PropertyTree}}&lt;br /&gt;
&lt;br /&gt;
This is a generic '''aircraft properties reference'''.  There are many properties that are very common in aircraft, and many of them are present even in a very simple aircraft.  However, a complete description that matches all the properties is very unlikely to be written, as aircraft can be very different from each other.&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|2}}&lt;br /&gt;
&lt;br /&gt;
== What are properties? ==&lt;br /&gt;
{{main article|Property tree}}&lt;br /&gt;
=== The property tree ===&lt;br /&gt;
Most parts of FlightGear communicate with each other through key-value pair properties in the [[property tree]].  The properties represent both the input from the pilot, the values determining the position and velocity of the aircraft, the values used for animating the aircraft, and pretty much anything else.&lt;br /&gt;
&lt;br /&gt;
While many properties will be common between most aircraft, many properties will also be different between aircraft.  This becomes obvious if one consider the many different configurations (aircraft/helicopter/car, control surface and landing gear layout, number and locations of engines, etc) and propulsions systems (types of engines, types of fuels etc.) an aircraft can have.  There are also different flight dynamic models (FDMs) that have different needs.  In addition many properties will by necessity be aircraft specific, though developers should make a conscious effort to have properties map to more common ones if that is possible.&lt;br /&gt;
&lt;br /&gt;
=== Where are the properties defined? ===&lt;br /&gt;
There are a couple ways that the properties are set, but a fair amount of them just &amp;quot;appear&amp;quot; without being documented anywhere.  There are several places to look for properties.  One is in the aircraft files, starting from the aircraft specific [[aircraft-set.xml]] file, another is the [[Nasal]] files, and the last place (and often most useful!) is &amp;quot;grepping&amp;quot; (searching) through the C++ code.&lt;br /&gt;
&lt;br /&gt;
To determine how a property works and what it does often requires looking through any code that uses it.  This is a part of FlightGear that we could certainly document better&lt;br /&gt;
&lt;br /&gt;
== Annunciators [draft] ==&lt;br /&gt;
!! This section is work in progress !!&lt;br /&gt;
&lt;br /&gt;
The /instrumentation/annunciators section shall provide a central place for&lt;br /&gt;
&lt;br /&gt;
* aircrafts to write annunciator status data&lt;br /&gt;
* 3D aircraft models and external devices (like joysticks, yokes, throttle quadrants or custom made cockpit hardware) to read such data and drive status lights etc.&lt;br /&gt;
&lt;br /&gt;
Some of the props are automatically calculated by property rules in $FGDATA/Aircraft/Generic/generic-annunciators.xml other properties have to be calculated by the actual aircraft.&lt;br /&gt;
&lt;br /&gt;
The aircraft.nas module provides aircraft.light which allows easy implementation of blinking lights. Such lights have a bool property 'state' which tells if the light is on or off.&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/annunciators/doors&lt;br /&gt;
/instrumentation/annunciators/master-caution/state  # aircraft.light&lt;br /&gt;
/instrumentation/annunciators/master-warning/state  # aircraft.light&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/ap/enabled&lt;br /&gt;
/instrumentation/annunciators/ap/mode/alt&lt;br /&gt;
/instrumentation/annunciators/ap/mode/apr&lt;br /&gt;
/instrumentation/annunciators/ap/mode/hdg&lt;br /&gt;
/instrumentation/annunciators/ap/mode/ias&lt;br /&gt;
/instrumentation/annunciators/ap/mode/nav&lt;br /&gt;
/instrumentation/annunciators/ap/mode/rev&lt;br /&gt;
/instrumentation/annunciators/ap/mode/vs&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/engines/&lt;br /&gt;
/instrumentation/annunciators/engines/apu&lt;br /&gt;
/instrumentation/annunciators/engines/fire&lt;br /&gt;
/instrumentation/annunciators/engines/oil-pressure-low&lt;br /&gt;
/instrumentation/annunciators/engines/starter&lt;br /&gt;
# for &amp;lt;gear-name&amp;gt; in {nose, left, right}&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/down&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/in-transition&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/unsafe&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/up&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/gear/parking-brake&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/systems/anti-ice/enabled&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/aux-pump&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/vacuum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Consumables ==&lt;br /&gt;
:''See also [[#Fuel]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lb&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lbs&lt;br /&gt;
/consumables/fuel/tank[%d]/level-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/capacity-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/density-ppg&lt;br /&gt;
/consumables/fuel/total-fuel-lbs&lt;br /&gt;
/consumables/fuel/total-gal_us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Controls ==&lt;br /&gt;
These properties should, and usually do correspond to how various cockpit controls are set.  Consider these the pilot input.&lt;br /&gt;
&lt;br /&gt;
=== Anti-ice ===&lt;br /&gt;
These properties control the various anti-ice properties that may be present in an aircraft.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/anti-ice/wing-heat&lt;br /&gt;
/controls/anti-ice/pitot-heat&lt;br /&gt;
/controls/anti-ice/wiper&lt;br /&gt;
/controls/anti-ice/window-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/carb-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/inlet-heat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== APU ===&lt;br /&gt;
These properties control any auxiliary power unit, in essence a small turbine engine driving generators, hydraulic pumps etc. before and after the aircraft's engines are up an running.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/APU/off-start-run&lt;br /&gt;
/controls/APU/fire-switch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Armament ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/armament/master-arm&lt;br /&gt;
/controls/armament/station-select&lt;br /&gt;
/controls/armament/release-all&lt;br /&gt;
/controls/armament/station[%d]/stick-size&lt;br /&gt;
/controls/armament/station[%d]/release-stick&lt;br /&gt;
/controls/armament/station[%d]/release-all&lt;br /&gt;
/controls/armament/station[%d]/jettison-all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Autoflight ===&lt;br /&gt;
These properties control the autopilot.&lt;br /&gt;
&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/autoflight/autopilot[%d]/engage&lt;br /&gt;
/controls/autoflight/autothrottle-arm&lt;br /&gt;
/controls/autoflight/autothrottle-engage&lt;br /&gt;
/controls/autoflight/heading-select&lt;br /&gt;
/controls/autoflight/altitude-select&lt;br /&gt;
/controls/autoflight/bank-angle-select&lt;br /&gt;
/controls/autoflight/vertical-speed-select&lt;br /&gt;
/controls/autoflight/speed-select&lt;br /&gt;
/controls/autoflight/mach-select&lt;br /&gt;
/controls/autoflight/vertical-mode&lt;br /&gt;
/controls/autoflight/lateral-mode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Electric ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/electric/battery-switch&lt;br /&gt;
/controls/electric/external-power&lt;br /&gt;
/controls/electric/APU-generator&lt;br /&gt;
/controls/electric/engine[%d]/generator&lt;br /&gt;
/controls/electric/engine[%d]/bus-tie&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Engines ===&lt;br /&gt;
Engines are numbered engine[0] for a single engine to engine[0] to engine[3] for a 747 for example. (The model allows for up to 12 engines rumour has it ;-)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/engines/throttle_idle&lt;br /&gt;
/controls/engines/engine[%d]/throttle&lt;br /&gt;
/controls/engines/engine[%d]/starter&lt;br /&gt;
/controls/engines/engine[%d]/fuel-pump&lt;br /&gt;
/controls/engines/engine[%d]/fire-switch&lt;br /&gt;
/controls/engines/engine[%d]/fire-bottle-discharge&lt;br /&gt;
/controls/engines/engine[%d]/cutoff&lt;br /&gt;
/controls/engines/engine[%d]/mixture&lt;br /&gt;
/controls/engines/engine[%d]/propeller-pitch&lt;br /&gt;
/controls/engines/engine[%d]/magnetos&lt;br /&gt;
/controls/engines/engine[%d]/boost&lt;br /&gt;
/controls/engines/engine[%d]/WEP&lt;br /&gt;
/controls/engines/engine[%d]/cowl-flaps-norm&lt;br /&gt;
/controls/engines/engine[%d]/feather&lt;br /&gt;
/controls/engines/engine[%d]/ignition&lt;br /&gt;
/controls/engines/engine[%d]/augmentation&lt;br /&gt;
/controls/engines/engine[%d]/afterburner&lt;br /&gt;
/controls/engines/engine[%d]/reverser&lt;br /&gt;
/controls/engines/engine[%d]/water-injection&lt;br /&gt;
/controls/engines/engine[%d]/condition&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Flight controls ===&lt;br /&gt;
These properties control the flight controls surfaces, though often through a mechanical, analog or digital flight control system (FCS) that may or may not be modeled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/flight/aileron&lt;br /&gt;
/controls/flight/aileron-trim&lt;br /&gt;
/controls/flight/elevator&lt;br /&gt;
/controls/flight/elevator-trim&lt;br /&gt;
/controls/flight/rudder&lt;br /&gt;
/controls/flight/rudder-trim&lt;br /&gt;
/controls/flight/flaps&lt;br /&gt;
/controls/flight/slats&lt;br /&gt;
/controls/flight/BLC			// Boundary Layer Control&lt;br /&gt;
/controls/flight/spoilers&lt;br /&gt;
/controls/flight/speedbrake&lt;br /&gt;
/controls/flight/wing-sweep&lt;br /&gt;
/controls/flight/wing-fold&lt;br /&gt;
/controls/flight/drag-chute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The positions of the controls are usually put in &amp;lt;code&amp;gt;/surface-positions/&amp;lt;/code&amp;gt; at the discretion of the aircraft designer. These usually drive the animations of the control surfaces. They are either normalized (like &amp;lt;code&amp;gt;/surface-positions/elevator-pos-norm&amp;lt;/code&amp;gt;) or in degrees, and sometimes the aileron is split left/right.&lt;br /&gt;
&lt;br /&gt;
=== Fuel ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/fuel/dump-valve&lt;br /&gt;
/controls/fuel/tank[%d]/fuel_selector&lt;br /&gt;
/controls/fuel/tank[%d]/to_engine&lt;br /&gt;
/controls/fuel/tank[%d]/to_tank&lt;br /&gt;
/controls/fuel/tank[%d]/boost-pump[%d]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Gear ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/gear/brake-left&lt;br /&gt;
/controls/gear/brake-right&lt;br /&gt;
/controls/gear/brake-parking&lt;br /&gt;
/controls/gear/steering // Used if rudder is not sufficient for control of steering&lt;br /&gt;
/controls/gear/gear-down&lt;br /&gt;
/controls/gear/antiskid // Deprecated?&lt;br /&gt;
/controls/gear/tailhook&lt;br /&gt;
/controls/gear/tailwheel-lock&lt;br /&gt;
/controls/gear/wheel[%d]/alternate-extension&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Hydraulics ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/hydraulic/system[%d]/engine-pump&lt;br /&gt;
/controls/hydraulic/system[%d]/electric-pump&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Lights ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/lighting/landing-lights&lt;br /&gt;
/controls/lighting/turn-off-lights&lt;br /&gt;
/controls/lighting/formation-lights&lt;br /&gt;
/controls/lighting/taxi-light&lt;br /&gt;
/controls/lighting/logo-lights&lt;br /&gt;
/controls/lighting/nav-lights&lt;br /&gt;
/controls/lighting/beacon&lt;br /&gt;
/controls/lighting/strobe&lt;br /&gt;
/controls/lighting/panel-norm&lt;br /&gt;
/controls/lighting/instruments-norm&lt;br /&gt;
/controls/lighting/dome-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pneumatic ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pneumatic/APU-bleed&lt;br /&gt;
/controls/pneumatic/engine[%d]/bleed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pressurization ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pressurization/mode&lt;br /&gt;
/controls/pressurization/dump&lt;br /&gt;
/controls/pressurization/outflow-valve&lt;br /&gt;
/controls/pressurization/pack[%d]/pack-on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Seat ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/seat/vertical-adjust&lt;br /&gt;
/controls/seat/fore-aft-adjust&lt;br /&gt;
/controls/seat/cmd_selector_valve&lt;br /&gt;
/controls/seat/eject[%d]/initiate&lt;br /&gt;
/controls/seat/eject[%d]/status&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Engines ==&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
=== Common ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/fuel-flow-gph&lt;br /&gt;
/engines/engine[%d]/fuel-flow_pph&lt;br /&gt;
/engines/engine[%d]/thrust_lb&lt;br /&gt;
/engines/engine[%d]/running&lt;br /&gt;
/engines/engine[%d]/starter&lt;br /&gt;
/engines/engine[%d]/cranking&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turbine ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/n1&lt;br /&gt;
/engines/engine[%d]/n2&lt;br /&gt;
/engines/engine[%d]/epr&lt;br /&gt;
/engines/engine[%d]/augmentation&lt;br /&gt;
/engines/engine[%d]/water-injection&lt;br /&gt;
/engines/engine[%d]/ignition&lt;br /&gt;
/engines/engine[%d]/nozzle-pos-norm&lt;br /&gt;
/engines/engine[%d]/inlet-pos-norm&lt;br /&gt;
/engines/engine[%d]/reversed&lt;br /&gt;
/engines/engine[%d]/cutoff&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Piston ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/mp-osi&lt;br /&gt;
/engines/engine[%d]/egt-degf&lt;br /&gt;
/engines/engine[%d]/oil-temperature-degf&lt;br /&gt;
/engines/engine[%d]/oil-pressure-psi&lt;br /&gt;
/engines/engine[%d]/cht-degf&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Propeller ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
/engines/engine[%d]/pitch&lt;br /&gt;
/engines/engine[%d]/torque&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Flight Dynamics Model ==&lt;br /&gt;
=== Position ===&lt;br /&gt;
This will return the current position of the aircraft within FlightGear. This is also the stuff that is transmitted in [[Howto:Multiplayer|multiplayer]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/position/&lt;br /&gt;
/position/altitiude-ft ()&lt;br /&gt;
/position/altitude-agl-ft (22.46983965)&lt;br /&gt;
/position/altitude-ft (28.24368289)&lt;br /&gt;
/position/ground-elev-ft (-0.43513529)&lt;br /&gt;
/position/ground-elev-m (-0.1326292364)&lt;br /&gt;
/position/latitude-deg (37.61371436)&lt;br /&gt;
/position/latitude-string (37*36 49.4N)&lt;br /&gt;
/position/longitude-deg (-122.3576508)&lt;br /&gt;
/position/longitude-string (-122*21 27.5W)&lt;br /&gt;
/position/sea-level-radius-ft (20899648.76)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Orientation ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/orientation/roll-deg&lt;br /&gt;
/orientation/pitch-deg&lt;br /&gt;
/orientation/heading-deg&lt;br /&gt;
&lt;br /&gt;
/orientation/roll-rate-degps&lt;br /&gt;
/orientation/pitch-rate-degps&lt;br /&gt;
/orientation/yaw-rate-degps&lt;br /&gt;
&lt;br /&gt;
/orientation/side-slip-rad&lt;br /&gt;
/orientation/side-slip-deg&lt;br /&gt;
/orientation/alpha-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Velocities ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/velocities/airspeed-kt&lt;br /&gt;
/velocities/mach&lt;br /&gt;
/velocities/speed-north-fps&lt;br /&gt;
/velocities/speed-east-fps&lt;br /&gt;
/velocities/speed-down-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/uBody-fps&lt;br /&gt;
/velocities/vBody-fps&lt;br /&gt;
/velocities/wBody-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/vertical-speed-fps&lt;br /&gt;
/velocities/glideslope&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Acceleration ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/accelerations/nlf&lt;br /&gt;
&lt;br /&gt;
/accelerations/ned/north-accel-fps_sec&lt;br /&gt;
/accelerations/ned/east-accel-fps_sec&lt;br /&gt;
/accelerations/ned/down-accel-fps_sec&lt;br /&gt;
&lt;br /&gt;
/accelerations/pilot/x-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/y-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/z-accel-fps_sec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Gear ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gear/serviceable&lt;br /&gt;
/gear/gear[%d]/cast-angle-deg // The angle of the wheel where 0 is pointing straight forward&lt;br /&gt;
/gear/gear[%d]/compression-m&lt;br /&gt;
/gear/gear[%d]/compression-norm&lt;br /&gt;
/gear/gear[%d]/ground-friction-factor&lt;br /&gt;
/gear/gear[%d]/ground-is-solid&lt;br /&gt;
/gear/gear[%d]/has-brake&lt;br /&gt;
/gear/gear[%d]/rollspeed-ms // Speed of the wheel's rotation in meters per second&lt;br /&gt;
/gear/gear[%d]/wow // Weight-on-wheel&lt;br /&gt;
/gear/gear[%d]/xoffset-in&lt;br /&gt;
/gear/gear[%d]/yoffset-in&lt;br /&gt;
/gear/gear[%d]/zoffset-in&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf/&lt;br /&gt;
/instrumentation/airspeed-indicator/&lt;br /&gt;
/instrumentation/altimeter/&lt;br /&gt;
/instrumentation/annunciator/&lt;br /&gt;
/instrumentation/attitude-indicator/&lt;br /&gt;
/instrumentation/clock/&lt;br /&gt;
/instrumentation/comm/&lt;br /&gt;
/instrumentation/comm[1]/&lt;br /&gt;
/instrumentation/dme/&lt;br /&gt;
/instrumentation/efis/&lt;br /&gt;
/instrumentation/encoder/&lt;br /&gt;
/instrumentation/flightdirector/&lt;br /&gt;
/instrumentation/gps/&lt;br /&gt;
/instrumentation/gps-annunciator/&lt;br /&gt;
/instrumentation/heading-indicator/&lt;br /&gt;
/instrumentation/heading-indicator-fg/&lt;br /&gt;
/instrumentation/magnetic-compass/&lt;br /&gt;
/instrumentation/marker-beacon/&lt;br /&gt;
/instrumentation/nav/&lt;br /&gt;
/instrumentation/nav[1]/&lt;br /&gt;
/instrumentation/radar/&lt;br /&gt;
/instrumentation/slip-skid-ball/&lt;br /&gt;
/instrumentation/tacan/&lt;br /&gt;
/instrumentation/transponder/&lt;br /&gt;
/instrumentation/turn-indicator/&lt;br /&gt;
/instrumentation/vertical-speed-indicator/&lt;br /&gt;
/instrumentation/wxradar/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rotors (YASim only) ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/rotors/gear/torque-sound-filtered // Unused?&lt;br /&gt;
/rotors/gear/total-torque&lt;br /&gt;
/rotors/{name}/balance&lt;br /&gt;
/rotors/{name}/blade[%d]/flap-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/incidence-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/position-deg // Position relative to model&lt;br /&gt;
/rotors/{name}/bladesvisible // Used for animations&lt;br /&gt;
/rotors/{name}/cone%d-deg //e.g. cone-deg or cone2-deg&lt;br /&gt;
/rotors/{name}/roll-deg&lt;br /&gt;
/rotors/{name}/rpm&lt;br /&gt;
/rotors/{name}/stall&lt;br /&gt;
/rotors/{name}/stall-filtered&lt;br /&gt;
/rotors/{name}/tilt&lt;br /&gt;
/rotors/{name}/torque&lt;br /&gt;
/rotors/{name}/yaw-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For how to animate rotors using these properties, see [[Howto:Animate helicopters]].&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Aircraft-set.xml]]&lt;br /&gt;
* [[Multiplayer protocol]]&lt;br /&gt;
* [[Property browser]]&lt;br /&gt;
* [[PropertyList XML files]]&lt;br /&gt;
* [[Property tree]]&lt;br /&gt;
&lt;br /&gt;
=== Readme files ===&lt;br /&gt;
* {{readme file|properties}}&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
==== Consumables ====&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.hxx}}&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Flight Dynamics Model ====&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Instrumentation ====&lt;br /&gt;
* {{flightgear file|src/Instrumentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Property Tree]]&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=139600</id>
		<title>Aircraft properties reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=139600"/>
		<updated>2024-04-02T10:00:46Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Annunciators [draft] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PropertyTree}}&lt;br /&gt;
&lt;br /&gt;
This is a generic '''aircraft properties reference'''.  There are many properties that are very common in aircraft, and many of them are present even in a very simple aircraft.  However, a complete description that matches all the properties is very unlikely to be written, as aircraft can be very different from each other.&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|2}}&lt;br /&gt;
&lt;br /&gt;
== What are properties? ==&lt;br /&gt;
{{main article|Property tree}}&lt;br /&gt;
=== The property tree ===&lt;br /&gt;
Most parts of FlightGear communicate with each other through key-value pair properties in the [[property tree]].  The properties represent both the input from the pilot, the values determining the position and velocity of the aircraft, the values used for animating the aircraft, and pretty much anything else.&lt;br /&gt;
&lt;br /&gt;
While many properties will be common between most aircraft, many properties will also be different between aircraft.  This becomes obvious if one consider the many different configurations (aircraft/helicopter/car, control surface and landing gear layout, number and locations of engines, etc) and propulsions systems (types of engines, types of fuels etc.) an aircraft can have.  There are also different flight dynamic models (FDMs) that have different needs.  In addition many properties will by necessity be aircraft specific, though developers should make a conscious effort to have properties map to more common ones if that is possible.&lt;br /&gt;
&lt;br /&gt;
=== Where are the properties defined? ===&lt;br /&gt;
There are a couple ways that the properties are set, but a fair amount of them just &amp;quot;appear&amp;quot; without being documented anywhere.  There are several places to look for properties.  One is in the aircraft files, starting from the aircraft specific [[aircraft-set.xml]] file, another is the [[Nasal]] files, and the last place (and often most useful!) is &amp;quot;grepping&amp;quot; (searching) through the C++ code.&lt;br /&gt;
&lt;br /&gt;
To determine how a property works and what it does often requires looking through any code that uses it.  This is a part of FlightGear that we could certainly document better&lt;br /&gt;
&lt;br /&gt;
== Annunciators [draft] ==&lt;br /&gt;
!! This section is work in progress !!&lt;br /&gt;
&lt;br /&gt;
The /instrumentation/annunciators section shall provide a central place for&lt;br /&gt;
&lt;br /&gt;
* aircrafts to write annunciator status data&lt;br /&gt;
* external devices like joysticks, yokes, throttle quadrants or custom made cockpit hardware to read such data and drive status lights etc.&lt;br /&gt;
&lt;br /&gt;
Some of the props are automatically calculated by property rules in $FGDATA/Aircraft/Generic/generic-annunciators.xml other properties have to be calculated by the actual aircraft.&lt;br /&gt;
&lt;br /&gt;
The aircraft.nas module provides aircraft.light which allows easy implementation of blinking lights. Such lights have a bool property 'state' which tells if the light is on or off.&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/annunciators/doors&lt;br /&gt;
/instrumentation/annunciators/master-caution/state  # aircraft.light&lt;br /&gt;
/instrumentation/annunciators/master-warning/state  # aircraft.light&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/ap/enabled&lt;br /&gt;
/instrumentation/annunciators/ap/mode/alt&lt;br /&gt;
/instrumentation/annunciators/ap/mode/apr&lt;br /&gt;
/instrumentation/annunciators/ap/mode/hdg&lt;br /&gt;
/instrumentation/annunciators/ap/mode/ias&lt;br /&gt;
/instrumentation/annunciators/ap/mode/nav&lt;br /&gt;
/instrumentation/annunciators/ap/mode/rev&lt;br /&gt;
/instrumentation/annunciators/ap/mode/vs&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/engines/&lt;br /&gt;
/instrumentation/annunciators/engines/apu&lt;br /&gt;
/instrumentation/annunciators/engines/fire&lt;br /&gt;
/instrumentation/annunciators/engines/oil-pressure-low&lt;br /&gt;
/instrumentation/annunciators/engines/starter&lt;br /&gt;
# for &amp;lt;gear-name&amp;gt; in {nose, left, right}&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/down&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/in-transition&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/unsafe&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/up&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/gear/parking-brake&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/systems/anti-ice/enabled&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/aux-pump&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/vacuum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Consumables ==&lt;br /&gt;
:''See also [[#Fuel]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lb&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lbs&lt;br /&gt;
/consumables/fuel/tank[%d]/level-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/capacity-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/density-ppg&lt;br /&gt;
/consumables/fuel/total-fuel-lbs&lt;br /&gt;
/consumables/fuel/total-gal_us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Controls ==&lt;br /&gt;
These properties should, and usually do correspond to how various cockpit controls are set.  Consider these the pilot input.&lt;br /&gt;
&lt;br /&gt;
=== Anti-ice ===&lt;br /&gt;
These properties control the various anti-ice properties that may be present in an aircraft.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/anti-ice/wing-heat&lt;br /&gt;
/controls/anti-ice/pitot-heat&lt;br /&gt;
/controls/anti-ice/wiper&lt;br /&gt;
/controls/anti-ice/window-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/carb-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/inlet-heat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== APU ===&lt;br /&gt;
These properties control any auxiliary power unit, in essence a small turbine engine driving generators, hydraulic pumps etc. before and after the aircraft's engines are up an running.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/APU/off-start-run&lt;br /&gt;
/controls/APU/fire-switch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Armament ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/armament/master-arm&lt;br /&gt;
/controls/armament/station-select&lt;br /&gt;
/controls/armament/release-all&lt;br /&gt;
/controls/armament/station[%d]/stick-size&lt;br /&gt;
/controls/armament/station[%d]/release-stick&lt;br /&gt;
/controls/armament/station[%d]/release-all&lt;br /&gt;
/controls/armament/station[%d]/jettison-all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Autoflight ===&lt;br /&gt;
These properties control the autopilot.&lt;br /&gt;
&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/autoflight/autopilot[%d]/engage&lt;br /&gt;
/controls/autoflight/autothrottle-arm&lt;br /&gt;
/controls/autoflight/autothrottle-engage&lt;br /&gt;
/controls/autoflight/heading-select&lt;br /&gt;
/controls/autoflight/altitude-select&lt;br /&gt;
/controls/autoflight/bank-angle-select&lt;br /&gt;
/controls/autoflight/vertical-speed-select&lt;br /&gt;
/controls/autoflight/speed-select&lt;br /&gt;
/controls/autoflight/mach-select&lt;br /&gt;
/controls/autoflight/vertical-mode&lt;br /&gt;
/controls/autoflight/lateral-mode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Electric ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/electric/battery-switch&lt;br /&gt;
/controls/electric/external-power&lt;br /&gt;
/controls/electric/APU-generator&lt;br /&gt;
/controls/electric/engine[%d]/generator&lt;br /&gt;
/controls/electric/engine[%d]/bus-tie&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Engines ===&lt;br /&gt;
Engines are numbered engine[0] for a single engine to engine[0] to engine[3] for a 747 for example. (The model allows for up to 12 engines rumour has it ;-)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/engines/throttle_idle&lt;br /&gt;
/controls/engines/engine[%d]/throttle&lt;br /&gt;
/controls/engines/engine[%d]/starter&lt;br /&gt;
/controls/engines/engine[%d]/fuel-pump&lt;br /&gt;
/controls/engines/engine[%d]/fire-switch&lt;br /&gt;
/controls/engines/engine[%d]/fire-bottle-discharge&lt;br /&gt;
/controls/engines/engine[%d]/cutoff&lt;br /&gt;
/controls/engines/engine[%d]/mixture&lt;br /&gt;
/controls/engines/engine[%d]/propeller-pitch&lt;br /&gt;
/controls/engines/engine[%d]/magnetos&lt;br /&gt;
/controls/engines/engine[%d]/boost&lt;br /&gt;
/controls/engines/engine[%d]/WEP&lt;br /&gt;
/controls/engines/engine[%d]/cowl-flaps-norm&lt;br /&gt;
/controls/engines/engine[%d]/feather&lt;br /&gt;
/controls/engines/engine[%d]/ignition&lt;br /&gt;
/controls/engines/engine[%d]/augmentation&lt;br /&gt;
/controls/engines/engine[%d]/afterburner&lt;br /&gt;
/controls/engines/engine[%d]/reverser&lt;br /&gt;
/controls/engines/engine[%d]/water-injection&lt;br /&gt;
/controls/engines/engine[%d]/condition&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Flight controls ===&lt;br /&gt;
These properties control the flight controls surfaces, though often through a mechanical, analog or digital flight control system (FCS) that may or may not be modeled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/flight/aileron&lt;br /&gt;
/controls/flight/aileron-trim&lt;br /&gt;
/controls/flight/elevator&lt;br /&gt;
/controls/flight/elevator-trim&lt;br /&gt;
/controls/flight/rudder&lt;br /&gt;
/controls/flight/rudder-trim&lt;br /&gt;
/controls/flight/flaps&lt;br /&gt;
/controls/flight/slats&lt;br /&gt;
/controls/flight/BLC			// Boundary Layer Control&lt;br /&gt;
/controls/flight/spoilers&lt;br /&gt;
/controls/flight/speedbrake&lt;br /&gt;
/controls/flight/wing-sweep&lt;br /&gt;
/controls/flight/wing-fold&lt;br /&gt;
/controls/flight/drag-chute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The positions of the controls are usually put in &amp;lt;code&amp;gt;/surface-positions/&amp;lt;/code&amp;gt; at the discretion of the aircraft designer. These usually drive the animations of the control surfaces. They are either normalized (like &amp;lt;code&amp;gt;/surface-positions/elevator-pos-norm&amp;lt;/code&amp;gt;) or in degrees, and sometimes the aileron is split left/right.&lt;br /&gt;
&lt;br /&gt;
=== Fuel ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/fuel/dump-valve&lt;br /&gt;
/controls/fuel/tank[%d]/fuel_selector&lt;br /&gt;
/controls/fuel/tank[%d]/to_engine&lt;br /&gt;
/controls/fuel/tank[%d]/to_tank&lt;br /&gt;
/controls/fuel/tank[%d]/boost-pump[%d]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Gear ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/gear/brake-left&lt;br /&gt;
/controls/gear/brake-right&lt;br /&gt;
/controls/gear/brake-parking&lt;br /&gt;
/controls/gear/steering // Used if rudder is not sufficient for control of steering&lt;br /&gt;
/controls/gear/gear-down&lt;br /&gt;
/controls/gear/antiskid // Deprecated?&lt;br /&gt;
/controls/gear/tailhook&lt;br /&gt;
/controls/gear/tailwheel-lock&lt;br /&gt;
/controls/gear/wheel[%d]/alternate-extension&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Hydraulics ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/hydraulic/system[%d]/engine-pump&lt;br /&gt;
/controls/hydraulic/system[%d]/electric-pump&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Lights ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/lighting/landing-lights&lt;br /&gt;
/controls/lighting/turn-off-lights&lt;br /&gt;
/controls/lighting/formation-lights&lt;br /&gt;
/controls/lighting/taxi-light&lt;br /&gt;
/controls/lighting/logo-lights&lt;br /&gt;
/controls/lighting/nav-lights&lt;br /&gt;
/controls/lighting/beacon&lt;br /&gt;
/controls/lighting/strobe&lt;br /&gt;
/controls/lighting/panel-norm&lt;br /&gt;
/controls/lighting/instruments-norm&lt;br /&gt;
/controls/lighting/dome-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pneumatic ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pneumatic/APU-bleed&lt;br /&gt;
/controls/pneumatic/engine[%d]/bleed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pressurization ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pressurization/mode&lt;br /&gt;
/controls/pressurization/dump&lt;br /&gt;
/controls/pressurization/outflow-valve&lt;br /&gt;
/controls/pressurization/pack[%d]/pack-on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Seat ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/seat/vertical-adjust&lt;br /&gt;
/controls/seat/fore-aft-adjust&lt;br /&gt;
/controls/seat/cmd_selector_valve&lt;br /&gt;
/controls/seat/eject[%d]/initiate&lt;br /&gt;
/controls/seat/eject[%d]/status&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Engines ==&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
=== Common ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/fuel-flow-gph&lt;br /&gt;
/engines/engine[%d]/fuel-flow_pph&lt;br /&gt;
/engines/engine[%d]/thrust_lb&lt;br /&gt;
/engines/engine[%d]/running&lt;br /&gt;
/engines/engine[%d]/starter&lt;br /&gt;
/engines/engine[%d]/cranking&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turbine ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/n1&lt;br /&gt;
/engines/engine[%d]/n2&lt;br /&gt;
/engines/engine[%d]/epr&lt;br /&gt;
/engines/engine[%d]/augmentation&lt;br /&gt;
/engines/engine[%d]/water-injection&lt;br /&gt;
/engines/engine[%d]/ignition&lt;br /&gt;
/engines/engine[%d]/nozzle-pos-norm&lt;br /&gt;
/engines/engine[%d]/inlet-pos-norm&lt;br /&gt;
/engines/engine[%d]/reversed&lt;br /&gt;
/engines/engine[%d]/cutoff&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Piston ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/mp-osi&lt;br /&gt;
/engines/engine[%d]/egt-degf&lt;br /&gt;
/engines/engine[%d]/oil-temperature-degf&lt;br /&gt;
/engines/engine[%d]/oil-pressure-psi&lt;br /&gt;
/engines/engine[%d]/cht-degf&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Propeller ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
/engines/engine[%d]/pitch&lt;br /&gt;
/engines/engine[%d]/torque&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Flight Dynamics Model ==&lt;br /&gt;
=== Position ===&lt;br /&gt;
This will return the current position of the aircraft within FlightGear. This is also the stuff that is transmitted in [[Howto:Multiplayer|multiplayer]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/position/&lt;br /&gt;
/position/altitiude-ft ()&lt;br /&gt;
/position/altitude-agl-ft (22.46983965)&lt;br /&gt;
/position/altitude-ft (28.24368289)&lt;br /&gt;
/position/ground-elev-ft (-0.43513529)&lt;br /&gt;
/position/ground-elev-m (-0.1326292364)&lt;br /&gt;
/position/latitude-deg (37.61371436)&lt;br /&gt;
/position/latitude-string (37*36 49.4N)&lt;br /&gt;
/position/longitude-deg (-122.3576508)&lt;br /&gt;
/position/longitude-string (-122*21 27.5W)&lt;br /&gt;
/position/sea-level-radius-ft (20899648.76)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Orientation ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/orientation/roll-deg&lt;br /&gt;
/orientation/pitch-deg&lt;br /&gt;
/orientation/heading-deg&lt;br /&gt;
&lt;br /&gt;
/orientation/roll-rate-degps&lt;br /&gt;
/orientation/pitch-rate-degps&lt;br /&gt;
/orientation/yaw-rate-degps&lt;br /&gt;
&lt;br /&gt;
/orientation/side-slip-rad&lt;br /&gt;
/orientation/side-slip-deg&lt;br /&gt;
/orientation/alpha-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Velocities ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/velocities/airspeed-kt&lt;br /&gt;
/velocities/mach&lt;br /&gt;
/velocities/speed-north-fps&lt;br /&gt;
/velocities/speed-east-fps&lt;br /&gt;
/velocities/speed-down-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/uBody-fps&lt;br /&gt;
/velocities/vBody-fps&lt;br /&gt;
/velocities/wBody-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/vertical-speed-fps&lt;br /&gt;
/velocities/glideslope&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Acceleration ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/accelerations/nlf&lt;br /&gt;
&lt;br /&gt;
/accelerations/ned/north-accel-fps_sec&lt;br /&gt;
/accelerations/ned/east-accel-fps_sec&lt;br /&gt;
/accelerations/ned/down-accel-fps_sec&lt;br /&gt;
&lt;br /&gt;
/accelerations/pilot/x-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/y-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/z-accel-fps_sec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Gear ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gear/serviceable&lt;br /&gt;
/gear/gear[%d]/cast-angle-deg // The angle of the wheel where 0 is pointing straight forward&lt;br /&gt;
/gear/gear[%d]/compression-m&lt;br /&gt;
/gear/gear[%d]/compression-norm&lt;br /&gt;
/gear/gear[%d]/ground-friction-factor&lt;br /&gt;
/gear/gear[%d]/ground-is-solid&lt;br /&gt;
/gear/gear[%d]/has-brake&lt;br /&gt;
/gear/gear[%d]/rollspeed-ms // Speed of the wheel's rotation in meters per second&lt;br /&gt;
/gear/gear[%d]/wow // Weight-on-wheel&lt;br /&gt;
/gear/gear[%d]/xoffset-in&lt;br /&gt;
/gear/gear[%d]/yoffset-in&lt;br /&gt;
/gear/gear[%d]/zoffset-in&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf/&lt;br /&gt;
/instrumentation/airspeed-indicator/&lt;br /&gt;
/instrumentation/altimeter/&lt;br /&gt;
/instrumentation/annunciator/&lt;br /&gt;
/instrumentation/attitude-indicator/&lt;br /&gt;
/instrumentation/clock/&lt;br /&gt;
/instrumentation/comm/&lt;br /&gt;
/instrumentation/comm[1]/&lt;br /&gt;
/instrumentation/dme/&lt;br /&gt;
/instrumentation/efis/&lt;br /&gt;
/instrumentation/encoder/&lt;br /&gt;
/instrumentation/flightdirector/&lt;br /&gt;
/instrumentation/gps/&lt;br /&gt;
/instrumentation/gps-annunciator/&lt;br /&gt;
/instrumentation/heading-indicator/&lt;br /&gt;
/instrumentation/heading-indicator-fg/&lt;br /&gt;
/instrumentation/magnetic-compass/&lt;br /&gt;
/instrumentation/marker-beacon/&lt;br /&gt;
/instrumentation/nav/&lt;br /&gt;
/instrumentation/nav[1]/&lt;br /&gt;
/instrumentation/radar/&lt;br /&gt;
/instrumentation/slip-skid-ball/&lt;br /&gt;
/instrumentation/tacan/&lt;br /&gt;
/instrumentation/transponder/&lt;br /&gt;
/instrumentation/turn-indicator/&lt;br /&gt;
/instrumentation/vertical-speed-indicator/&lt;br /&gt;
/instrumentation/wxradar/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rotors (YASim only) ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/rotors/gear/torque-sound-filtered // Unused?&lt;br /&gt;
/rotors/gear/total-torque&lt;br /&gt;
/rotors/{name}/balance&lt;br /&gt;
/rotors/{name}/blade[%d]/flap-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/incidence-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/position-deg // Position relative to model&lt;br /&gt;
/rotors/{name}/bladesvisible // Used for animations&lt;br /&gt;
/rotors/{name}/cone%d-deg //e.g. cone-deg or cone2-deg&lt;br /&gt;
/rotors/{name}/roll-deg&lt;br /&gt;
/rotors/{name}/rpm&lt;br /&gt;
/rotors/{name}/stall&lt;br /&gt;
/rotors/{name}/stall-filtered&lt;br /&gt;
/rotors/{name}/tilt&lt;br /&gt;
/rotors/{name}/torque&lt;br /&gt;
/rotors/{name}/yaw-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For how to animate rotors using these properties, see [[Howto:Animate helicopters]].&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Aircraft-set.xml]]&lt;br /&gt;
* [[Multiplayer protocol]]&lt;br /&gt;
* [[Property browser]]&lt;br /&gt;
* [[PropertyList XML files]]&lt;br /&gt;
* [[Property tree]]&lt;br /&gt;
&lt;br /&gt;
=== Readme files ===&lt;br /&gt;
* {{readme file|properties}}&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
==== Consumables ====&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.hxx}}&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Flight Dynamics Model ====&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Instrumentation ====&lt;br /&gt;
* {{flightgear file|src/Instrumentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Property Tree]]&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=139590</id>
		<title>Aircraft properties reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=139590"/>
		<updated>2024-03-30T13:59:24Z</updated>

		<summary type="html">&lt;p&gt;Jsb: /* Annunciators [draft] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PropertyTree}}&lt;br /&gt;
&lt;br /&gt;
This is a generic '''aircraft properties reference'''.  There are many properties that are very common in aircraft, and many of them are present even in a very simple aircraft.  However, a complete description that matches all the properties is very unlikely to be written, as aircraft can be very different from each other.&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|2}}&lt;br /&gt;
&lt;br /&gt;
== What are properties? ==&lt;br /&gt;
{{main article|Property tree}}&lt;br /&gt;
=== The property tree ===&lt;br /&gt;
Most parts of FlightGear communicate with each other through key-value pair properties in the [[property tree]].  The properties represent both the input from the pilot, the values determining the position and velocity of the aircraft, the values used for animating the aircraft, and pretty much anything else.&lt;br /&gt;
&lt;br /&gt;
While many properties will be common between most aircraft, many properties will also be different between aircraft.  This becomes obvious if one consider the many different configurations (aircraft/helicopter/car, control surface and landing gear layout, number and locations of engines, etc) and propulsions systems (types of engines, types of fuels etc.) an aircraft can have.  There are also different flight dynamic models (FDMs) that have different needs.  In addition many properties will by necessity be aircraft specific, though developers should make a conscious effort to have properties map to more common ones if that is possible.&lt;br /&gt;
&lt;br /&gt;
=== Where are the properties defined? ===&lt;br /&gt;
There are a couple ways that the properties are set, but a fair amount of them just &amp;quot;appear&amp;quot; without being documented anywhere.  There are several places to look for properties.  One is in the aircraft files, starting from the aircraft specific [[aircraft-set.xml]] file, another is the [[Nasal]] files, and the last place (and often most useful!) is &amp;quot;grepping&amp;quot; (searching) through the C++ code.&lt;br /&gt;
&lt;br /&gt;
To determine how a property works and what it does often requires looking through any code that uses it.  This is a part of FlightGear that we could certainly document better&lt;br /&gt;
&lt;br /&gt;
== Annunciators [draft] ==&lt;br /&gt;
!! This section is work in progress !!&lt;br /&gt;
&lt;br /&gt;
The /instrumentation/annunciators section shall provide a central place for&lt;br /&gt;
&lt;br /&gt;
* aircrafts to write annunciator status data&lt;br /&gt;
* external devices like joysticks, yokes, throttle quadrants or custom made cockpit hardware to read such data and drive status lights etc.&lt;br /&gt;
&lt;br /&gt;
The aircraft.nas module provides aircraft.light which allows easy implementation of blinking lights. Such lights have a bool property 'state' which tells if the light is on or off.&lt;br /&gt;
&lt;br /&gt;
Some of the props are automatically calculated by property rules in $FGDATA/Aircraft/Generic/generic-annunciators.xml&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/annunciators/doors&lt;br /&gt;
/instrumentation/annunciators/master-caution/state  # aircraft.light&lt;br /&gt;
/instrumentation/annunciators/master-warning/state  # aircraft.light&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/ap/enabled&lt;br /&gt;
/instrumentation/annunciators/ap/mode/alt&lt;br /&gt;
/instrumentation/annunciators/ap/mode/apr&lt;br /&gt;
/instrumentation/annunciators/ap/mode/hdg&lt;br /&gt;
/instrumentation/annunciators/ap/mode/ias&lt;br /&gt;
/instrumentation/annunciators/ap/mode/nav&lt;br /&gt;
/instrumentation/annunciators/ap/mode/rev&lt;br /&gt;
/instrumentation/annunciators/ap/mode/vs&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/engines/&lt;br /&gt;
/instrumentation/annunciators/engines/apu&lt;br /&gt;
/instrumentation/annunciators/engines/fire&lt;br /&gt;
/instrumentation/annunciators/engines/oil-pressure-low&lt;br /&gt;
/instrumentation/annunciators/engines/starter&lt;br /&gt;
# for &amp;lt;gear-name&amp;gt; in {nose, left, right}&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/down&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/in-transition&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/unsafe&lt;br /&gt;
/instrumentation/annunciators/gear/&amp;lt;gear-name&amp;gt;/up&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/gear/parking-brake&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/systems/anti-ice/enabled&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/aux-pump&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/vacuum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Consumables ==&lt;br /&gt;
:''See also [[#Fuel]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lb&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lbs&lt;br /&gt;
/consumables/fuel/tank[%d]/level-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/capacity-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/density-ppg&lt;br /&gt;
/consumables/fuel/total-fuel-lbs&lt;br /&gt;
/consumables/fuel/total-gal_us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Controls ==&lt;br /&gt;
These properties should, and usually do correspond to how various cockpit controls are set.  Consider these the pilot input.&lt;br /&gt;
&lt;br /&gt;
=== Anti-ice ===&lt;br /&gt;
These properties control the various anti-ice properties that may be present in an aircraft.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/anti-ice/wing-heat&lt;br /&gt;
/controls/anti-ice/pitot-heat&lt;br /&gt;
/controls/anti-ice/wiper&lt;br /&gt;
/controls/anti-ice/window-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/carb-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/inlet-heat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== APU ===&lt;br /&gt;
These properties control any auxiliary power unit, in essence a small turbine engine driving generators, hydraulic pumps etc. before and after the aircraft's engines are up an running.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/APU/off-start-run&lt;br /&gt;
/controls/APU/fire-switch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Armament ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/armament/master-arm&lt;br /&gt;
/controls/armament/station-select&lt;br /&gt;
/controls/armament/release-all&lt;br /&gt;
/controls/armament/station[%d]/stick-size&lt;br /&gt;
/controls/armament/station[%d]/release-stick&lt;br /&gt;
/controls/armament/station[%d]/release-all&lt;br /&gt;
/controls/armament/station[%d]/jettison-all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Autoflight ===&lt;br /&gt;
These properties control the autopilot.&lt;br /&gt;
&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/autoflight/autopilot[%d]/engage&lt;br /&gt;
/controls/autoflight/autothrottle-arm&lt;br /&gt;
/controls/autoflight/autothrottle-engage&lt;br /&gt;
/controls/autoflight/heading-select&lt;br /&gt;
/controls/autoflight/altitude-select&lt;br /&gt;
/controls/autoflight/bank-angle-select&lt;br /&gt;
/controls/autoflight/vertical-speed-select&lt;br /&gt;
/controls/autoflight/speed-select&lt;br /&gt;
/controls/autoflight/mach-select&lt;br /&gt;
/controls/autoflight/vertical-mode&lt;br /&gt;
/controls/autoflight/lateral-mode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Electric ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/electric/battery-switch&lt;br /&gt;
/controls/electric/external-power&lt;br /&gt;
/controls/electric/APU-generator&lt;br /&gt;
/controls/electric/engine[%d]/generator&lt;br /&gt;
/controls/electric/engine[%d]/bus-tie&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Engines ===&lt;br /&gt;
Engines are numbered engine[0] for a single engine to engine[0] to engine[3] for a 747 for example. (The model allows for up to 12 engines rumour has it ;-)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/engines/throttle_idle&lt;br /&gt;
/controls/engines/engine[%d]/throttle&lt;br /&gt;
/controls/engines/engine[%d]/starter&lt;br /&gt;
/controls/engines/engine[%d]/fuel-pump&lt;br /&gt;
/controls/engines/engine[%d]/fire-switch&lt;br /&gt;
/controls/engines/engine[%d]/fire-bottle-discharge&lt;br /&gt;
/controls/engines/engine[%d]/cutoff&lt;br /&gt;
/controls/engines/engine[%d]/mixture&lt;br /&gt;
/controls/engines/engine[%d]/propeller-pitch&lt;br /&gt;
/controls/engines/engine[%d]/magnetos&lt;br /&gt;
/controls/engines/engine[%d]/boost&lt;br /&gt;
/controls/engines/engine[%d]/WEP&lt;br /&gt;
/controls/engines/engine[%d]/cowl-flaps-norm&lt;br /&gt;
/controls/engines/engine[%d]/feather&lt;br /&gt;
/controls/engines/engine[%d]/ignition&lt;br /&gt;
/controls/engines/engine[%d]/augmentation&lt;br /&gt;
/controls/engines/engine[%d]/afterburner&lt;br /&gt;
/controls/engines/engine[%d]/reverser&lt;br /&gt;
/controls/engines/engine[%d]/water-injection&lt;br /&gt;
/controls/engines/engine[%d]/condition&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Flight controls ===&lt;br /&gt;
These properties control the flight controls surfaces, though often through a mechanical, analog or digital flight control system (FCS) that may or may not be modeled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/flight/aileron&lt;br /&gt;
/controls/flight/aileron-trim&lt;br /&gt;
/controls/flight/elevator&lt;br /&gt;
/controls/flight/elevator-trim&lt;br /&gt;
/controls/flight/rudder&lt;br /&gt;
/controls/flight/rudder-trim&lt;br /&gt;
/controls/flight/flaps&lt;br /&gt;
/controls/flight/slats&lt;br /&gt;
/controls/flight/BLC			// Boundary Layer Control&lt;br /&gt;
/controls/flight/spoilers&lt;br /&gt;
/controls/flight/speedbrake&lt;br /&gt;
/controls/flight/wing-sweep&lt;br /&gt;
/controls/flight/wing-fold&lt;br /&gt;
/controls/flight/drag-chute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The positions of the controls are usually put in &amp;lt;code&amp;gt;/surface-positions/&amp;lt;/code&amp;gt; at the discretion of the aircraft designer. These usually drive the animations of the control surfaces. They are either normalized (like &amp;lt;code&amp;gt;/surface-positions/elevator-pos-norm&amp;lt;/code&amp;gt;) or in degrees, and sometimes the aileron is split left/right.&lt;br /&gt;
&lt;br /&gt;
=== Fuel ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/fuel/dump-valve&lt;br /&gt;
/controls/fuel/tank[%d]/fuel_selector&lt;br /&gt;
/controls/fuel/tank[%d]/to_engine&lt;br /&gt;
/controls/fuel/tank[%d]/to_tank&lt;br /&gt;
/controls/fuel/tank[%d]/boost-pump[%d]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Gear ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/gear/brake-left&lt;br /&gt;
/controls/gear/brake-right&lt;br /&gt;
/controls/gear/brake-parking&lt;br /&gt;
/controls/gear/steering // Used if rudder is not sufficient for control of steering&lt;br /&gt;
/controls/gear/gear-down&lt;br /&gt;
/controls/gear/antiskid // Deprecated?&lt;br /&gt;
/controls/gear/tailhook&lt;br /&gt;
/controls/gear/tailwheel-lock&lt;br /&gt;
/controls/gear/wheel[%d]/alternate-extension&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Hydraulics ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/hydraulic/system[%d]/engine-pump&lt;br /&gt;
/controls/hydraulic/system[%d]/electric-pump&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Lights ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/lighting/landing-lights&lt;br /&gt;
/controls/lighting/turn-off-lights&lt;br /&gt;
/controls/lighting/formation-lights&lt;br /&gt;
/controls/lighting/taxi-light&lt;br /&gt;
/controls/lighting/logo-lights&lt;br /&gt;
/controls/lighting/nav-lights&lt;br /&gt;
/controls/lighting/beacon&lt;br /&gt;
/controls/lighting/strobe&lt;br /&gt;
/controls/lighting/panel-norm&lt;br /&gt;
/controls/lighting/instruments-norm&lt;br /&gt;
/controls/lighting/dome-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pneumatic ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pneumatic/APU-bleed&lt;br /&gt;
/controls/pneumatic/engine[%d]/bleed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pressurization ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pressurization/mode&lt;br /&gt;
/controls/pressurization/dump&lt;br /&gt;
/controls/pressurization/outflow-valve&lt;br /&gt;
/controls/pressurization/pack[%d]/pack-on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Seat ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/seat/vertical-adjust&lt;br /&gt;
/controls/seat/fore-aft-adjust&lt;br /&gt;
/controls/seat/cmd_selector_valve&lt;br /&gt;
/controls/seat/eject[%d]/initiate&lt;br /&gt;
/controls/seat/eject[%d]/status&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Engines ==&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
=== Common ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/fuel-flow-gph&lt;br /&gt;
/engines/engine[%d]/fuel-flow_pph&lt;br /&gt;
/engines/engine[%d]/thrust_lb&lt;br /&gt;
/engines/engine[%d]/running&lt;br /&gt;
/engines/engine[%d]/starter&lt;br /&gt;
/engines/engine[%d]/cranking&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turbine ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/n1&lt;br /&gt;
/engines/engine[%d]/n2&lt;br /&gt;
/engines/engine[%d]/epr&lt;br /&gt;
/engines/engine[%d]/augmentation&lt;br /&gt;
/engines/engine[%d]/water-injection&lt;br /&gt;
/engines/engine[%d]/ignition&lt;br /&gt;
/engines/engine[%d]/nozzle-pos-norm&lt;br /&gt;
/engines/engine[%d]/inlet-pos-norm&lt;br /&gt;
/engines/engine[%d]/reversed&lt;br /&gt;
/engines/engine[%d]/cutoff&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Piston ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/mp-osi&lt;br /&gt;
/engines/engine[%d]/egt-degf&lt;br /&gt;
/engines/engine[%d]/oil-temperature-degf&lt;br /&gt;
/engines/engine[%d]/oil-pressure-psi&lt;br /&gt;
/engines/engine[%d]/cht-degf&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Propeller ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
/engines/engine[%d]/pitch&lt;br /&gt;
/engines/engine[%d]/torque&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Flight Dynamics Model ==&lt;br /&gt;
=== Position ===&lt;br /&gt;
This will return the current position of the aircraft within FlightGear. This is also the stuff that is transmitted in [[Howto:Multiplayer|multiplayer]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/position/&lt;br /&gt;
/position/altitiude-ft ()&lt;br /&gt;
/position/altitude-agl-ft (22.46983965)&lt;br /&gt;
/position/altitude-ft (28.24368289)&lt;br /&gt;
/position/ground-elev-ft (-0.43513529)&lt;br /&gt;
/position/ground-elev-m (-0.1326292364)&lt;br /&gt;
/position/latitude-deg (37.61371436)&lt;br /&gt;
/position/latitude-string (37*36 49.4N)&lt;br /&gt;
/position/longitude-deg (-122.3576508)&lt;br /&gt;
/position/longitude-string (-122*21 27.5W)&lt;br /&gt;
/position/sea-level-radius-ft (20899648.76)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Orientation ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/orientation/roll-deg&lt;br /&gt;
/orientation/pitch-deg&lt;br /&gt;
/orientation/heading-deg&lt;br /&gt;
&lt;br /&gt;
/orientation/roll-rate-degps&lt;br /&gt;
/orientation/pitch-rate-degps&lt;br /&gt;
/orientation/yaw-rate-degps&lt;br /&gt;
&lt;br /&gt;
/orientation/side-slip-rad&lt;br /&gt;
/orientation/side-slip-deg&lt;br /&gt;
/orientation/alpha-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Velocities ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/velocities/airspeed-kt&lt;br /&gt;
/velocities/mach&lt;br /&gt;
/velocities/speed-north-fps&lt;br /&gt;
/velocities/speed-east-fps&lt;br /&gt;
/velocities/speed-down-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/uBody-fps&lt;br /&gt;
/velocities/vBody-fps&lt;br /&gt;
/velocities/wBody-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/vertical-speed-fps&lt;br /&gt;
/velocities/glideslope&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Acceleration ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/accelerations/nlf&lt;br /&gt;
&lt;br /&gt;
/accelerations/ned/north-accel-fps_sec&lt;br /&gt;
/accelerations/ned/east-accel-fps_sec&lt;br /&gt;
/accelerations/ned/down-accel-fps_sec&lt;br /&gt;
&lt;br /&gt;
/accelerations/pilot/x-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/y-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/z-accel-fps_sec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Gear ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gear/serviceable&lt;br /&gt;
/gear/gear[%d]/cast-angle-deg // The angle of the wheel where 0 is pointing straight forward&lt;br /&gt;
/gear/gear[%d]/compression-m&lt;br /&gt;
/gear/gear[%d]/compression-norm&lt;br /&gt;
/gear/gear[%d]/ground-friction-factor&lt;br /&gt;
/gear/gear[%d]/ground-is-solid&lt;br /&gt;
/gear/gear[%d]/has-brake&lt;br /&gt;
/gear/gear[%d]/rollspeed-ms // Speed of the wheel's rotation in meters per second&lt;br /&gt;
/gear/gear[%d]/wow // Weight-on-wheel&lt;br /&gt;
/gear/gear[%d]/xoffset-in&lt;br /&gt;
/gear/gear[%d]/yoffset-in&lt;br /&gt;
/gear/gear[%d]/zoffset-in&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf/&lt;br /&gt;
/instrumentation/airspeed-indicator/&lt;br /&gt;
/instrumentation/altimeter/&lt;br /&gt;
/instrumentation/annunciator/&lt;br /&gt;
/instrumentation/attitude-indicator/&lt;br /&gt;
/instrumentation/clock/&lt;br /&gt;
/instrumentation/comm/&lt;br /&gt;
/instrumentation/comm[1]/&lt;br /&gt;
/instrumentation/dme/&lt;br /&gt;
/instrumentation/efis/&lt;br /&gt;
/instrumentation/encoder/&lt;br /&gt;
/instrumentation/flightdirector/&lt;br /&gt;
/instrumentation/gps/&lt;br /&gt;
/instrumentation/gps-annunciator/&lt;br /&gt;
/instrumentation/heading-indicator/&lt;br /&gt;
/instrumentation/heading-indicator-fg/&lt;br /&gt;
/instrumentation/magnetic-compass/&lt;br /&gt;
/instrumentation/marker-beacon/&lt;br /&gt;
/instrumentation/nav/&lt;br /&gt;
/instrumentation/nav[1]/&lt;br /&gt;
/instrumentation/radar/&lt;br /&gt;
/instrumentation/slip-skid-ball/&lt;br /&gt;
/instrumentation/tacan/&lt;br /&gt;
/instrumentation/transponder/&lt;br /&gt;
/instrumentation/turn-indicator/&lt;br /&gt;
/instrumentation/vertical-speed-indicator/&lt;br /&gt;
/instrumentation/wxradar/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rotors (YASim only) ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/rotors/gear/torque-sound-filtered // Unused?&lt;br /&gt;
/rotors/gear/total-torque&lt;br /&gt;
/rotors/{name}/balance&lt;br /&gt;
/rotors/{name}/blade[%d]/flap-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/incidence-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/position-deg // Position relative to model&lt;br /&gt;
/rotors/{name}/bladesvisible // Used for animations&lt;br /&gt;
/rotors/{name}/cone%d-deg //e.g. cone-deg or cone2-deg&lt;br /&gt;
/rotors/{name}/roll-deg&lt;br /&gt;
/rotors/{name}/rpm&lt;br /&gt;
/rotors/{name}/stall&lt;br /&gt;
/rotors/{name}/stall-filtered&lt;br /&gt;
/rotors/{name}/tilt&lt;br /&gt;
/rotors/{name}/torque&lt;br /&gt;
/rotors/{name}/yaw-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For how to animate rotors using these properties, see [[Howto:Animate helicopters]].&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Aircraft-set.xml]]&lt;br /&gt;
* [[Multiplayer protocol]]&lt;br /&gt;
* [[Property browser]]&lt;br /&gt;
* [[PropertyList XML files]]&lt;br /&gt;
* [[Property tree]]&lt;br /&gt;
&lt;br /&gt;
=== Readme files ===&lt;br /&gt;
* {{readme file|properties}}&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
==== Consumables ====&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.hxx}}&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Flight Dynamics Model ====&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Instrumentation ====&lt;br /&gt;
* {{flightgear file|src/Instrumentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Property Tree]]&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=139587</id>
		<title>Aircraft properties reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Aircraft_properties_reference&amp;diff=139587"/>
		<updated>2024-03-28T00:15:02Z</updated>

		<summary type="html">&lt;p&gt;Jsb: annunciators: Add hint to aircraft.light&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PropertyTree}}&lt;br /&gt;
&lt;br /&gt;
This is a generic '''aircraft properties reference'''.  There are many properties that are very common in aircraft, and many of them are present even in a very simple aircraft.  However, a complete description that matches all the properties is very unlikely to be written, as aircraft can be very different from each other.&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|2}}&lt;br /&gt;
&lt;br /&gt;
== What are properties? ==&lt;br /&gt;
{{main article|Property tree}}&lt;br /&gt;
=== The property tree ===&lt;br /&gt;
Most parts of FlightGear communicate with each other through key-value pair properties in the [[property tree]].  The properties represent both the input from the pilot, the values determining the position and velocity of the aircraft, the values used for animating the aircraft, and pretty much anything else.&lt;br /&gt;
&lt;br /&gt;
While many properties will be common between most aircraft, many properties will also be different between aircraft.  This becomes obvious if one consider the many different configurations (aircraft/helicopter/car, control surface and landing gear layout, number and locations of engines, etc) and propulsions systems (types of engines, types of fuels etc.) an aircraft can have.  There are also different flight dynamic models (FDMs) that have different needs.  In addition many properties will by necessity be aircraft specific, though developers should make a conscious effort to have properties map to more common ones if that is possible.&lt;br /&gt;
&lt;br /&gt;
=== Where are the properties defined? ===&lt;br /&gt;
There are a couple ways that the properties are set, but a fair amount of them just &amp;quot;appear&amp;quot; without being documented anywhere.  There are several places to look for properties.  One is in the aircraft files, starting from the aircraft specific [[aircraft-set.xml]] file, another is the [[Nasal]] files, and the last place (and often most useful!) is &amp;quot;grepping&amp;quot; (searching) through the C++ code.&lt;br /&gt;
&lt;br /&gt;
To determine how a property works and what it does often requires looking through any code that uses it.  This is a part of FlightGear that we could certainly document better&lt;br /&gt;
&lt;br /&gt;
== Annunciators [draft] ==&lt;br /&gt;
The /instrumentation/annunciators section shall provide a central place for&lt;br /&gt;
&lt;br /&gt;
* aircrafts to write annunciator status data&lt;br /&gt;
* external devices like joysticks, yokes, throttle quadrants or custom made cockpit hardware to read such data and drive status lights etc.&lt;br /&gt;
The aircraft.nas module provides aircraft.light which allows easy implementation of blinking lights. Such lights have a bool property 'state' which tells if the light is on or off.&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/annunciators/doors&lt;br /&gt;
/instrumentation/annunciators/master-caution/state  # aircraft.light&lt;br /&gt;
/instrumentation/annunciators/master-warning/state  # aircraft.light&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/ap/enabled&lt;br /&gt;
/instrumentation/annunciators/ap/mode/alt&lt;br /&gt;
/instrumentation/annunciators/ap/mode/apr&lt;br /&gt;
/instrumentation/annunciators/ap/mode/hdg&lt;br /&gt;
/instrumentation/annunciators/ap/mode/ias&lt;br /&gt;
/instrumentation/annunciators/ap/mode/nav&lt;br /&gt;
/instrumentation/annunciators/ap/mode/rev&lt;br /&gt;
/instrumentation/annunciators/ap/mode/vs&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/engines/&lt;br /&gt;
/instrumentation/annunciators/engines/apu&lt;br /&gt;
/instrumentation/annunciators/engines/fire&lt;br /&gt;
/instrumentation/annunciators/engines/oil-pressure-low&lt;br /&gt;
/instrumentation/annunciators/engines/starter&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/gear/nose/green&lt;br /&gt;
/instrumentation/annunciators/gear/nose/red&lt;br /&gt;
/instrumentation/annunciators/gear/left/green&lt;br /&gt;
/instrumentation/annunciators/gear/left/red&lt;br /&gt;
/instrumentation/annunciators/gear/right/green&lt;br /&gt;
/instrumentation/annunciators/gear/right/red&lt;br /&gt;
/instrumentation/annunciators/gear/parking-brake&lt;br /&gt;
&lt;br /&gt;
/instrumentation/annunciators/systems/anti-ice/enabled&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/aux-pump&lt;br /&gt;
/instrumentation/annunciators/systems/fuel/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/hyd/pressure-low&lt;br /&gt;
/instrumentation/annunciators/systems/vacuum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Consumables ==&lt;br /&gt;
:''See also [[#Fuel]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lb&lt;br /&gt;
/consumables/fuel/tank[%d]/level-lbs&lt;br /&gt;
/consumables/fuel/tank[%d]/level-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/capacity-gal_us&lt;br /&gt;
/consumables/fuel/tank[%d]/density-ppg&lt;br /&gt;
/consumables/fuel/total-fuel-lbs&lt;br /&gt;
/consumables/fuel/total-gal_us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Controls ==&lt;br /&gt;
These properties should, and usually do correspond to how various cockpit controls are set.  Consider these the pilot input.&lt;br /&gt;
&lt;br /&gt;
=== Anti-ice ===&lt;br /&gt;
These properties control the various anti-ice properties that may be present in an aircraft.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/anti-ice/wing-heat&lt;br /&gt;
/controls/anti-ice/pitot-heat&lt;br /&gt;
/controls/anti-ice/wiper&lt;br /&gt;
/controls/anti-ice/window-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/carb-heat&lt;br /&gt;
/controls/anti-ice/engine[%d]/inlet-heat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== APU ===&lt;br /&gt;
These properties control any auxiliary power unit, in essence a small turbine engine driving generators, hydraulic pumps etc. before and after the aircraft's engines are up an running.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/APU/off-start-run&lt;br /&gt;
/controls/APU/fire-switch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Armament ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/armament/master-arm&lt;br /&gt;
/controls/armament/station-select&lt;br /&gt;
/controls/armament/release-all&lt;br /&gt;
/controls/armament/station[%d]/stick-size&lt;br /&gt;
/controls/armament/station[%d]/release-stick&lt;br /&gt;
/controls/armament/station[%d]/release-all&lt;br /&gt;
/controls/armament/station[%d]/jettison-all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Autoflight ===&lt;br /&gt;
These properties control the autopilot.&lt;br /&gt;
&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/autoflight/autopilot[%d]/engage&lt;br /&gt;
/controls/autoflight/autothrottle-arm&lt;br /&gt;
/controls/autoflight/autothrottle-engage&lt;br /&gt;
/controls/autoflight/heading-select&lt;br /&gt;
/controls/autoflight/altitude-select&lt;br /&gt;
/controls/autoflight/bank-angle-select&lt;br /&gt;
/controls/autoflight/vertical-speed-select&lt;br /&gt;
/controls/autoflight/speed-select&lt;br /&gt;
/controls/autoflight/mach-select&lt;br /&gt;
/controls/autoflight/vertical-mode&lt;br /&gt;
/controls/autoflight/lateral-mode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Electric ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/electric/battery-switch&lt;br /&gt;
/controls/electric/external-power&lt;br /&gt;
/controls/electric/APU-generator&lt;br /&gt;
/controls/electric/engine[%d]/generator&lt;br /&gt;
/controls/electric/engine[%d]/bus-tie&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Engines ===&lt;br /&gt;
Engines are numbered engine[0] for a single engine to engine[0] to engine[3] for a 747 for example. (The model allows for up to 12 engines rumour has it ;-)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/engines/throttle_idle&lt;br /&gt;
/controls/engines/engine[%d]/throttle&lt;br /&gt;
/controls/engines/engine[%d]/starter&lt;br /&gt;
/controls/engines/engine[%d]/fuel-pump&lt;br /&gt;
/controls/engines/engine[%d]/fire-switch&lt;br /&gt;
/controls/engines/engine[%d]/fire-bottle-discharge&lt;br /&gt;
/controls/engines/engine[%d]/cutoff&lt;br /&gt;
/controls/engines/engine[%d]/mixture&lt;br /&gt;
/controls/engines/engine[%d]/propeller-pitch&lt;br /&gt;
/controls/engines/engine[%d]/magnetos&lt;br /&gt;
/controls/engines/engine[%d]/boost&lt;br /&gt;
/controls/engines/engine[%d]/WEP&lt;br /&gt;
/controls/engines/engine[%d]/cowl-flaps-norm&lt;br /&gt;
/controls/engines/engine[%d]/feather&lt;br /&gt;
/controls/engines/engine[%d]/ignition&lt;br /&gt;
/controls/engines/engine[%d]/augmentation&lt;br /&gt;
/controls/engines/engine[%d]/afterburner&lt;br /&gt;
/controls/engines/engine[%d]/reverser&lt;br /&gt;
/controls/engines/engine[%d]/water-injection&lt;br /&gt;
/controls/engines/engine[%d]/condition&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Flight controls ===&lt;br /&gt;
These properties control the flight controls surfaces, though often through a mechanical, analog or digital flight control system (FCS) that may or may not be modeled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/flight/aileron&lt;br /&gt;
/controls/flight/aileron-trim&lt;br /&gt;
/controls/flight/elevator&lt;br /&gt;
/controls/flight/elevator-trim&lt;br /&gt;
/controls/flight/rudder&lt;br /&gt;
/controls/flight/rudder-trim&lt;br /&gt;
/controls/flight/flaps&lt;br /&gt;
/controls/flight/slats&lt;br /&gt;
/controls/flight/BLC			// Boundary Layer Control&lt;br /&gt;
/controls/flight/spoilers&lt;br /&gt;
/controls/flight/speedbrake&lt;br /&gt;
/controls/flight/wing-sweep&lt;br /&gt;
/controls/flight/wing-fold&lt;br /&gt;
/controls/flight/drag-chute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The positions of the controls are usually put in &amp;lt;code&amp;gt;/surface-positions/&amp;lt;/code&amp;gt; at the discretion of the aircraft designer. These usually drive the animations of the control surfaces. They are either normalized (like &amp;lt;code&amp;gt;/surface-positions/elevator-pos-norm&amp;lt;/code&amp;gt;) or in degrees, and sometimes the aileron is split left/right.&lt;br /&gt;
&lt;br /&gt;
=== Fuel ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/fuel/dump-valve&lt;br /&gt;
/controls/fuel/tank[%d]/fuel_selector&lt;br /&gt;
/controls/fuel/tank[%d]/to_engine&lt;br /&gt;
/controls/fuel/tank[%d]/to_tank&lt;br /&gt;
/controls/fuel/tank[%d]/boost-pump[%d]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Gear ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/gear/brake-left&lt;br /&gt;
/controls/gear/brake-right&lt;br /&gt;
/controls/gear/brake-parking&lt;br /&gt;
/controls/gear/steering // Used if rudder is not sufficient for control of steering&lt;br /&gt;
/controls/gear/gear-down&lt;br /&gt;
/controls/gear/antiskid // Deprecated?&lt;br /&gt;
/controls/gear/tailhook&lt;br /&gt;
/controls/gear/tailwheel-lock&lt;br /&gt;
/controls/gear/wheel[%d]/alternate-extension&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Hydraulics ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/hydraulic/system[%d]/engine-pump&lt;br /&gt;
/controls/hydraulic/system[%d]/electric-pump&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Lights ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/lighting/landing-lights&lt;br /&gt;
/controls/lighting/turn-off-lights&lt;br /&gt;
/controls/lighting/formation-lights&lt;br /&gt;
/controls/lighting/taxi-light&lt;br /&gt;
/controls/lighting/logo-lights&lt;br /&gt;
/controls/lighting/nav-lights&lt;br /&gt;
/controls/lighting/beacon&lt;br /&gt;
/controls/lighting/strobe&lt;br /&gt;
/controls/lighting/panel-norm&lt;br /&gt;
/controls/lighting/instruments-norm&lt;br /&gt;
/controls/lighting/dome-norm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pneumatic ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pneumatic/APU-bleed&lt;br /&gt;
/controls/pneumatic/engine[%d]/bleed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Pressurization ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/pressurization/mode&lt;br /&gt;
/controls/pressurization/dump&lt;br /&gt;
/controls/pressurization/outflow-valve&lt;br /&gt;
/controls/pressurization/pack[%d]/pack-on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Seat ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/controls/seat/vertical-adjust&lt;br /&gt;
/controls/seat/fore-aft-adjust&lt;br /&gt;
/controls/seat/cmd_selector_valve&lt;br /&gt;
/controls/seat/eject[%d]/initiate&lt;br /&gt;
/controls/seat/eject[%d]/status&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Engines ==&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
=== Common ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/fuel-flow-gph&lt;br /&gt;
/engines/engine[%d]/fuel-flow_pph&lt;br /&gt;
/engines/engine[%d]/thrust_lb&lt;br /&gt;
/engines/engine[%d]/running&lt;br /&gt;
/engines/engine[%d]/starter&lt;br /&gt;
/engines/engine[%d]/cranking&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turbine ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/n1&lt;br /&gt;
/engines/engine[%d]/n2&lt;br /&gt;
/engines/engine[%d]/epr&lt;br /&gt;
/engines/engine[%d]/augmentation&lt;br /&gt;
/engines/engine[%d]/water-injection&lt;br /&gt;
/engines/engine[%d]/ignition&lt;br /&gt;
/engines/engine[%d]/nozzle-pos-norm&lt;br /&gt;
/engines/engine[%d]/inlet-pos-norm&lt;br /&gt;
/engines/engine[%d]/reversed&lt;br /&gt;
/engines/engine[%d]/cutoff&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Piston ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/mp-osi&lt;br /&gt;
/engines/engine[%d]/egt-degf&lt;br /&gt;
/engines/engine[%d]/oil-temperature-degf&lt;br /&gt;
/engines/engine[%d]/oil-pressure-psi&lt;br /&gt;
/engines/engine[%d]/cht-degf&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Propeller ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/engines/engine[%d]/rpm&lt;br /&gt;
/engines/engine[%d]/pitch&lt;br /&gt;
/engines/engine[%d]/torque&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Flight Dynamics Model ==&lt;br /&gt;
=== Position ===&lt;br /&gt;
This will return the current position of the aircraft within FlightGear. This is also the stuff that is transmitted in [[Howto:Multiplayer|multiplayer]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/position/&lt;br /&gt;
/position/altitiude-ft ()&lt;br /&gt;
/position/altitude-agl-ft (22.46983965)&lt;br /&gt;
/position/altitude-ft (28.24368289)&lt;br /&gt;
/position/ground-elev-ft (-0.43513529)&lt;br /&gt;
/position/ground-elev-m (-0.1326292364)&lt;br /&gt;
/position/latitude-deg (37.61371436)&lt;br /&gt;
/position/latitude-string (37*36 49.4N)&lt;br /&gt;
/position/longitude-deg (-122.3576508)&lt;br /&gt;
/position/longitude-string (-122*21 27.5W)&lt;br /&gt;
/position/sea-level-radius-ft (20899648.76)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Orientation ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/orientation/roll-deg&lt;br /&gt;
/orientation/pitch-deg&lt;br /&gt;
/orientation/heading-deg&lt;br /&gt;
&lt;br /&gt;
/orientation/roll-rate-degps&lt;br /&gt;
/orientation/pitch-rate-degps&lt;br /&gt;
/orientation/yaw-rate-degps&lt;br /&gt;
&lt;br /&gt;
/orientation/side-slip-rad&lt;br /&gt;
/orientation/side-slip-deg&lt;br /&gt;
/orientation/alpha-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Velocities ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/velocities/airspeed-kt&lt;br /&gt;
/velocities/mach&lt;br /&gt;
/velocities/speed-north-fps&lt;br /&gt;
/velocities/speed-east-fps&lt;br /&gt;
/velocities/speed-down-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/uBody-fps&lt;br /&gt;
/velocities/vBody-fps&lt;br /&gt;
/velocities/wBody-fps&lt;br /&gt;
&lt;br /&gt;
/velocities/vertical-speed-fps&lt;br /&gt;
/velocities/glideslope&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
=== Acceleration ===&lt;br /&gt;
TODO - explain of section&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/accelerations/nlf&lt;br /&gt;
&lt;br /&gt;
/accelerations/ned/north-accel-fps_sec&lt;br /&gt;
/accelerations/ned/east-accel-fps_sec&lt;br /&gt;
/accelerations/ned/down-accel-fps_sec&lt;br /&gt;
&lt;br /&gt;
/accelerations/pilot/x-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/y-accel-fps_sec&lt;br /&gt;
/accelerations/pilot/z-accel-fps_sec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
TODO - section notes&lt;br /&gt;
&lt;br /&gt;
== Gear ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gear/serviceable&lt;br /&gt;
/gear/gear[%d]/cast-angle-deg // The angle of the wheel where 0 is pointing straight forward&lt;br /&gt;
/gear/gear[%d]/compression-m&lt;br /&gt;
/gear/gear[%d]/compression-norm&lt;br /&gt;
/gear/gear[%d]/ground-friction-factor&lt;br /&gt;
/gear/gear[%d]/ground-is-solid&lt;br /&gt;
/gear/gear[%d]/has-brake&lt;br /&gt;
/gear/gear[%d]/rollspeed-ms // Speed of the wheel's rotation in meters per second&lt;br /&gt;
/gear/gear[%d]/wow // Weight-on-wheel&lt;br /&gt;
/gear/gear[%d]/xoffset-in&lt;br /&gt;
/gear/gear[%d]/yoffset-in&lt;br /&gt;
/gear/gear[%d]/zoffset-in&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/instrumentation/adf/&lt;br /&gt;
/instrumentation/airspeed-indicator/&lt;br /&gt;
/instrumentation/altimeter/&lt;br /&gt;
/instrumentation/annunciator/&lt;br /&gt;
/instrumentation/attitude-indicator/&lt;br /&gt;
/instrumentation/clock/&lt;br /&gt;
/instrumentation/comm/&lt;br /&gt;
/instrumentation/comm[1]/&lt;br /&gt;
/instrumentation/dme/&lt;br /&gt;
/instrumentation/efis/&lt;br /&gt;
/instrumentation/encoder/&lt;br /&gt;
/instrumentation/flightdirector/&lt;br /&gt;
/instrumentation/gps/&lt;br /&gt;
/instrumentation/gps-annunciator/&lt;br /&gt;
/instrumentation/heading-indicator/&lt;br /&gt;
/instrumentation/heading-indicator-fg/&lt;br /&gt;
/instrumentation/magnetic-compass/&lt;br /&gt;
/instrumentation/marker-beacon/&lt;br /&gt;
/instrumentation/nav/&lt;br /&gt;
/instrumentation/nav[1]/&lt;br /&gt;
/instrumentation/radar/&lt;br /&gt;
/instrumentation/slip-skid-ball/&lt;br /&gt;
/instrumentation/tacan/&lt;br /&gt;
/instrumentation/transponder/&lt;br /&gt;
/instrumentation/turn-indicator/&lt;br /&gt;
/instrumentation/vertical-speed-indicator/&lt;br /&gt;
/instrumentation/wxradar/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rotors (YASim only) ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/rotors/gear/torque-sound-filtered // Unused?&lt;br /&gt;
/rotors/gear/total-torque&lt;br /&gt;
/rotors/{name}/balance&lt;br /&gt;
/rotors/{name}/blade[%d]/flap-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/incidence-deg&lt;br /&gt;
/rotors/{name}/blade[%d]/position-deg // Position relative to model&lt;br /&gt;
/rotors/{name}/bladesvisible // Used for animations&lt;br /&gt;
/rotors/{name}/cone%d-deg //e.g. cone-deg or cone2-deg&lt;br /&gt;
/rotors/{name}/roll-deg&lt;br /&gt;
/rotors/{name}/rpm&lt;br /&gt;
/rotors/{name}/stall&lt;br /&gt;
/rotors/{name}/stall-filtered&lt;br /&gt;
/rotors/{name}/tilt&lt;br /&gt;
/rotors/{name}/torque&lt;br /&gt;
/rotors/{name}/yaw-deg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For how to animate rotors using these properties, see [[Howto:Animate helicopters]].&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Aircraft-set.xml]]&lt;br /&gt;
* [[Multiplayer protocol]]&lt;br /&gt;
* [[Property browser]]&lt;br /&gt;
* [[PropertyList XML files]]&lt;br /&gt;
* [[Property tree]]&lt;br /&gt;
&lt;br /&gt;
=== Readme files ===&lt;br /&gt;
* {{readme file|properties}}&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
==== Consumables ====&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/TankProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.hxx}}&lt;br /&gt;
* {{flightgear file|src/Aircraft/controls.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Flight Dynamics Model ====&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.hxx}}&lt;br /&gt;
* {{flightgear file|src/FDM/flightProperties.cxx}}&lt;br /&gt;
&lt;br /&gt;
==== Instrumentation ====&lt;br /&gt;
* {{flightgear file|src/Instrumentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Property Tree]]&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;/div&gt;</summary>
		<author><name>Jsb</name></author>
	</entry>
</feed>