Autopilot configuration reference: Difference between revisions

Input, Reference and Output
(Input, Reference and Output)
Line 63: Line 63:
  <debug>true</debug>
  <debug>true</debug>


=== Input and Reference ===
Each controller has two input "lines", denoted by the tags &lt;input&gt; and &lt;reference&gt;. The arithmetic difference of these two values is used by the respective controller to compute it's output. Unfortunately due to historical reasons, the sign of input and reference is not consistent for all controllers. While the pid-controller and the pi-simple-controller compute "reference-input", the filter controller computes "input-reference". Each element is optional with a default value of zero. These elements are made of so called '''Input Values''' described further down in this document.
Example for a simple differential amplifier, computing output = (input-reference)*2
<filter>
  <type>gain</type>
  <gain>1.0</gain>
  <input>/some/input</input>
  <reference>/some/output</reference>
  <output>/some/output</output>
</filter>
=== Output ===
The &lt;outptu&gt; element names the properties, the computed value should be written to. More than one &lt;output&gt; may be present, each named property will be assigned the computed value.
<output>controls/flight/elevator</output>
=== Enable ===
=== Enable ===
Controllers can be enabled or disabled using property values. This element &lt;enable&gt; may contain a &lt;prop&gt; and a &lt;value&gt; element. The controller is enabled, if the value of the named property equals the given value. This feature is considered deprecated and might go away in future releases. The preferred way of defining the enable-condition is by adding a &lt;condition&gt; element to the &lt;enable&gt; element. This &lt;condition&gt; follows the same syntactical rules as the one used in model animations and can model complex expression trees.
Controllers can be enabled or disabled using property values. This element &lt;enable&gt; may contain a &lt;prop&gt; and a &lt;value&gt; element. The controller is enabled, if the value of the named property equals the given value. This feature is considered deprecated and might go away in future releases. The preferred way of defining the enable-condition is by adding a &lt;condition&gt; element to the &lt;enable&gt; element. This &lt;condition&gt; follows the same syntactical rules as the one used in model animations and can model complex expression trees.