Autopilot configuration reference: Difference between revisions

Line 80: Line 80:
   <scale>1.8</scale>
   <scale>1.8</scale>
   <offset>32</offset>
   <offset>32</offset>
</reference>
==== Periodical transformation of the input value ====
Periodical (like angular) input values can be transformed to appear in the correct phase before they are processed by the controller by adding or substracting multiples of the period to the input value until the values is in the requested periods interval.
The following example converts the heading which comes in the range of [0..360] into the range of [-180..+180]. This will cause a heading of 270 to be processed as a value of -90.
<reference>
  <property>/orientation/heading-deg</property>
  <period>
    <min>-180.0</min>
    <max>180.0</max>
  </period>
  </reference>
  </reference>