<?xml version="1.0" ?>
<!-- GFC 700 Autopilot Configuration -->
<!-- Each component is evaluated in the order specified.  You can make up -->
<!-- property names to pass the result of one component on to a subsequent -->
<!-- component. -->

<PropertyList>

  <state-machine include="GFC700-vertical-FSM.xml"/>
  <state-machine include="GFC700-lateral-FSM.xml"/>
  <state-machine include="GFC700-AP-off-FSM.xml"/>

  <filter>
    <name>heading bug error computer/normalizer</name>
    <debug>false</debug>
    <type>gain</type>
    <input>
      <property>/autopilot/settings/heading-bug-deg</property>
      <offset>
        <property>/orientation/heading-magnetic-deg</property>
        <scale>-1.0</scale>
      </offset>
    </input>
    <output>/autopilot/internal/heading-bug-error-deg</output>
    <output>/autopilot/internal/fdm-heading-bug-error-deg</output>
    <period>
      <min>-180</min>
      <max>180</max>
    </period>
    <gain>1.0</gain>
  </filter>

  <filter>
    <name>true heading error computer/normalizer</name>
    <debug>false</debug>
    <type>gain</type>
    <input>
      <property>/autopilot/settings/true-heading-deg</property>
      <offset>
        <property>/orientation/heading-deg</property>
        <scale>-1.0</scale>
      </offset>
    </input>
    <output>/autopilot/internal/true-heading-error-deg</output>
    <period>
      <min>-180</min>
      <max>180</max>
    </period>
    <gain>1.0</gain>
  </filter>

  <filter>
    <name>nav1 heading error computer/normalizer</name>
    <debug>false</debug>
    <type>gain</type>
    <input>
      <property>/instrumentation/nav[0]/radials/target-auto-hdg-deg</property>
      <offset>
        <property>/orientation/heading-deg</property>
        <scale>-1.0</scale>
      </offset>
    </input>
    <output>/autopilot/internal/nav1-heading-error-deg</output>
    <period>
      <min>-180</min>
      <max>180</max>
    </period>
    <gain>1.0</gain>
  </filter>

  <filter>
    <name>nav1 selected course error computer/normalizer</name>
    <debug>false</debug>
    <type>gain</type>
    <input>
      <property>/instrumentation/nav[0]/radials/selected-deg</property>
      <offset>
        <property>/orientation/heading-magnetic-deg</property>
        <scale>-1.0</scale>
      </offset>
    </input>
    <output>/autopilot/internal/nav1-course-error</output>
    <period>
      <min>-180</min>
      <max>180</max>
    </period>
    <gain>1.0</gain>
  </filter>

  <filter>
    <name>nav2 heading error computer/normalizer</name>
    <debug>false</debug>
    <type>gain</type>
    <input>
      <property>/instrumentation/nav[1]/radials/target-auto-hdg-deg</property>
      <offset>
        <property>/orientation/heading-deg</property>
        <scale>-1.0</scale>
      </offset>
    </input>
    <output>/autopilot/internal/nav2-heading-error-deg</output>
    <period>
      <min>-180</min>
      <max>180</max>
    </period>
    <gain>1.0</gain>
  </filter>

  <filter>
    <name>nav2 selected course error computer/normalizer</name>
    <debug>false</debug>
    <type>gain</type>
    <input>
      <property>/instrumentation/nav[1]/radials/selected-deg</property>
      <offset>
        <property>/orientation/heading-magnetic-deg</property>
        <scale>-1.0</scale>
      </offset>
    </input>
    <output>/autopilot/internal/nav2-course-error</output>
    <period>
      <min>-180</min>
      <max>180</max>
    </period>
    <gain>1.0</gain>
  </filter>

  <filter>
    <name>vertical speed fpm computer</name>
    <debug>false</debug>
    <type>gain</type>
    <input>/velocities/vertical-speed-fps</input>
    <output>/autopilot/internal/vert-speed-fpm</output>
    <gain>60.0</gain>
  </filter>

  <predict-simple>
    <name>speed in 5 seconds predictor</name>
    <debug>false</debug>
    <input>/velocities/airspeed-kt</input>
    <output>/autopilot/internal/lookahead-5-sec-airspeed-kt</output>
    <seconds>5.0</seconds>
    <filter-gain>0.0</filter-gain>
  </predict-simple>

  <predict-simple>
    <name>speed in 10 seconds predictor</name>
    <debug>false</debug>
    <input>/velocities/airspeed-kt</input>
    <output>/autopilot/internal/lookahead-10-sec-airspeed-kt</output>
    <seconds>10.0</seconds>
    <filter-gain>0.0</filter-gain>
  </predict-simple>

  <filter>
    <name>static port pressure rate computer</name>
    <debug>false</debug>
    <type>derivative</type>
    <input>/systems/static[0]/pressure-inhg</input>
    <output>/autopilot/internal/pressure-rate</output>
    <filter-time>1.0</filter-time>
  </filter>

  <filter>
    <name>nav1 track error computer</name>
    <debug>false</debug>
    <type>gain</type>
    <input>
      <property>/instrumentation/nav[0]/radials/target-auto-hdg-deg</property>
      <offset>
        <property>orientation/track-deg</property>
        <scale>-1.0</scale>
      </offset>
    </input>
    <output>/autopilot/internal/nav1-track-error-deg</output>
    <period>
      <min>-180</min>
      <max>180</max>
    </period>
    <gain>1.0</gain>
  </filter>

  <filter>
    <name>limited-pitch</name>
    <debug>false</debug>
    <type>gain</type>
    <input>
      <property>/instrumentation/attitude-indicator/indicated-pitch-deg</property>
    </input>
    <gain>1.0</gain>
    <output>/autopilot/internal/filtered-pitch-deg</output>
    <min>-15.0</min>
    <max>20.0</max>
  </filter>

  <filter>
    <name>limited-roll</name>
    <debug>false</debug>
    <type>gain</type>
    <input>
      <property>/instrumentation/attitude-indicator/indicated-roll-deg</property>
    </input>
    <gain>1.0</gain>
    <output>/autopilot/internal/filtered-roll-deg</output>
    <min>-22.0</min>
    <max>22.0</max>
  </filter>

  <filter>
    <name>limited-airspeed</name>
    <debug>false</debug>
    <type>gain</type>
    <input>
      <property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
    </input>
    <gain>1.0</gain>
    <output>/autopilot/internal/filtered-airspeed</output>
    <min>80.0</min>
    <max>140.0</max>
  </filter>

  <filter>
    <name>ALTS-delta</name>
    <debug>false</debug>
    <type>gain</type>
    <input>
      <property>/autopilot/settings/target-alt-ft</property>
      <offset>
        <property>/instrumentation/altimeter/indicated-altitude-ft</property>
        <scale>-1.0</scale>
      </offset>
    </input>
    <gain>1.0</gain>
    <output>/autopilot/internal/ALTS-target-altitude-delta-ft</output>
  </filter>

  <!-- Logic filters to show autopilot and Flight Director status -->
  <logic>
    <input>
      <and>
        <equals><property>/autopilot/locks/passive-mode</property><value>0</value></equals>
        <or>
          <not><equals><property>/autopilot/locks/heading</property><value></value></equals></not>
          <not><equals><property>/autopilot/locks/altitude</property><value></value></equals></not>
        </or>
      </and>
    </input>
    <output>/autopilot/annunciator/autopilot-enabled</output>
  </logic>

  <logic>
    <input>
      <and>
        <equals><property>/autopilot/locks/passive-mode</property><value>1</value></equals>
        <or>
          <not><equals><property>/autopilot/locks/heading</property><value></value></equals></not>
          <not><equals><property>/autopilot/locks/altitude</property><value></value></equals></not>
        </or>
      </and>
    </input>
    <output>/autopilot/annunciator/flight-director-enabled</output>
  </logic>

  <!-- Logic filter to indicate if we can transtion to GPS/LOC/VOR mode -->
  <logic>
    <input>
      <or>
        <and>
          <equals>
            <property>/autopilot/settings/nav-mode-source</property>
            <value>NAV1</value>
          </equals>
          <less-than>
            <property>/instrumentation/nav[0]/heading-needle-deflection</property>
            <value>4.0</value>
          </less-than>
          <greater-than>
            <property>/instrumentation/nav[0]/heading-needle-deflection</property>
            <value>-4.0</value>
          </greater-than>
        </and>
        <and>
          <equals>
            <property>/autopilot/settings/nav-mode-source</property>
            <value>NAV2</value>
          </equals>
          <less-than>
            <property>/instrumentation/nav[1]/heading-needle-deflection</property>
            <value>4.0</value>
          </less-than>
          <greater-than>
            <property>/instrumentation/nav[1]/heading-needle-deflection</property>
            <value>-4.0</value>
          </greater-than>
        </and>
        <and>
          <equals>
            <property>/autopilot/settings/nav-mode-source</property>
            <value>GPS</value>
          </equals>
          <less-than>
            <property>/instrumentation/gps/wp/wp[1]/course-error-nm</property>
            <value>0.5</value>
          </less-than>
          <greater-than>
            <property>/instrumentation/gps/wp/wp[1]/course-error-nm</property>
            <value>-0.5</value>
          </greater-than>
        </and>
      </or>
    </input>
    <output>/autopilot/internal/nav-capture</output>
  </logic>


  <!-- =============================================================== -->
  <!-- Roll Axis Modes                                                 -->
  <!-- =============================================================== -->


  <!-- Heading Bug Hold.  2 stage cascade controller. -->

  <!-- Stage #1 sets target roll based on diff between current heading -->
  <!-- and heading bug. -->
  <pid-controller>
    <name>Heading Bug Hold (DG based) Stage 1</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/heading</prop>
      <value>dg-heading-hold</value>
    </enable>
    <input>
      <prop>/autopilot/internal/heading-bug-error-deg</prop>
    </input>
    <reference>
      <value>0.0</value>
    </reference>
    <output>
      <prop>/autopilot/settings/target-roll-deg</prop>
    </output>
    <config>
      <Kp>-1.0</Kp>        <!-- proportional gain -->
      <beta>1.0</beta>     <!-- input value weighing factor -->
      <alpha>0.1</alpha>   <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>   <!-- input value weighing factor for -->
                           <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>        <!-- integrator time -->
      <Td>0.00001</Td>     <!-- derivator time -->
      <u_min>-20.0</u_min> <!-- minimum output clamp -->
      <u_max>20.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <!-- True Heading hold.  2 stage cascade controller. -->

  <!-- Stage #1 sets target roll based on diff between current heading -->
  <!-- and target heading. -->
  <pid-controller>
    <name>True Heading Hold (DG based) Stage 1</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/heading</prop>
      <value>true-heading-hold</value>
    </enable>
    <input>
      <prop>/autopilot/internal/true-heading-error-deg</prop>
    </input>
    <reference>
      <value>0.0</value>
    </reference>
    <output>
      <prop>/autopilot/settings/target-roll-deg</prop>
    </output>
    <config>
      <Kp>-1.0</Kp>        <!-- proportional gain -->
      <beta>1.0</beta>     <!-- input value weighing factor -->
      <alpha>0.1</alpha>   <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>   <!-- input value weighing factor for -->
                           <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>        <!-- integrator time -->
      <Td>0.00001</Td>     <!-- derivator time -->
      <u_min>-20.0</u_min> <!-- minimum output clamp -->
      <u_max>20.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <!-- Nav1 hold.  2 stage cascade controller. -->

  <!-- Stage #1 sets target roll based on diff between current heading -->
  <!-- and target heading. -->
  <pid-controller>
    <name>Nav1/GPS Hold Stage 1</name>
    <debug>false</debug>
    <enable>
      <condition>
        <and>
          <equals>
            <property>/autopilot/locks/heading</property>
            <value>nav-hold</value>
          </equals>
          <or>
            <equals>
              <property>/autopilot/settings/nav-mode-source</property>
              <value>NAV1</value>
            </equals>
            <equals>
              <!-- GPS is also slaved to NAV1 -->
              <property>/autopilot/settings/nav-mode-source</property>
              <value>GPS</value>
            </equals>
          </or>
        </and>
      </condition>
    </enable>
    <input>
      <prop>/autopilot/internal/nav1-heading-error-deg</prop>
    </input>
    <reference>
      <value>0.0</value>
    </reference>
    <output>
      <prop>/autopilot/settings/target-roll-deg</prop>
    </output>
    <config>
      <Kp>-1.0</Kp>        <!-- proportional gain -->
      <beta>1.0</beta>     <!-- input value weighing factor -->
      <alpha>0.1</alpha>   <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>   <!-- input value weighing factor for -->
                           <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>        <!-- integrator time -->
      <Td>0.00001</Td>     <!-- derivator time -->
      <u_min>-20.0</u_min> <!-- minimum output clamp -->
      <u_max>20.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <pid-controller>
    <name>Nav2 Hold Stage 1</name>
    <debug>false</debug>
    <enable>
      <condition>
        <and>
          <equals>
            <property>/autopilot/locks/heading</property>
            <value>nav-hold</value>
          </equals>
          <equals>
            <property>/autopilot/settings/nav-mode-source</property>
            <value>NAV2</value>
          </equals>
        </and>
      </condition>
    </enable>
    <input>
      <prop>/autopilot/internal/nav2-heading-error-deg</prop>
    </input>
    <reference>
      <value>0.0</value>
    </reference>
    <output>
      <prop>/autopilot/settings/target-roll-deg</prop>
    </output>
    <config>
      <Kp>-1.0</Kp>        <!-- proportional gain -->
      <beta>1.0</beta>     <!-- input value weighing factor -->
      <alpha>0.1</alpha>   <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>   <!-- input value weighing factor for -->
                           <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>        <!-- integrator time -->
      <Td>0.00001</Td>     <!-- derivator time -->
      <u_min>-20.0</u_min> <!-- minimum output clamp -->
      <u_max>20.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>


  <!-- Aileron control, used by all lateral modes ROL/NAV/HDG -->
  <pid-controller>
    <name>Roll Hold</name>
    <debug>false</debug>
    <enable>
      <condition>
        <and>
          <or>
            <equals>
              <property>/autopilot/locks/heading</property>
              <value>roll-hold</value>
            </equals>
            <equals>
              <property>/autopilot/locks/heading</property>
              <value>dg-heading-hold</value>
            </equals>
            <equals>
              <property>/autopilot/locks/heading</property>
              <value>nav-hold</value>
            </equals>
          </or>
          <equals>
            <property>/autopilot/locks/passive-mode</property>
            <value>0</value>
          </equals>
          <not>
            <equals>
              <property>/autopilot/locks/control-wheel-steering</property>
              <value>1</value>
            </equals>
          </not>
        </and>
      </condition>
    </enable>
    <input>
      <prop>/orientation/roll-deg</prop>
    </input>
    <reference>
      <prop>/autopilot/settings/target-roll-deg</prop>
    </reference>
    <output>
      <prop>/controls/flight/aileron</prop>
    </output>
    <config>
      <Kp>0.1</Kp>        <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>       <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-1.0</u_min> <!-- minimum output clamp -->
      <u_max>1.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>



 <!-- =============================================================== -->
 <!-- Pitch Axis Modes                                                -->
 <!-- =============================================================== -->


  <!-- Altitude hold.  2 stage cascade controller. -->

  <!-- Stage #1 sets target rate of climb based on diff between current alt -->
  <!-- and target altitude. -->
  <pi-simple-controller>
    <name>Altitude Hold (Altimeter based) Stage 1</name>
    <debug>false</debug>
    <enable>
      <condition>
        <equals>
          <property>/autopilot/locks/altitude</property>
          <value>altitude-hold</value>
        </equals>
      </condition>
    </enable>
    <input>
      <prop>/instrumentation/altimeter/indicated-altitude-ft</prop>
    </input>
    <reference>
      <prop>/autopilot/settings/target-altitude-ft</prop>
    </reference>
    <output>
      <prop>/autopilot/internal/target-climb-rate-fps</prop>
    </output>
    <config>
      <Kp>0.3</Kp>          <!-- proportional gain -->
      <Ki>0.0</Ki>          <!-- integral gain -->
      <u_min>-16.67</u_min> <!-- minimum output clamp -->
      <u_max>8.33</u_max>   <!-- maximum output clamp -->
    </config>
  </pi-simple-controller>

  <!-- Altitude hold2.  2 stage cascade controller. -->

  <!-- Stage #1 sets target rate of climb based on diff between current alt -->
  <!-- and target altitude. -->
  <pi-simple-controller>
    <name>Altitude Hold (Altimeter based) Stage 1</name>
    <debug>false</debug>
    <enable>
      <condition>
        <equals>
          <property>/autopilot/locks/altitude</property>
          <value>altitude-hold2</value>
        </equals>
      </condition>
    </enable>
    <input>
      <prop>/instrumentation/altimeter/indicated-altitude-ft</prop>
    </input>
    <reference>
      <prop>/autopilot/settings/target-altitude-ft-2</prop>
    </reference>
    <output>
      <prop>/autopilot/internal/target-climb-rate-fps</prop>
    </output>
    <config>
      <Kp>0.3</Kp>          <!-- proportional gain -->
      <Ki>0.0</Ki>          <!-- integral gain -->
      <u_min>-16.67</u_min> <!-- minimum output clamp -->
      <u_max>8.33</u_max>   <!-- maximum output clamp -->
    </config>
  </pi-simple-controller>

  <!-- Glideslope hold. -->

  <pid-controller>
    <name>NAV1/GPS Glideslope Hold</name>
    <debug>false</debug>
    <enable>
      <condition>
        <and>
          <equals>
            <property>/autopilot/locks/altitude</property>
            <value>gs-hold</value>
          </equals>
          <or>
            <equals>
              <property>/autopilot/settings/nav-mode-source</property>
              <value>GPS</value>
            </equals>
            <equals>
              <property>/autopilot/settings/nav-mode-source</property>
              <value>NAV1</value>
            </equals>
          </or>
        </and>
      </condition>
    </enable>
    <input>
      <prop>/velocities/vertical-speed-fps</prop>
    </input>
    <reference>
      <prop>/instrumentation/nav[0]/gs-rate-of-climb</prop>
    </reference>
     <output>
      <prop>/autopilot/settings/target-pitch-deg</prop>
    </output>
    <config>
      <Kp>0.1</Kp>       <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>1.0</Ti>        <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-15.0</u_min><!-- minimum output clamp -->
      <u_max>15.0</u_max> <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <pid-controller>
    <name>NAV1/GPS Glideslope Hold</name>
    <debug>false</debug>
    <enable>
      <condition>
        <and>
          <equals>
            <property>/autopilot/locks/altitude</property>
            <value>gs-hold</value>
          </equals>
          <equals>
            <property>/autopilot/settings/nav-mode-source</property>
            <value>NAV2</value>
          </equals>
        </and>
      </condition>
    </enable>
    <input>
      <prop>/velocities/vertical-speed-fps</prop>
    </input>
    <reference>
      <prop>/instrumentation/nav[1]/gs-rate-of-climb</prop>
    </reference>
     <output>
      <prop>/autopilot/settings/target-pitch-deg</prop>
    </output>
    <config>
      <Kp>0.1</Kp>       <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>1.0</Ti>        <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-15.0</u_min><!-- minimum output clamp -->
      <u_max>15.0</u_max> <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <!-- vertical speed hold VS mode -->
  <pid-controller>
    <name>Vertical Speed Hold</name>
    <debug>false</debug>
    <enable>
      <condition>
        <equals>
          <property>/autopilot/locks/altitude</property>
          <value>vertical-speed-hold</value>
        </equals>
      </condition>
    </enable>
    <input>
      <prop>/velocities/vertical-speed-fps</prop>
    </input>
    <reference>
      <prop>/autopilot/settings/vertical-speed-fpm</prop>
      <scale>0.01667</scale>
    </reference>
    <output>
      <prop>/autopilot/settings/target-pitch-deg</prop>
    </output>
    <config>
      <Kp>0.1</Kp>       <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>1.0</Ti>        <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-15.0</u_min><!-- minimum output clamp -->
      <u_max>15.0</u_max> <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <!-- Common vertical speed controller for ALT/APR/VNV modes mode -->
  <pid-controller>
    <name>Altitude Hold (Altimeter based) Stage 2</name>
    <debug>false</debug>
    <enable>
      <condition>
        <and>
          <not>
            <equals>
              <property>/autopilot/locks/control-wheel-steering</property>
              <value>1</value>
            </equals>
          </not>
          <or>
            <equals>
              <property>/autopilot/locks/altitude</property>
              <value>altitude-hold</value>
            </equals>
            <equals>
              <property>/autopilot/locks/altitude</property>
              <value>altitude-hold2</value>
            </equals>
          </or>
        </and>
      </condition>
    </enable>
    <input>
      <prop>/velocities/vertical-speed-fps</prop>
    </input>
    <reference>
      <prop>/autopilot/internal/target-climb-rate-fps</prop>
    </reference>
    <output>
      <prop>/autopilot/settings/target-pitch-deg</prop>
    </output>
    <config>
      <Kp>0.1</Kp>       <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>1.0</Ti>        <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-15.0</u_min><!-- minimum output clamp -->
      <u_max>15.0</u_max> <!-- maximum output clamp -->
    </config>
  </pid-controller>


  <!-- =============================================================== -->
  <!-- Velocity Modes                                                  -->
  <!-- =============================================================== -->

  <!-- FLC mode - Hold speed by varying pitch trim (Two stage cascading controller) -->
  <pid-controller>
    <name>Speed hold (vary pitch trim) Stage #1</name>
    <debug>false</debug>
    <enable>
      <condition>
        <equals>
          <property>/autopilot/locks/speed</property>
          <value>speed-with-pitch-trim</value>
        </equals>
      </condition>
    </enable>
    <input>
      <prop>/autopilot/internal/lookahead-5-sec-airspeed-kt</prop>
    </input>
    <reference>
      <prop>/autopilot/settings/target-speed-kt</prop>
    </reference>
    <output>
      <prop>/autopilot/settings/target-pitch-deg</prop>
    </output>
    <config>
      <Kp>-1.0</Kp>       <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>1.0</Ti>        <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-15.0</u_min><!-- minimum output clamp -->
      <u_max>15.0</u_max> <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <!-- Simple pitch hold for PIT and FLC modes. -->
  <pid-controller>
     <name>Pitch hold</name>
     <debug>false</debug>
     <enable>
       <condition>
         <and>
           <equals>
             <property>/autopilot/locks/passive-mode</property>
             <value>0</value>
           </equals>
           <not>
             <equals>
               <property>/autopilot/locks/control-wheel-steering</property>
               <value>1</value>
             </equals>
           </not>
           <or>
             <not>
               <equals>
                 <property>/autopilot/locks/altitude</property>
                 <value></value>
               </equals>
             </not>
             <not>
               <equals>
                 <property>/autopilot/locks/speed</property>
                 <value></value>
               </equals>
             </not>
           </or>
         </and>
       </condition>
     </enable>
     <input>
       <prop>/orientation/pitch-deg</prop>
     </input>
     <reference>
       <prop>/autopilot/settings/target-pitch-deg</prop>
     </reference>
     <output>
       <prop>/controls/flight/elevator-trim</prop>
     </output>
     <config>
       <Kp>-0.05</Kp>      <!-- proportional gain -->
       <beta>1.0</beta>    <!-- input value weighing factor -->
       <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
       <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                           <!-- unfiltered derivative error -->
       <Ti>1.0</Ti>        <!-- integrator time -->
       <Td>0.00001</Td>    <!-- derivator time -->
       <u_min>-1.0</u_min> <!-- minimum output clamp -->
       <u_max>1.0</u_max>  <!-- maximum output clamp -->
     </config>
    </pid-controller>

</PropertyList>