Autopilot configuration reference: Difference between revisions

Line 49: Line 49:


== Common Elements Used By All Elements ==
== Common Elements Used By All Elements ==
=== Name ===
The <name> element is optional, but should be added to give the controller a distinct name. It is only used in debug output.
<name>NAV hold</name>
=== Feedback if disabled ===
The &lt;feedback-if-disabled&gt; element advises the controller to feed back the output property value to the active input property if the
condition defined in the &lt;enable&gt; tag evaluates to false. This is usually required for controllers like servo drivers behind a PID-controller to give that PID-controller a valid starting value when it becomes enabled. The absence of this element or anything but the word ''true'' within this element results in feedback disabled.
<feedback-if-disabled>true</feedback-if-disabled>
=== Debug ===
If the &lt;debug&gt; element is present and if it contains the word ''true'', the containing controller prints out some diagnostic information on the console for each processing loop.
<debug>true</debug>
=== 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.
To enable a wing leveler only if the current bank angle does not exceed 30&deg; of bank, use this condition
<enable>
  <condition>
    <less-than>
      <property>orientation/bank-angle-deg</property>
      <value>30.0</value>
    </less-than>
    <greater-than>
      <property>orientation/bank-angle-deg</property>
      <value>-30.0</value>
    </greater-than>
  </condition>
</enable>


=== Input Values ===
=== Input Values ===