<?xml version="1.0"?>

<!-- Copyright (c) 2026 Josh Davidson (Octal450) -->

<PropertyList>
	
	<filter>
		<name>A/THR Knots Lag</name>
		<type>exponential</type>
		<input>/it-autoflight/internal/kts-input-avg</input>
		<output>/it-autoflight/internal/athr-kts-input-lag</output>
		<filter-time>0.64</filter-time>
	</filter>
	
	<filter>
		<name>A/THR Knots Rate</name>
		<type>derivative</type>
		<input>/it-autoflight/internal/athr-kts-input-lag</input>
		<output>/it-autoflight/internal/athr-kts-rate-raw</output>
		<min>-10</min>
		<max>10</max>
		<filter-time>1.0</filter-time>
	</filter>
	
	<filter>
		<name>A/THR Rate Filter</name>
		<type>exponential</type>
		<input>
			<condition>
				<less-than>
					<property>/velocities/airspeed-kt</property>
					<value>1</value>
				</less-than>
			</condition>
			<value>0</value>
		</input>
		<input>/it-autoflight/internal/athr-kts-rate-raw</input>
		<output>/it-autoflight/internal/athr-rate</output>
		<filter-time>0.04</filter-time>
	</filter>
	
	<filter>
		<name>A/THR Knots Input Gain</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>/it-autoflight/input/kts</input>
		<output>/it-autoflight/internal/athr-kts-cmd</output>
		<min>/systems/fcc/speeds/vmin</min>
		<max>/systems/fcc/speeds/vmax</max>
	</filter>
	
	<filter>
		<name>A/THR Knots Input Filter</name>
		<type>noise-spike</type>
		<feedback-if-disabled>true</feedback-if-disabled>
		<initialize-to>output</initialize-to>
		<input>/it-autoflight/internal/athr-kts-cmd</input>
		<output>/it-autoflight/internal/athr-kts</output>
		<max-rate-of-change>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>0</value>
					</equals>
					<equals>
						<property>/gear/gear[1]/wow</property>
						<value>0</value>
					</equals>
					<equals>
						<property>/gear/gear[2]/wow</property>
						<value>0</value>
					</equals>
				</and>
			</condition>
			<value>10</value>
		</max-rate-of-change>
		<max-rate-of-change>200</max-rate-of-change>
	</filter>
	
	<filter>
		<name>A/THR Rate Command</name>
		<type>gain</type>
		<gain>
			<expression>
				<table> <!-- As thrust decreases with altitude, correction must be less aggressive -->
					<property>/position/altitude-ft</property>
					<entry><ind>    0</ind><dep>1.0</dep></entry>
					<entry><ind>50000</ind><dep>0.7</dep></entry>
				</table>
			</expression>
		</gain>
		<input>
			<expression>
				<product>
					<difference>
						<property>/it-autoflight/internal/athr-kts</property>
						<property>/it-autoflight/internal/kts-asi-lag</property>
					</difference>
					<value>0.15</value>
				</product>
			</expression>
		</input>
		<output>/it-autoflight/internal/athr-rate-cmd-raw</output>
		<min>-10</min>
		<max>10</max>
	</filter>
	
	<filter>
		<name>A/THR Rate Command Filter</name>
		<type>noise-spike</type>
		<feedback-if-disabled>true</feedback-if-disabled>
		<initialize-to>output</initialize-to>
		<input>/it-autoflight/internal/athr-rate-cmd-raw</input>
		<output>/it-autoflight/internal/athr-rate-cmd</output>
		<max-rate-of-change>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>0</value>
					</equals>
				</and>
			</condition>
			<value>3</value>
		</max-rate-of-change>
		<max-rate-of-change>100</max-rate-of-change>
	</filter>
	
	<filter>
		<name>A/THR Rate Error</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>/it-autoflight/internal/athr-rate</input>
		<reference>/it-autoflight/internal/athr-rate-cmd</reference>
		<output>/it-autoflight/internal/athr-rate-error</output>
	</filter>
	
	<filter>
		<name>A/THR Max Command</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<expression>
				<max>
					<property>/systems/engines/control-1/ats-max</property>
					<property>/systems/engines/control-2/ats-max</property>
					<property>/systems/engines/control-3/ats-max</property>
				</max>
			</expression>
		</input>
		<output>/it-autoflight/internal/ats-max</output>
	</filter>
	
	<pid-controller>
		<name>IT-CONTROLLER: Speed/Mach</name>
		<enable>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>0</value>
					</equals>
				</and>
			</condition>
		</enable>
		<input>/it-autoflight/internal/athr-rate-error</input>
		<reference>0</reference>
		<output>/it-autoflight/internal/throttle-cmd-raw-pid</output>
		<config>
			<Kp>
				<expression>
					<table> <!-- As thrust decreases with altitude, more delta throttle is required -->
						<property>/position/altitude-ft</property>
						<entry><ind>    0</ind><dep>0.06</dep></entry>
						<entry><ind>50000</ind><dep>0.08</dep></entry>
					</table>
				</expression>
			</Kp>
			<Ti>1.2</Ti>
			<Td>0.0</Td>
			<u_min>
				<expression>
					<pow>
						<max>
							<property>/systems/engines/limit/idle-norm</property>
							<sum>
								<property>/it-autoflight/internal/throttle-cmd</property>
								<value>-0.005</value> <!-- For 60Hz and 0.3/sec -->
							</sum>
						</max>
						<value>1.4</value>
					</pow>
				</expression>
			</u_min>
			<u_max>
				<expression>
					<pow>
						<min>
							<property>/it-autoflight/internal/ats-max</property>
							<sum>
								<property>/it-autoflight/internal/throttle-cmd</property>
								<value>0.005</value> <!-- For 60Hz and 0.3/sec -->
							</sum>
						</min>
						<value>1.4</value>
					</pow>
				</expression>
			</u_max>
		</config>
	</pid-controller>
	
	<filter>
		<name>Speed/Mach Shaping</name>
		<type>gain</type>
		<gain>1.0</gain>
		<enable>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>0</value>
					</equals>
				</and>
			</condition>
		</enable>
		<input>
			<expression>
				<pow>
					<property>/it-autoflight/internal/throttle-cmd-raw-pid</property>
					<div>
						<value>1</value>
						<value>1.4</value>
					</div>
				</pow>
			</expression>
		</input>
		<output>/it-autoflight/internal/throttle-cmd-raw-shape</output>
	</filter>
	
	<filter>
		<name>Speed/Mach Inactive Sync</name>
		<type>gain</type>
		<gain>1.0</gain>
		<enable>
			<condition>
				<or>
					<not><property>/it-autoflight/output/athr-on</property></not>
					<not-equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>0</value>
					</not-equals>
				</or>
			</condition>
		</enable>
		<input>
			<expression>
				<pow>
					<property>/it-autoflight/internal/throttle-cmd-raw-shape</property>
					<value>1.4</value>
				</pow>
			</expression>
		</input>
		<output>/it-autoflight/internal/throttle-cmd-raw-pid</output>
	</filter>
	
	<filter>
		<name>Speed/Mach Filter</name>
		<type>noise-spike</type>
		<feedback-if-disabled>true</feedback-if-disabled>
		<initialize-to>output</initialize-to>
		<enable>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>0</value>
					</equals>
				</and>
			</condition>
		</enable>
		<input>/it-autoflight/internal/throttle-cmd-raw-shape</input>
		<output>/it-autoflight/internal/throttle-cmd</output>
		<max-rate-of-change>0.3</max-rate-of-change>
	</filter>
	
	<filter>
		<name>IT-CONTROLLER: Idle Limit</name>
		<type>noise-spike</type>
		<initialize-to>output</initialize-to>
		<enable>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>1</value>
					</equals>
				</and>
			</condition>
		</enable>
		<input>0</input>
		<output>/it-autoflight/internal/throttle-cmd</output>
		<max-rate-of-change>
			<condition>
				<or>
					<equals>
						<property>/gear/gear[1]/wow</property>
						<value>1</value>
					</equals>
					<equals>
						<property>/gear/gear[2]/wow</property>
						<value>1</value>
					</equals>
				</or>
			</condition>
			<value>0.3</value>
		</max-rate-of-change>
		<max-rate-of-change>0.05</max-rate-of-change>
	</filter>
	
	<filter>
		<name>IT-CONTROLLER: Thrust Limit</name>
		<type>noise-spike</type>
		<initialize-to>output</initialize-to>
		<enable>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>2</value>
					</equals>
				</and>
			</condition>
		</enable>
		<input>/it-autoflight/internal/ats-max</input>
		<output>/it-autoflight/internal/throttle-cmd</output>
		<max-rate-of-change>0.15</max-rate-of-change>
	</filter>
	
	<filter>
		<name>Power Norm Engine 1</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>PW</value>
				</equals>
			</condition>
			<expression> <!-- EPR non-linearity makes it hard -->
				<table>
					<property>/engines/engine[0]/n1-actual</property>
					<entry><ind> 24.7</ind><dep>0</dep></entry>
					<entry><ind>105.0</ind><dep>1</dep></entry>
				</table>
			</expression>
		</input>
		<input>
			<condition>
				<property>/options/series-10</property>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[0]/n1-actual</property>
					<entry><ind> 22.6</ind><dep>0</dep></entry>
					<entry><ind>111.0</ind><dep>1</dep></entry>
				</table>
			</expression>
		</input>
		<input>
			<expression>
				<table>
					<property>/engines/engine[0]/n1-actual</property>
					<entry><ind> 22.6</ind><dep>0</dep></entry>
					<entry><ind>119.5</ind><dep>1</dep></entry>
				</table>
			</expression>
		</input>
		<output>/systems/engines/power-norm[0]</output>
	</filter>
	
	<filter>
		<name>Power Norm Engine 2</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>PW</value>
				</equals>
			</condition>
			<expression> <!-- EPR non-linearity makes it hard -->
				<table>
					<property>/engines/engine[1]/n1-actual</property>
					<entry><ind> 24.7</ind><dep>0</dep></entry>
					<entry><ind>105.0</ind><dep>1</dep></entry>
				</table>
			</expression>
		</input>
		<input>
			<condition>
				<property>/options/series-10</property>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[1]/n1-actual</property>
					<entry><ind> 22.6</ind><dep>0</dep></entry>
					<entry><ind>111.0</ind><dep>1</dep></entry>
				</table>
			</expression>
		</input>
		<input>
			<expression>
				<table>
					<property>/engines/engine[1]/n1-actual</property>
					<entry><ind> 22.6</ind><dep>0</dep></entry>
					<entry><ind>119.5</ind><dep>1</dep></entry>
				</table>
			</expression>
		</input>
		<output>/systems/engines/power-norm[1]</output>
	</filter>
	
	<filter>
		<name>Power Norm Engine 3</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>PW</value>
				</equals>
			</condition>
			<expression> <!-- EPR non-linearity makes it hard -->
				<table>
					<property>/engines/engine[2]/n1-actual</property>
					<entry><ind> 24.7</ind><dep>0</dep></entry>
					<entry><ind>105.0</ind><dep>1</dep></entry>
				</table>
			</expression>
		</input>
		<input>
			<condition>
				<property>/options/series-10</property>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[2]/n1-actual</property>
					<entry><ind> 22.6</ind><dep>0</dep></entry>
					<entry><ind>111.0</ind><dep>1</dep></entry>
				</table>
			</expression>
		</input>
		<input>
			<expression>
				<table>
					<property>/engines/engine[2]/n1-actual</property>
					<entry><ind> 22.6</ind><dep>0</dep></entry>
					<entry><ind>119.5</ind><dep>1</dep></entry>
				</table>
			</expression>
		</input>
		<output>/systems/engines/power-norm[2]</output>
	</filter>
	
	<pid-controller>
		<name>System Command: Throttle 1</name> <!-- Simulates "hunting" -->
		<enable>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<not-equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>3</value> <!-- Clamp -->
					</not-equals>
				</and>
			</condition>
		</enable>
		<input>/systems/engines/power-norm[0]</input>
		<reference>
			<expression>
				<min> <!-- For per engine manual N1/EPR limit -->
					<property>/it-autoflight/internal/throttle-cmd</property>
					<property>/systems/engines/control-1/ats-max</property>
				</min>
			</expression>
		</reference>
		<output>/systems/engines/ats-power-cmd[0]</output>
		<config>
			<Kp>0.4</Kp>
			<Ti>0.8</Ti>
			<Td>0.0</Td>
			<u_min>
				<condition>
					<equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>1</value>
					</equals>
				</condition>
				<value>0</value>
			</u_min>
			<u_min>
				<expression>
					<max>
						<difference>
							<property>/systems/engines/power-norm[0]</property>
							<value>0.1</value>
						</difference>
						<value>0</value>
					</max>
				</expression>
			</u_min>
			<u_max>
				<expression>
					<min>
						<sum>
							<property>/systems/engines/power-norm[0]</property>
							<value>0.1</value>
						</sum>
						<value>1</value>
					</min>
				</expression>
			</u_max>
		</config>
	</pid-controller>
	
	<pid-controller>
		<name>System Command: Throttle 2</name> <!-- Simulates "hunting" -->
		<enable>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<not-equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>3</value> <!-- Clamp -->
					</not-equals>
				</and>
			</condition>
		</enable>
		<input>/systems/engines/power-norm[1]</input>
		<reference>
			<expression>
				<min> <!-- For per engine manual N1/EPR limit -->
					<property>/it-autoflight/internal/throttle-cmd</property>
					<property>/systems/engines/control-2/ats-max</property>
				</min>
			</expression>
		</reference>
		<output>/systems/engines/ats-power-cmd[1]</output>
		<config>
			<Kp>0.4</Kp>
			<Ti>0.8</Ti>
			<Td>0.0</Td>
			<u_min>
				<condition>
					<equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>1</value>
					</equals>
				</condition>
				<value>0</value>
			</u_min>
			<u_min>
				<expression>
					<max>
						<difference>
							<property>/systems/engines/power-norm[1]</property>
							<value>0.1</value>
						</difference>
						<value>0</value>
					</max>
				</expression>
			</u_min>
			<u_max>
				<expression>
					<min>
						<sum>
							<property>/systems/engines/power-norm[1]</property>
							<value>0.1</value>
						</sum>
						<value>1</value>
					</min>
				</expression>
			</u_max>
		</config>
	</pid-controller>
	
	<pid-controller>
		<name>System Command: Throttle 3</name> <!-- Simulates "hunting" -->
		<enable>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<not-equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>3</value> <!-- Clamp -->
					</not-equals>
				</and>
			</condition>
		</enable>
		<input>/systems/engines/power-norm[2]</input>
		<reference>
			<expression>
				<min> <!-- For per engine manual EPR limit -->
					<property>/it-autoflight/internal/throttle-cmd</property>
					<property>/systems/engines/control-3/ats-max</property>
				</min>
			</expression>
		</reference>
		<output>/systems/engines/ats-power-cmd[2]</output>
		<config>
			<Kp>0.4</Kp>
			<Ti>0.8</Ti>
			<Td>0.0</Td>
			<u_min>
				<condition>
					<equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>1</value>
					</equals>
				</condition>
				<value>0</value>
			</u_min>
			<u_min>
				<expression>
					<max>
						<difference>
							<property>/systems/engines/power-norm[2]</property>
							<value>0.1</value>
						</difference>
						<value>0</value>
					</max>
				</expression>
			</u_min>
			<u_max>
				<expression>
					<min>
						<sum>
							<property>/systems/engines/power-norm[2]</property>
							<value>0.1</value>
						</sum>
						<value>1</value>
					</min>
				</expression>
			</u_max>
		</config>
	</pid-controller>
	
	<filter>
		<name>System Command: Throttle Inactive Sync</name>
		<type>gain</type>
		<gain>1.0</gain>
		<enable>
			<condition>
				<or>
					<not><property>/it-autoflight/output/athr-on</property></not>
					<equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>3</value> <!-- Clamp -->
					</equals>
				</or>
			</condition>
		</enable>
		<input>/systems/engines/throttle-compare-max</input>
		<output>/systems/engines/ats-power-cmd[0]</output>
		<output>/systems/engines/ats-power-cmd[1]</output>
		<output>/systems/engines/ats-power-cmd[2]</output>
		<output>/it-autoflight/internal/throttle-cmd</output>
	</filter>
	
	<!-- Engine 1 -->
	<filter>
		<name>System Command: Throttle 1 Filter</name>
		<type>noise-spike</type>
		<initialize-to>output</initialize-to>
		<input>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<not-equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>3</value> <!-- Clamp -->
					</not-equals>
				</and>
			</condition>
			<property>/systems/engines/ats-power-cmd[0]</property>
		</input>
		<input>/controls/cockpit/throttle-lever[0]</input>
		<output>/systems/engines/ats-cmd-1</output>
		<max-rate-of-change>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<not-equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>3</value> <!-- Clamp -->
					</not-equals>
				</and>
			</condition>
			<value>0.2</value>
		</max-rate-of-change>
		<max-rate-of-change>100</max-rate-of-change>
	</filter>
	
	<filter>
		<name>System Command: Throttle Backdrive 1</name>
		<type>gain</type>
		<gain>1.0</gain>
		<enable>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<not-equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>3</value> <!-- Clamp -->
					</not-equals>
				</and>
			</condition>
		</enable>
		<input>/systems/engines/ats-cmd-1</input>
		<output>/controls/engines/engine[0]/throttle</output>
	</filter>
	
	<!-- Engine 2 -->
	<filter>
		<name>System Command: Throttle 2 Filter</name>
		<type>noise-spike</type>
		<initialize-to>output</initialize-to>
		<input>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<not-equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>3</value> <!-- Clamp -->
					</not-equals>
				</and>
			</condition>
			<property>/systems/engines/ats-power-cmd[1]</property>
		</input>
		<input>/controls/cockpit/throttle-lever[1]</input>
		<output>/systems/engines/ats-cmd-2</output>
		<max-rate-of-change>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<not-equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>3</value> <!-- Clamp -->
					</not-equals>
				</and>
			</condition>
			<value>0.2</value>
		</max-rate-of-change>
		<max-rate-of-change>100</max-rate-of-change>
	</filter>
	
	<filter>
		<name>System Command: Throttle Backdrive 2</name>
		<type>gain</type>
		<gain>1.0</gain>
		<enable>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<not-equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>3</value> <!-- Clamp -->
					</not-equals>
				</and>
			</condition>
		</enable>
		<input>/systems/engines/ats-cmd-2</input>
		<output>/controls/engines/engine[1]/throttle</output>
	</filter>
	
	<!-- Engine 3 -->
	<filter>
		<name>System Command: Throttle 3 Filter</name>
		<type>noise-spike</type>
		<initialize-to>output</initialize-to>
		<input>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<not-equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>3</value> <!-- Clamp -->
					</not-equals>
				</and>
			</condition>
			<property>/systems/engines/ats-power-cmd[2]</property>
		</input>
		<input>/controls/cockpit/throttle-lever[2]</input>
		<output>/systems/engines/ats-cmd-3</output>
		<max-rate-of-change>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<not-equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>3</value> <!-- Clamp -->
					</not-equals>
				</and>
			</condition>
			<value>0.2</value>
		</max-rate-of-change>
		<max-rate-of-change>100</max-rate-of-change>
	</filter>
	
	<filter>
		<name>System Command: Throttle Backdrive 3</name>
		<type>gain</type>
		<gain>1.0</gain>
		<enable>
			<condition>
				<and>
					<property>/it-autoflight/output/athr-on</property>
					<not-equals>
						<property>/it-autoflight/output/thr-mode</property>
						<value>3</value> <!-- Clamp -->
					</not-equals>
				</and>
			</condition>
		</enable>
		<input>/systems/engines/ats-cmd-3</input>
		<output>/controls/engines/engine[2]/throttle</output>
	</filter>

</PropertyList>
