<?xml version="1.0" encoding="ISO-8859-1"?>

<!-- Based on 777 -->
<PropertyList>

  <internal>
    <target-climb-rate type="int">0</target-climb-rate>
    <target-altitude   type="int">0</target-altitude>
    <target-pressure   type="double">0.0</target-pressure>
    <target-roll-deg   type="double">0.0</target-roll-deg>
  </internal>

  <!-- =============================================================== -->
  <!--                        Lateral Modes                            -->
  <!-- =============================================================== -->
  <pid-controller>
    <name>TO/GA1</name>
    <debug>false</debug>
    <enable>
      <property>instrumentation/afds/ap-modes/roll-mode</property>
      <value>TO/GA</value>
    </enable>
    <input>
      <property>orientation/roll-deg</property>
    </input>
    <reference>
      <value>0.0</value>
    </reference>
    <output>
      <property>/autopilot/internal/target-roll-deg</property>
    </output>
    <config>
      <Ts>0.05</Ts>
      <Kp>-1.0</Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>10.0</Ti>
      <Td>0.0</Td>
      <u_min>
        <property>instrumentation/afds/settings/bank-min</property>
      </u_min>
      <u_max>
        <property>instrumentation/afds/settings/bank-max</property>
      </u_max>
    </config>
  </pid-controller>

  <pi-simple-controller>
    <name>HDG HOLD</name>
    <debug>false</debug>
    <enable>
      <condition>
        <or>
          <equals>
            <property>instrumentation/afds/ap-modes/roll-mode</property>
            <value>HDG SEL</value>
          </equals>
          <equals>
            <property>instrumentation/afds/ap-modes/roll-mode</property>
            <value>HDG HOLD</value>
          </equals>
        </or>
      </condition>
    </enable>
    <input>
      <property>autopilot/internal/fdm-heading-bug-error-deg</property>
    </input>
    <reference>
      <value>0</value>
    </reference>
    <output>
      <property>/autopilot/internal/target-roll-deg</property>
    </output>
    <config>
      <Kp>-1.75</Kp>
      <Ki>0.00</Ki>
      <u_min>
        <property>instrumentation/afds/settings/bank-min</property>
      </u_min>
      <u_max>
        <property>instrumentation/afds/settings/bank-max</property>
      </u_max>
    </config>
  </pi-simple-controller>

  <filter>
    <name>LNAV waypoint error computer/normalizer</name>
    <debug>false</debug>
    <enable>
      <property>instrumentation/afds/ap-modes/roll-mode</property>
      <value>LNAV</value>
    </enable>
    <type>gain</type>
    <input>
      <property>/autopilot/route-manager/wp/bearing-deg</property>
      <offset>
        <property>/orientation/heading-magnetic-deg</property>
        <scale>-1.0</scale>
      </offset>
    </input>
    <output>autopilot/internal/waypoint-bearing-error-deg</output>
    <period>
      <min>-180</min>
      <max>180</max>
    </period>
    <gain>1.0</gain>
  </filter>

  <pi-simple-controller>
    <name>LNAV1</name>
    <debug>false</debug>
    <enable>
      <property>instrumentation/afds/ap-modes/roll-mode</property>
      <value>LNAV</value>
    </enable>
    <input>
      <property>/autopilot/internal/waypoint-bearing-error-deg</property>
    </input>
    <reference>
      <property>/autopilot/internal/course-deviation</property>
      <scale>-1.5</scale>
    </reference>
    <output>
      <property>/autopilot/internal/target-roll-deg</property>
    </output>
    <config>
      <Kp>-1.75</Kp>
      <Ki>0.0</Ki>
      <u_min>
        <property>instrumentation/afds/settings/bank-min</property>
      </u_min>
      <u_max>
        <property>instrumentation/afds/settings/bank-max</property>
      </u_max>
    </config>
  </pi-simple-controller>

  <pi-simple-controller>
    <name>LOC1</name>
    <debug>false</debug>
    <enable>
      <property>instrumentation/afds/ap-modes/roll-mode</property>
      <value>LOC</value>
    </enable>
    <input>
      <property>/autopilot/internal/nav1-heading-error-deg</property>
    </input>
    <reference>
      <value>0.0</value>
    </reference>
    <output>
      <property>/autopilot/internal/target-roll-deg</property>
    </output>
    <config>
      <Kp>-3.0</Kp>
      <Ki>0.0</Ki>
      <u_min>
        <property>instrumentation/afds/settings/bank-min</property>
      </u_min>
      <u_max>
        <property>instrumentation/afds/settings/bank-max</property>
      </u_max>
    </config>
  </pi-simple-controller>

  <pi-simple-controller>
    <name>ROLLOUT</name>
    <debug>false</debug>
    <enable>
      <condition>
        <and>
          <not>
            <property>autopilot/locks/passive-mode</property>
          </not>
          <equals>
            <property>instrumentation/afds/ap-modes/roll-mode</property>
            <value>ROLLOUT</value>
          </equals>
          <greater-than>
            <property>velocities/groundspeed-kt</property>
            <value>5</value>
          </greater-than>
        </and>
      </condition>
    </enable>
    <input>
      <property>/autopilot/internal/nav1-heading-error-deg</property>
    </input>
    <reference>
      <value>0.0</value>
    </reference>
    <output>
      <property>/controls/flight/rudder</property>
    </output>
    <config>
      <Kp>-0.10</Kp>
      <Ki>0.0</Ki>
      <u_min>-5.0</u_min>
      <u_max>5.0</u_max>
    </config>
  </pi-simple-controller>

  <pid-controller>
    <name>Aileron Control</name>
    <debug>false</debug>
    <enable>
      <property>autopilot/locks/roll-engaged</property>
    </enable>
    <input>
      <property>/orientation/roll-deg</property>
    </input>
    <reference>
      <property>/autopilot/internal/target-roll-deg</property>
    </reference>
    <output>
      <property>/controls/flight/aileron-filter</property>
    </output>
    <config>
      <Kp>
        <condition>
          <greater-than>
            <property>/instrumentation/airspeed-indicator/indicated-mach</property>
            <value>0.666</value>
          </greater-than>
        </condition>
        <value>0.04</value>
      </Kp>
      <Kp>0.095</Kp>
      <Ti>3</Ti>
      <Td>0.001</Td>
      <u_min>
        <value>-0.5</value>
      </u_min>
      <u_max>
        <value>0.5</value>
      </u_max>
    </config>
  </pid-controller>

  <filter>
    <name>Aileron control filter</name>
    <debug>false</debug>
    <type>noise-spike</type>
    <max-rate-of-change>
      <condition>
        <greater-than>
          <property>/instrumentation/airspeed-indicator/indicated-mach</property>
          <value>0.85</value>
        </greater-than>
      </condition>
      <value>0.15</value>
    </max-rate-of-change>
    <max-rate-of-change>
      <condition>
        <greater-than>
          <property>/instrumentation/airspeed-indicator/indicated-mach</property>
          <value>0.666</value>
        </greater-than>
      </condition>
      <value>0.4</value>
    </max-rate-of-change>
    <max-rate-of-change>
      <condition>
        <greater-than>
          <property>/instrumentation/airspeed-indicator/indicated-mach</property>
          <value>0.5</value>
        </greater-than>
      </condition>
      <value>0.8</value>
    </max-rate-of-change>
    <max-rate-of-change>
      <condition>
        <greater-than>
          <property>/instrumentation/airspeed-indicator/indicated-mach</property>
          <value>0.333</value>
        </greater-than>
      </condition>
      <value>0.9</value>
    </max-rate-of-change>
    <max-rate-of-change>.5</max-rate-of-change>   <!-- 1 -->
    <feedback-if-disabled>true</feedback-if-disabled>
    <initialize-to>output</initialize-to>
    <enable>
      <honor-passive>true</honor-passive>
    </enable>
    <input>
      <property>/controls/flight/aileron-filter</property>
    </input>
    <output>/controls/flight/aileron</output>
  </filter>
  <!--
  <pi-simple-controller>
    <name>Rudder Control</name>
    <debug>false</debug>
    <enable>
      <condition>
        <and>
          <not><property>autopilot/locks/passive-mode</property></not>
          <property>gear/gear[1]/wow</property>
        </and>
      </condition>
    </enable>
    <input>
      <property>instrumentation/slip-skid-ball/indicated-slip-skid</property>
    </input>
    <reference>
      <value>0.0</value>
    </reference>
    <output>
      <property>/controls/flight/rudder</property>
    </output>
    <config>
      <Kp>-0.5</Kp>
      <Ki>0.0</Ki>
      <u_min>-0.5</u_min>
      <u_max>0.5</u_max>
    </config>
  </pi-simple-controller>
  -->
  <!-- =============================================================== -->
  <!-- Pitch Axis Modes                                                -->
  <!-- =============================================================== -->
  <pi-simple-controller>
    <name>TO/GA</name>
    <debug>false</debug>
    <enable>
      <property>instrumentation/afds/ap-modes/pitch-mode</property>
      <value>TO/GA</value>
    </enable>
    <input>
      <property>instrumentation/altimeter/indicated-altitude-ft</property>
    </input>
    <reference>
      <value>10000</value>
    </reference>
    <output>
      <property>/autopilot/internal/target-climb-rate-fps</property>
    </output>
    <config>
      <Kp>0.3</Kp>
      <Ki>0.0</Ki>
      <u_min>
        <value>-16.67</value>
      </u_min>
      <u_max>
        <value>33.33</value>
      </u_max>
    </config>
  </pi-simple-controller>

  <pid-controller>
    <name>TO/GA 2</name>
    <debug>false</debug>
    <enable>
      <property>instrumentation/afds/ap-modes/pitch-mode</property>
      <value>TO/GA</value>
    </enable>
    <input>
      <property>/velocities/vertical-speed-fps</property>
    </input>
    <reference>
      <property>/autopilot/internal/target-climb-rate-fps</property>
    </reference>
    <output>
      <property>/autopilot/internal/target-pitch-deg</property>
    </output>
    <config>
      <Ts>0.05</Ts>
      <Kp>0.1</Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>10.0</Ti>
      <Td>0.00001</Td>
      <u_min>
        <property>instrumentation/afds/settings/pitch-min</property>
      </u_min>
      <u_max>
        <property>instrumentation/afds/settings/pitch-max</property>
      </u_max>
    </config>
  </pid-controller>

  <filter>
    <name>Target spped local</name>
    <type>gain</type>
    <gain>1.0</gain>
    <input>
      <property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
    </input>
    <output>
      <property>/autopilot/internal/current-speed-kt</property>
    </output>
  </filter>

  <filter>
    <name>Target speed filter</name>
    <debug>false</debug>
    <type>noise-spike</type>
    <max-rate-of-change>
      <value>1.5</value>
    </max-rate-of-change>
    <max-rate-of-change>50</max-rate-of-change>
    <input>instrumentation/afds/ias-target-kt</input>
    <output>/autopilot/internal/ias-set-kt</output>
  </filter>

  <pid-controller>
    <name>Flight Level Change IAS</name>
    <debug>false</debug>
    <feedback-if-disabled>true</feedback-if-disabled>
    <initialize-to>output</initialize-to>
    <enable>
      <condition>
        <and>
          <or>
            <equals>
              <property>instrumentation/afds/ap-modes/pitch-mode</property>
              <value>FLCH SPD</value>
            </equals>
            <equals>
              <property>instrumentation/afds/ap-modes/pitch-mode</property>
              <value>VNAV SPD</value>
            </equals>
            <and>
              <equals>
                <property>instrumentation/afds/ap-modes/pitch-mode</property>
                <value>VNAV PTH</value>
              </equals>
              <equals>
                <property>instrumentation/afds/inputs/vnav-path-mode</property>
                <value>2</value>
              </equals>
            </and>
          </or>
          <not>
            <property>/instrumentation/afds/inputs/ias-mach-selected</property>
          </not>
        </and>
      </condition>
    </enable>
    <input>
      <property>/autopilot/internal/current-speed-kt</property>
    </input>
    <reference>
      <property>/autopilot/internal/ias-set-kt</property>
    </reference>
    <output>
      <property>/autopilot/internal/flch-pitch-deg</property>
    </output>
    <config>
      <Kp>-0.25</Kp>
      <Ti>
        <condition>
          <greater-than>
            <property>/autopilot/settings/actual-target-altitude-ft</property>
            <property>instrumentation/altimeter/indicated-altitude-ft</property>
          </greater-than>
        </condition>
        <value>30.0</value>
      </Ti>
      <Ti>10.0</Ti>
      <Td>
        <condition>
          <greater-than>
            <property>/autopilot/settings/actual-target-altitude-ft</property>
            <property>instrumentation/altimeter/indicated-altitude-ft</property>
          </greater-than>
        </condition>
        <value>0.0018</value>
      </Td>
      <Td>0.000</Td>
      <u_min>
        <condition>
          <greater-than>
            <property>/autopilot/settings/actual-target-altitude-ft</property>
            <property>instrumentation/altimeter/indicated-altitude-ft</property>
          </greater-than>
        </condition>
        <property>autopilot/internal/current-pitch-deg</property>
      </u_min>
      <u_min>
        <value>-7.0</value>
      </u_min>
      <u_max>
        <condition>
          <greater-than>
            <property>/autopilot/settings/actual-target-altitude-ft</property>
            <property>instrumentation/altimeter/indicated-altitude-ft</property>
          </greater-than>
        </condition>
        <property>instrumentation/afds/settings/pitch-max</property>
      </u_max>
      <u_max>
        <condition>
          <greater-than>
            <property>instrumentation/altimeter/indicated-altitude-ft</property>
            <property>/autopilot/settings/actual-target-altitude-ft</property>
          </greater-than>
        </condition>
        <property>autopilot/internal/current-pitch-deg</property>
      </u_max>
    </config>
  </pid-controller>

  <filter>
    <name>Target mach local</name>
    <type>gain</type>
    <gain>1.0</gain>
    <input>
      <property>/instrumentation/airspeed-indicator/indicated-mach</property>
    </input>
    <output>
      <property>/autopilot/internal/current-mach</property>
    </output>
  </filter>

  <filter>
    <name>Target mach filter</name>
    <type>noise-spike</type>
    <max-rate-of-change>
      <value>0.006</value>
    </max-rate-of-change>
    <max-rate-of-change>0.2</max-rate-of-change>
    <input>/autopilot/settings/target-speed-mach</input>
    <output>/autopilot/internal/mach-set</output>
  </filter>

  <pid-controller>
    <name>Flight Level Change Mach</name>
    <debug>false</debug>
    <feedback-if-disabled>true</feedback-if-disabled>
    <initialize-to>output</initialize-to>
    <enable>
      <condition>
        <and>
          <or>
            <equals>
              <property>instrumentation/afds/ap-modes/pitch-mode</property>
              <value>FLCH SPD</value>
            </equals>
            <equals>
              <property>instrumentation/afds/ap-modes/pitch-mode</property>
              <value>VNAV SPD</value>
            </equals>
            <and>
              <equals>
                <property>instrumentation/afds/ap-modes/pitch-mode</property>
                <value>VNAV PTH</value>
              </equals>
              <equals>
                <property>instrumentation/afds/inputs/vnav-path-mode</property>
                <value>2</value>
              </equals>
            </and>
          </or>
          <property>/instrumentation/afds/inputs/ias-mach-selected</property>
        </and>
      </condition>
    </enable>
    <input>
      <property>/autopilot/internal/current-mach</property>
    </input>
    <reference>
      <prop>/autopilot/internal/mach-set</prop>
    </reference>
    <output>
      <property>/autopilot/internal/flch-pitch-deg</property>
    </output>
    <config>
      <Kp>-75.0</Kp>
      <Ti>10.0</Ti>
      <Td>0</Td>
      <u_min>
        <condition>
          <greater-than>
            <property>/autopilot/settings/actual-target-altitude-ft</property>
            <property>instrumentation/altimeter/indicated-altitude-ft</property>
          </greater-than>
        </condition>
        <property>autopilot/internal/current-pitch-deg</property>
      </u_min>
      <u_min>
        <value>-7.0</value>
      </u_min>
      <u_max>
        <condition>
          <greater-than>
            <property>/autopilot/settings/actual-target-altitude-ft</property>
            <property>instrumentation/altimeter/indicated-altitude-ft</property>
          </greater-than>
        </condition>
        <property>instrumentation/afds/settings/pitch-max</property>
      </u_max>
      <u_max>
        <condition>
          <greater-than>
            <property>instrumentation/altimeter/indicated-altitude-ft</property>
            <property>/autopilot/settings/actual-target-altitude-ft</property>
          </greater-than>
        </condition>
        <property>autopilot/internal/current-pitch-deg</property>
      </u_max>
    </config>
  </pid-controller>

  <filter>
    <name>Target flch pitch</name>
    <debug>false</debug>
    <type>gain</type>
    <gain>1.0</gain>
    <enable>
      <condition>
        <or>
          <equals>
            <property>instrumentation/afds/ap-modes/pitch-mode</property>
            <value>FLCH SPD</value>
          </equals>
          <equals>
            <property>instrumentation/afds/ap-modes/pitch-mode</property>
            <value>VNAV SPD</value>
          </equals>
          <and>
            <equals>
              <property>instrumentation/afds/ap-modes/pitch-mode</property>
              <value>VNAV PTH</value>
            </equals>
            <equals>
              <property>instrumentation/afds/inputs/vnav-path-mode</property>
              <value>2</value>
            </equals>
          </and>
        </or>
      </condition>
    </enable>
    <input>
      <property>/autopilot/internal/flch-pitch-deg</property>
    </input>
    <output>
      <property>/autopilot/internal/target-pitch-deg</property>
    </output>
    <config>
      <u_min>
        <property>instrumentation/afds/settings/pitch-min</property>
      </u_min>
      <u_max>
        <property>instrumentation/afds/settings/pitch-max</property>
      </u_max>
    </config>
  </filter>

  <pi-simple-controller>
    <name>Altitude Stage 1</name>
    <debug>false</debug>
    <enable>
      <condition>
        <or>
          <equals>
            <property>instrumentation/afds/ap-modes/pitch-mode</property>
            <value>ALT</value>
          </equals>
          <and>
            <equals>
              <property>instrumentation/afds/ap-modes/pitch-mode</property>
              <value>V/S</value>
            </equals>
            <equals>
              <property>autopilot/settings/vertical-speed-fpm</property>
              <value>0</value>
            </equals>
          </and>
          <and>
            <equals>
              <property>instrumentation/afds/ap-modes/pitch-mode</property>
              <value>VNAV PTH</value>
            </equals>
            <equals>
              <property>instrumentation/afds/inputs/vnav-path-mode</property>
              <value>0</value>
            </equals>
          </and>
          <equals>
            <property>instrumentation/afds/ap-modes/pitch-mode</property>
            <value>VNAV ALT</value>
          </equals>
        </or>
      </condition>
    </enable>
    <input>
      <property>instrumentation/altimeter/indicated-altitude-ft</property>
    </input>
    <reference>
      <property>/autopilot/settings/actual-target-altitude-ft</property>
    </reference>
    <output>
      <property>/autopilot/internal/target-climb-rate-fps</property>
    </output>
    <config>
      <Kp>0.15</Kp>
      <Ki>0.01</Ki>
      <u_min>
        <value>-20.00</value>
      </u_min>
      <u_max>
        <value>20.00</value>
      </u_max>
    </config>
  </pi-simple-controller>

  <pid-controller>
    <name>Altitude Hold (Altimeter based) Stage 2</name>
    <debug>false</debug>
    <enable>
      <condition>
        <or>
          <equals>
            <property>instrumentation/afds/ap-modes/pitch-mode</property>
            <value>ALT</value>
          </equals>
          <and>
            <equals>
              <property>instrumentation/afds/ap-modes/pitch-mode</property>
              <value>V/S</value>
            </equals>
            <equals>
              <property>autopilot/settings/vertical-speed-fpm</property>
              <value>0</value>
            </equals>
          </and>
          <and>
            <equals>
              <property>instrumentation/afds/ap-modes/pitch-mode</property>
              <value>VNAV PTH</value>
            </equals>
            <equals>
              <property>instrumentation/afds/inputs/vnav-path-mode</property>
              <value>0</value>
            </equals>
          </and>
          <equals>
            <property>instrumentation/afds/ap-modes/pitch-mode</property>
            <value>VNAV ALT</value>
          </equals>
        </or>
      </condition>
    </enable>
    <input>
      <property>/velocities/vertical-speed-fps</property>
    </input>
    <reference>
      <property>/autopilot/internal/target-climb-rate-fps</property>
    </reference>
    <output>
      <property>/autopilot/internal/target-pitch-deg</property>
    </output>
    <config>
      <Kp>
        <condition>
          <greater-than>
            <property>instrumentation/altimeter/indicated-altitude-ft</property>
            <value>26000</value>
          </greater-than>
        </condition>
        <value>0.1</value>
      </Kp>
      <Kp>
        <condition>
          <greater-than>
            <property>instrumentation/altimeter/indicated-altitude-ft</property>
            <value>14000</value>
          </greater-than>
        </condition>
        <value>0.2</value>
      </Kp>
      <Kp>0.5</Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>10.0</Ti>
      <Td>0.005</Td>
      <u_min>
        <property>instrumentation/afds/settings/pitch-min</property>
      </u_min>
      <u_max>
        <property>instrumentation/afds/settings/pitch-max</property>
      </u_max>
    </config>
  </pid-controller>

  <filter>
    <name>Current spped local</name>
    <type>gain</type>
    <gain>1.0</gain>
    <input>
      <property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
    </input>
    <output>
      <property>/autopilot/internal/current-vnavspeed-kt</property>
    </output>
  </filter>

  <pid-controller>
    <name>Glideslop Hold</name>
    <debug>false</debug>
    <enable>
      <property>instrumentation/afds/ap-modes/pitch-mode</property>
      <value>G/S</value>
    </enable>
    <input>
      <property>/velocities/vertical-speed-fps</property>
    </input>
    <reference>
      <property>/instrumentation/nav[0]/gs-rate-of-climb</property>
    </reference>
    <output>
      <property>/autopilot/internal/target-pitch-deg</property>
    </output>
    <config>
      <Kp>0.45</Kp>
      <Td>0.0007</Td>
      <Ti>50.0</Ti>
      <u_min>
        <property>instrumentation/afds/settings/pitch-min</property>
      </u_min>
      <u_max>
        <property>instrumentation/afds/settings/pitch-max</property>
      </u_max>
    </config>
  </pid-controller>

  <pid-controller>
    <name>VS</name>
    <debug>false</debug>
    <enable>
      <condition>
        <or>
          <and>
            <equals>
              <property>instrumentation/afds/ap-modes/pitch-mode</property>
              <value>V/S</value>
            </equals>
            <not>
              <equals>
                <property>autopilot/settings/vertical-speed-fpm</property>
                <value>0</value>
              </equals>
            </not>
          </and>
          <and>
            <equals>
              <property>instrumentation/afds/ap-modes/pitch-mode</property>
              <value>VNAV PTH</value>
            </equals>
            <equals>
              <property>instrumentation/afds/inputs/vnav-path-mode</property>
              <value>1</value>
            </equals>
          </and>
        </or>
      </condition>
    </enable>
    <input>
      <property>/velocities/vertical-speed-fps</property>
    </input>
    <reference>
      <property>/autopilot/settings/vertical-speed-fpm</property>
      <scale>0.01666666</scale>
    </reference>
    <output>
      <property>/autopilot/internal/target-pitch-deg</property>
    </output>
    <config>
      <Ts>0.05</Ts>
      <Kp>0.15</Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>10.0</Ti>
      <Td>0.00001</Td>
      <u_min>
        <property>instrumentation/afds/settings/pitch-min</property>
      </u_min>
      <u_max>
        <property>instrumentation/afds/settings/pitch-max</property>
      </u_max>
    </config>
  </pid-controller>

  <filter>
    <name>Flare end</name>
    <debug>false</debug>
    <type>gain</type>
    <gain>1.0</gain>
    <enable>
      <condition>
        <and>
          <equals>
            <property>instrumentation/afds/ap-modes/pitch-mode</property>
            <value>FLARE</value>
          </equals>
          <less-than>
            <property>position/gear-agl-ft</property>
            <value>0.1</value>
          </less-than>
        </and>
      </condition>
    </enable>
    <input>
      <value>0</value>
    </input>
    <output>
      <property>/autopilot/internal/target-pitch-deg</property>
    </output>
  </filter>

  <pid-controller>
    <name>Flare</name>
    <debug>false</debug>
    <enable>
      <condition>
        <and>
          <equals>
            <property>instrumentation/afds/ap-modes/pitch-mode</property>
            <value>FLARE</value>
          </equals>
          <greater-than>
            <property>position/gear-agl-ft</property>
            <value>0.1</value>
          </greater-than>
        </and>
      </condition>
    </enable>
    <input>
      <property>/velocities/vertical-speed-fps</property>
    </input>
    <reference>
      <property>/autopilot/settings/flare-speed-fps</property>
    </reference>
    <output>
      <property>/autopilot/internal/target-pitch-deg</property>
    </output>
    <config>
      <Ts>0.05</Ts>
      <Kp>
        <property>autopilot/settings/flare-constant</property>
      </Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>40.0</Ti>  <!-- 10 -->
      <Td>0.001</Td>
      <u_min>
        <property>instrumentation/afds/settings/pitch-min</property>
      </u_min>
      <u_max>
        <property>instrumentation/afds/settings/pitch-max</property>
      </u_max>
    </config>
  </pid-controller>

  <pid-controller>
    <name>Flight Path Hold</name>
    <debug>false</debug>
    <enable>
      <property>instrumentation/afds/ap-modes/pitch-mode</property>
      <value>FPA</value>
    </enable>
    <input>
      <property>autopilot/internal/fpa</property>
    </input>
    <reference>
      <property>/autopilot/settings/flight-path-angle</property>
    </reference>
    <output>
      <property>/autopilot/internal/target-pitch-deg</property>
    </output>
    <config>
      <Ts>0.05</Ts>
      <Kp>0.15</Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>1.0</Ti>
      <Td>0.0</Td>
      <u_min>
        <property>instrumentation/afds/settings/pitch-min</property>
      </u_min>
      <u_max>
        <property>instrumentation/afds/settings/pitch-max</property>
      </u_max>
    </config>
  </pid-controller>

  <pid-controller>
    <name>Elevator Control</name>
    <debug>false</debug>
    <enable>
      <property>instrumentation/afds/inputs/AP</property>
    </enable>
    <input>
      <property>/orientation/pitch-deg</property>
    </input>
    <reference>
      <property>/autopilot/internal/target-pitch-deg</property>
    </reference>
    <output>
      <property>/controls/flight/elevator-trim-filter</property>
    </output>
    <config>
      <Kp>-0.024</Kp>
      <Ti>2.0</Ti>
      <Td>0.0</Td>
      <u_min>
        <value>-0.8</value>
      </u_min>
      <u_max>
        <value>0.8</value>
      </u_max>
    </config>
  </pid-controller>

  <filter>
    <name>Elevator control filter</name>
    <debug>false</debug>
    <type>noise-spike</type>
    <enable>
      <property>instrumentation/afds/inputs/AP</property>
    </enable>
    <max-rate-of-change>
      <condition>
        <greater-than>
          <property>/instrumentation/airspeed-indicator/indicated-mach</property>
          <value>0.85</value>
        </greater-than>
      </condition>
      <value>0.05</value>
    </max-rate-of-change>
    <max-rate-of-change>
      <condition>
        <greater-than>
          <property>/instrumentation/airspeed-indicator/indicated-mach</property>
          <value>0.666</value>
        </greater-than>
      </condition>
      <value>0.1</value>
    </max-rate-of-change>
    <max-rate-of-change>
      <condition>
        <greater-than>
          <property>/instrumentation/airspeed-indicator/indicated-mach</property>
          <value>0.5</value>
        </greater-than>
      </condition>
      <value>0.15</value>
    </max-rate-of-change>
    <max-rate-of-change>0.2</max-rate-of-change>
    <feedback-if-disabled>true</feedback-if-disabled>
    <initialize-to>output</initialize-to>
    <input>
      <property>/controls/flight/elevator-trim-filter</property>
    </input>
    <output>/controls/flight/elevator-trim</output>
  </filter>

</PropertyList>
