Autopilot configuration reference: Difference between revisions

Jump to navigation Jump to search
→‎Adding a Autopilot Configuration to Aircraft: add <property-rule> clarification.
(+template: Note; Moving image to top)
(→‎Adding a Autopilot Configuration to Aircraft: add <property-rule> clarification.)
Line 40: Line 40:
The location and the name of the configuration file is up to the developer. A descriptive name like 'autopilot.xml' might be a good choice. Most developers put these files into the Systems folder of the aircraft.
The location and the name of the configuration file is up to the developer. A descriptive name like 'autopilot.xml' might be a good choice. Most developers put these files into the Systems folder of the aircraft.


== Adding a Autopilot Configuration to Aircraft ==
== Adding an Autopilot Configuration to Aircraft ==
Autopilot configuration files are added to the aircraft by adding  
Autopilot configuration files are added to the aircraft by adding  
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
Line 61: Line 61:


node of your aircraft-set.xml file. Note, that more than one <autopilot> node may be present, each will create a new instance of the autopilot subsystem when running FlightGear. They run in the order of appearance under <systems>. For example, lateral and vertical autopilot modes could live in separate files, as could a yaw-damper system.
node of your aircraft-set.xml file. Note, that more than one <autopilot> node may be present, each will create a new instance of the autopilot subsystem when running FlightGear. They run in the order of appearance under <systems>. For example, lateral and vertical autopilot modes could live in separate files, as could a yaw-damper system.
== Adding a Property-rule Configuration to Aircraft ==
Property-rules can also be used independent of the autopilot configuration, in which case they will always be active regardless if the autopilot is active or not. You can use these to process properties so their values can be used by other systems outside of the autopilot scope (for example to create smooth animations for switches that normally have discrete values)
To achieve this load your filters configuration by adding:
<syntaxhighlight lang="xml">
  <property-rule n="100"> <!-- "n" needs to be >= 100 to avoid overwriting other predefined global rules (in particular the environment ones)  -->
    <path>Systems/my-propertyrules.xml</path> <!-- path can be relative to the current aircraft folder -->
  </property-rule>
</syntaxhighlight>
to the :
<syntaxhighlight lang="xml">
<sim>
  <systems>
    <!-- many other elements live here -->
    <property-rule n="100"> <!-- "n" needs to be >= 100 to avoid overwriting other predefined global rules (in particular the environment ones)  -->
      <path>Systems/my-propertyrules.xml</path> <!-- path can be relative to the current aircraft folder -->
    </property-rule>
  </systems>
  </sim>
</syntaxhighlight>
node of your aircraft-set.xml file. Note that you can add multiple <property-rule> elements, similar to the <autopilot> as described above.


== Available Elements ==
== Available Elements ==
422

edits

Navigation menu