<?xml version="1.0"?>


<PropertyList>

	<!-- =============================================================== -->
	<!--                        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>
					<equals>
						<property>instrumentation/afds/ap-modes/roll-mode</property>
						<value>TRK SEL</value>
					</equals>
					<equals>
						<property>instrumentation/afds/ap-modes/roll-mode</property>
						<value>TRK HOLD</value>
					</equals>
				</or>
			</condition>
		</enable>
		<input>
			<property>autopilot/internal/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 course error filter</name>
		<debug>false</debug>
		<type>noise-spike</type>
		<enable>
			<property>instrumentation/afds/ap-modes/roll-mode</property>
			<value>LNAV</value>
		</enable>
		<max-rate-of-change>0.2</max-rate-of-change>
		<initialize-to>output</initialize-to>
		<input>
			<property>autopilot/internal/course-error</property>
		</input>
		<output>autopilot/internal/course-error-filtered</output>
	</filter>

	<filter>
		<name>LNAV waypoint error computer/normalizer</name>
		<debug>false</debug>
		<enable>
			<property>autopilot/route-manager/active</property>
		</enable>
		<type>gain</type>
		<input>
			<property>autopilot/internal/course-deg</property>
			<offset>
				<property>orientation/heading-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>

	<filter>
		<name>LNAV course error to 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/internal/waypoint-bearing-error-deg</property>
			<offset>
				<property>autopilot/internal/course-error-filtered</property>
				<scale>1.0</scale>
			</offset>
		</input>
		<output>autopilot/internal/course-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/course-error-deg</property>
		</input>
		<reference>
			<value>0.0</value>
		</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>
  <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 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>

	<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-rudder-air</name>
		<debug>false</debug>
		<enable>
			<condition>
				<and>
					<property>instrumentation/afds/inputs/AP</property>
					<equals>
						<property>instrumentation/afds/ap-modes/roll-mode</property>
						<value>ROLLOUT</value>
					</equals>
					<not><property>gear/gear[0]/wow</property></not>
				</and>
			</condition>
		</enable>
		<input>
			<property>orientation/heading-deg</property>
		</input>
		<reference>
			<property>instrumentation/nav/heading-deg</property>
		</reference>
		<output>
			<property>controls/flight/rudder</property>
		</output>
		<config>
			<Kp>0.03</Kp>
			<Ki>0.01</Ki>
			<u_min>-5.0</u_min>
			<u_max>5.0</u_max>
		</config>
	</pi-simple-controller>

	<pi-simple-controller>
		<name>ROLLOUT-rudder-gnd</name>
		<debug>false</debug>
		<enable>
			<condition>
				<and>
					<property>instrumentation/afds/inputs/AP</property>
					<equals>
						<property>instrumentation/afds/ap-modes/roll-mode</property>
						<value>ROLLOUT</value>
					</equals>
					<property>gear/gear[0]/wow</property>
				</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>

	<pi-simple-controller>
		<name>ROLLOUT-aileron</name>
		<debug>false</debug>
		<enable>
			<condition>
				<and>
					<property>instrumentation/afds/inputs/AP</property>
					<equals>
						<property>instrumentation/afds/ap-modes/roll-mode</property>
						<value>ROLLOUT</value>
					</equals>
				</and>
			</condition>
		</enable>
		<input>
			<property>orientation/roll-deg</property>
		</input>
		<reference>
			<value>/orientation/side-slip-deg</value>
			<scale>-1.0</scale> <!-- change in side-slip sign as reported by yasim, see bug #901 -->
		</reference>
		<output>
			<property>autopilot/internal/target-roll-deg</property>
		</output>
		<config>
			<Kp>5.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>Aileron Control</name>
		<debug>false</debug>
		<enable>
			<property>instrumentation/afds/inputs/AP</property>
		</enable>
		<input>
			<property>orientation/roll-deg</property>
		</input>
		<reference>
			<property>autopilot/internal/target-roll-deg</property>
		</reference>
		<output>
			<property>controls/flight/aileron</property>
		</output>
		<config>
			<Kp>
				<condition>
					<greater-than>
						<property>instrumentation/airspeed-indicator/indicated-mach</property>
						<value>0.666</value>
					</greater-than>
				</condition>
				<value>0.01</value>
			</Kp>
			<Kp>0.02</Kp>
			<Ti>10</Ti>
			<Td>0.0</Td>
			<u_min>
				<value>-1.0</value>
			</u_min>
			<u_max>
				<value>1.0</value>
			</u_max>
		</config>
	</pi-simple-controller>

	<pi-simple-controller>
		<name>Rudder Control</name>
		<debug>false</debug>
		<enable>
			<condition>
				<and>
					<property>instrumentation/afds/inputs/AP</property>
					<not><property>gear/gear[1]/wow</property></not>
					<not>
						<equals>
							<property>instrumentation/afds/ap-modes/roll-mode</property>
							<value>ROLLOUT</value>
						</equals>
					</not>
				</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.15</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>
		<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>
		<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>
				<value>0</value>
			</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>
		<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>
		<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>
				<value>0</value>
			</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>

	<filter>
		<name>Current GSVspped local</name> 
		<debug>false</debug>
		<type>gain</type>
		<gain>1.0</gain>
		<enable>
			<condition>
				<greater-than>
					<property>position/gear-agl-ft</property>
					<value>150.0</value>
				</greater-than>
			</condition>
		</enable>
		<input>
			<property>instrumentation/nav[0]/gs-rate-of-climb</property>
		</input>
		<output>
			<property>autopilot/internal/current-gs-rate-of-climb</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>autopilot/internal/current-gs-rate-of-climb</property>
		</reference>
		<output>
			<property>autopilot/internal/target-pitch-deg</property>
		</output>
		<config>
			<Kp>0.63</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>-3.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>10.0</Ti>
			<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-filter</property>
		</output>
		<config>
			<Kp>
				<condition>
					<equals>
						<property>instrumentation/afds/ap-modes/pitch-mode</property>
						<value>G/S</value>
					</equals>
				</condition>
				<value>-0.024</value>
			</Kp>
			<Kp>-0.018</Kp>
			<Ti>2.0</Ti>
			<Td>0.0</Td>
			<u_min>
				<value>-1.0</value>
			</u_min>
			<u_max>
				<value>1.0</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>
		<initialize-to>output</initialize-to>
		<input>
			<property>controls/flight/elevator-filter</property>
		</input>
		<output>/controls/flight/elevator</output>
	</filter>

 	<pid-controller>
		<name>Stabilizer Control</name>
		<debug>false</debug>
		<enable>
			<property>instrumentation/afds/inputs/AP</property>
		</enable>
		<input>
			<property>controls/flight/elevator</property>
		</input>
		<reference>
			<value>0</value>
		</reference>
		<output>
			<property>controls/flight/elevator-trim</property>
		</output>
		<config>
			<Kp>-0.05</Kp>
			<Ti>10.0</Ti>
			<Td>0.0</Td>
			<u_min>
				<value>-1.0</value>
			</u_min>
			<u_max>
				<value>1.0</value>
			</u_max>
		</config>
	</pid-controller>

	<filter>
		<name>Tiller control filter nose</name>
		<debug>false</debug>
		<type>noise-spike</type>
		<max-rate-of-change>
			<value>0.2</value>
		</max-rate-of-change>
		<input>controls/gear/nosegear-steering-cmd</input>
		<output>controls/gear/nosegear-steering-cmd-norm</output>
	</filter>

	<filter>
		<name>Tiller control filter main</name>
		<debug>false</debug>
		<type>noise-spike</type>
		<max-rate-of-change>
			<value>0.2</value>
		</max-rate-of-change>
		<input>controls/gear/maingear-steering-cmd</input>
		<output>controls/gear/maingear-steering-cmd-norm</output>
	</filter>

</PropertyList>
