<?xml version="1.0" encoding="UTF-8"?>

<!--
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
-->

<!-- A3XX CFM56/CFM Leap/PW PurePower FADEC -->
<!-- Joshua Davidson (it0uchpods) -->

<PropertyList>

	<filter>
		<name>OAT Thrust Scale</name>
		<type>gain</type>
		<gain>1.0</gain>
		<update-interval-secs type="double">0.05</update-interval-secs>
		<input> 
			<expression>
				<table>
					<property>/environment/temperature-degc</property>
					<entry><ind> 70</ind><dep>0.788</dep></entry>
					<entry><ind> 40</ind><dep>0.813</dep></entry>
					<entry><ind>-60</ind><dep>1.000</dep></entry>
				</table>
			</expression>
		</input>
		<output>/controls/engines/throttle-scale</output>
	</filter>
	
	<filter>
		<name>FLX Thrust Scale</name>
		<type>gain</type>
		<gain>1.0</gain>
		<update-interval-secs type="double">0.05</update-interval-secs>
		<input> 
			<expression>
				<table>
					<property>/FMGC/internal/flex</property>
					<entry><ind> 70</ind><dep>0.788</dep></entry>
					<entry><ind> 40</ind><dep>0.813</dep></entry>
					<entry><ind>-60</ind><dep>1.000</dep></entry>
				</table>
			</expression>
		</input>
		<output>/engines/flx-throttle</output>
	</filter>

	<filter>
		<name>IDLE Limit</name>
		<type>gain</type>
		<gain>1.0</gain>
		<update-interval-secs type="double">0.05</update-interval-secs>
		<input>
			<condition>
				<and>
					<not-equals>
						<property>/controls/flight/flap-lever</property>
						<value>0</value>
					</not-equals>
					<equals>
						<property>/gear/gear[0]/wow</property>
						<value>0</value>
					</equals>
				</and>
			</condition>
			<value>0.1</value>
		</input>
		<input>
			<condition>
				<equals>
					<property>/gear/gear[0]/wow</property>
					<value>0</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/position/altitude-ft</property> 
					<entry><ind>    0</ind><dep>0.035</dep></entry>
					<entry><ind>42000</ind><dep>0.285</dep></entry>
				</table>
			</expression>
		</input>
		<input>0</input>
		<output>/controls/engines/idle-limit</output>
	</filter>

	<filter>
		<name>MAN One</name>
		<type>gain</type>
		<gain>1.0</gain>
		<update-interval-secs type="double">0.05</update-interval-secs>
		<input> 
			<expression>
				<table>
					<property>/controls/engines/engine[0]/throttle-pos</property>
					<entry><ind>0.00</ind><dep>0.00</dep></entry>
					<entry><ind>0.01</ind><dep>0.00</dep></entry>
					<entry><ind>0.60</ind><dep>0.91</dep></entry>
					<entry><ind>0.65</ind><dep>0.91</dep></entry>
					<entry><ind>0.78</ind><dep>0.95</dep></entry>
					<entry><ind>0.83</ind><dep>0.95</dep></entry>
					<entry><ind>0.95</ind><dep>0.99</dep></entry>
				</table>
			</expression>
		</input>
		<output>/controls/engines/engine[0]/throttle-man</output>
	</filter>
	
	<filter>
		<name>MAN Two</name>
		<type>gain</type>
		<gain>1.0</gain>
		<update-interval-secs type="double">0.05</update-interval-secs>
		<input> 
			<expression>
				<table>
					<property>/controls/engines/engine[1]/throttle-pos</property>
					<entry><ind>0.00</ind><dep>0.00</dep></entry>
					<entry><ind>0.01</ind><dep>0.00</dep></entry>
					<entry><ind>0.60</ind><dep>0.91</dep></entry>
					<entry><ind>0.65</ind><dep>0.91</dep></entry>
					<entry><ind>0.78</ind><dep>0.95</dep></entry>
					<entry><ind>0.83</ind><dep>0.95</dep></entry>
					<entry><ind>0.95</ind><dep>0.99</dep></entry>
				</table>
			</expression>
		</input>
		<output>/controls/engines/engine[1]/throttle-man</output>
	</filter>
	
	<filter>
		<name>MAN CMD One</name>
		<type>gain</type>
		<gain>1.0</gain>
		<update-interval-secs type="double">0.05</update-interval-secs>
		<input> 
			<expression>
				<product>
					<table>
						<property>/controls/engines/engine[0]/throttle-pos</property>
						<entry><ind>0.00</ind><dep>0.00</dep></entry>
						<entry><ind>0.01</ind><dep>0.00</dep></entry>
						<entry><ind>0.60</ind><dep>0.91</dep></entry>
						<entry><ind>0.65</ind><dep>0.91</dep></entry>
						<entry><ind>0.78</ind><dep>0.95</dep></entry>
						<entry><ind>0.83</ind><dep>0.95</dep></entry>
						<entry><ind>0.95</ind><dep>0.99</dep></entry>
					</table>
					<property>/controls/engines/throttle-scale</property>
				</product>
			</expression>
		</input>
		<output>/controls/engines/engine[0]/throttle-cmd-man</output>
	</filter>
	
	<filter>
		<name>MAN CMD Two</name>
		<type>gain</type>
		<gain>1.0</gain>
		<update-interval-secs type="double">0.05</update-interval-secs>
		<input> 
			<expression>
				<product>
					<table>
						<property>/controls/engines/engine[1]/throttle-pos</property>
						<entry><ind>0.00</ind><dep>0.00</dep></entry>
						<entry><ind>0.01</ind><dep>0.00</dep></entry>
						<entry><ind>0.60</ind><dep>0.91</dep></entry>
						<entry><ind>0.65</ind><dep>0.91</dep></entry>
						<entry><ind>0.78</ind><dep>0.95</dep></entry>
						<entry><ind>0.83</ind><dep>0.95</dep></entry>
						<entry><ind>0.95</ind><dep>0.99</dep></entry>
					</table>
					<property>/controls/engines/throttle-scale</property>
				</product>
			</expression>
		</input>
		<output>/controls/engines/engine[1]/throttle-cmd-man</output>
	</filter>
	
	<filter>
		<name>N1 CMD 1</name>
		<type>gain</type>
		<gain>1.0</gain>
		<update-interval-secs type="double">0.05</update-interval-secs>
		<input>
			<condition>
				<and>
					<equals>
						<property>/controls/engines/thrust-limit</property>
						<value>FLX</value>
					</equals>
					<equals>
						<property>/systems/thrust/state1</property>
						<value>MCT</value>
					</equals>
				</and>
			</condition>
			<expression>
				<table>
					<product>
						<value>0.99</value>
						<property>/engines/flx-throttle</property>
					</product>
					<entry><ind>0.00</ind><dep> 19.7</dep></entry>
					<entry><ind>1.00</ind><dep>103.8</dep></entry>
				</table>
			</expression>
		</input>
		<input>
			<expression>
				<table>
					<property>/controls/engines/engine[0]/throttle-cmd-man</property>
					<entry><ind>0.00</ind><dep> 19.7</dep></entry>
					<entry><ind>1.00</ind><dep>103.8</dep></entry>
				</table>
			</expression>
		</input>
		<output>/engines/engine[0]/n1-actual-cmd</output>
	</filter>
	
	<filter>
		<name>N1 CMD 2</name>
		<type>gain</type>
		<gain>1.0</gain>
		<update-interval-secs type="double">0.05</update-interval-secs>
		<input>
			<condition>
				<and>
					<equals>
						<property>/controls/engines/thrust-limit</property>
						<value>FLX</value>
					</equals>
					<equals>
						<property>/systems/thrust/state2</property>
						<value>MCT</value>
					</equals>
				</and>
			</condition>
			<expression>
				<table>
					<product>
						<value>0.99</value>
						<property>/engines/flx-throttle</property>
					</product>
					<entry><ind>0.00</ind><dep> 19.7</dep></entry>
					<entry><ind>1.00</ind><dep>103.8</dep></entry>
				</table>
			</expression>
		</input>
		<input>
			<expression>
				<table>
					<property>/controls/engines/engine[1]/throttle-cmd-man</property>
					<entry><ind>0.00</ind><dep> 19.7</dep></entry>
					<entry><ind>1.00</ind><dep>103.8</dep></entry>
				</table>
			</expression>
		</input>
		<output>/engines/engine[1]/n1-actual-cmd</output>
	</filter>
	
	<filter>
		<name>Throttle 1</name>
		<debug>false</debug>
		<type>gain</type>
		<gain>1.0</gain>
		<enable>
			<condition>
				<and>
					<equals>
						<property>/systems/thrust/alpha-floor</property>
						<value>0</value>
					</equals>
					<equals>
						<property>/systems/thrust/toga-lk</property>
						<value>0</value>
					</equals>
					<or>
						<and>
							<equals>
								<property>/systems/thrust/eng-out</property>
								<value>1</value>
							</equals>
							<equals>
								<property>/systems/thrust/lim-flex</property>
								<value>0</value>
							</equals>
							<equals>
								<property>/systems/thrust/state1</property>
								<value>MCT</value>
							</equals>
						</and>
						<equals>
							<property>/systems/thrust/state1</property>
							<value>MAN THR</value>
						</equals>
						<equals>
							<property>/systems/thrust/state1</property>
							<value>CL</value>
						</equals>
						<equals>
							<property>/systems/thrust/state1</property>
							<value>MAN</value>
						</equals>
						<equals>
							<property>/systems/thrust/state1</property>
							<value>IDLE</value>
						</equals>
					</or>
				</and>
			</condition>
		</enable>
		<input>
			<condition>
				<or>
					<and>
						<equals>
							<property>/systems/thrust/eng-out</property>
							<value>0</value>
						</equals>
						<less-than>
							<property>/controls/engines/engine[0]/throttle-pos</property>
							<value>0.83</value>
						</less-than>
						<equals>
							<property>/systems/thrust/state1</property>
							<value>MAN THR</value>
						</equals>
					</and>
					<and>
						<greater-than-equals>
							<property>/controls/engines/engine[0]/throttle-pos</property>
							<value>0.83</value>
						</greater-than-equals>
						<equals>
							<property>/systems/thrust/state1</property>
							<value>MAN THR</value>
						</equals>
					</and>
					<and>
						<equals>
							<property>/it-autoflight/output/athr</property>
							<value>0</value>
						</equals>
						<or>
							<and>
								<equals>
									<property>/systems/thrust/eng-out</property>
									<value>1</value>
								</equals>
								<equals>
									<property>/systems/thrust/lim-flex</property>
									<value>0</value>
								</equals>
								<equals>
									<property>/systems/thrust/state1</property>
									<value>MCT</value>
								</equals>
							</and>
							<and>
								<equals>
									<property>/systems/thrust/eng-out</property>
									<value>1</value>
								</equals>
								<equals>
									<property>/systems/thrust/state1</property>
									<value>MAN THR</value>
								</equals>
							</and>
							<equals>
								<property>/systems/thrust/state1</property>
								<value>CL</value>
							</equals>
							<equals>
								<property>/systems/thrust/state1</property>
								<value>MAN</value>
							</equals>
							<equals>
								<property>/systems/thrust/state1</property>
								<value>IDLE</value>
							</equals>
						</or>
					</and>
				</or>
			</condition>
			<property>/controls/engines/engine[0]/throttle-man</property>
		</input>
		<input>
			<condition>
				<and>
					<equals>
						<property>/it-autoflight/output/athr</property>
						<value>1</value>
					</equals>
					<or>
						<and>
							<equals>
								<property>/systems/thrust/eng-out</property>
								<value>1</value>
							</equals>
							<equals>
								<property>/systems/thrust/lim-flex</property>
								<value>0</value>
							</equals>
							<equals>
								<property>/systems/thrust/state1</property>
								<value>MCT</value>
							</equals>
						</and>
						<and>
							<equals>
								<property>/systems/thrust/eng-out</property>
								<value>1</value>
							</equals>
							<less-than>
								<property>/controls/engines/engine[0]/throttle-pos</property>
								<value>0.83</value>
							</less-than>
							<equals>
								<property>/systems/thrust/state1</property>
								<value>MAN THR</value>
							</equals>
						</and>
						<equals>
							<property>/systems/thrust/state1</property>
							<value>CL</value>
						</equals>
						<equals>
							<property>/systems/thrust/state1</property>
							<value>MAN</value>
						</equals>
					</or>
				</and>
			</condition>
			<property>/controls/engines/engine[0]/throttle-cmd</property>
		</input>
		<output>
			<property>/controls/engines/engine[0]/throttle-fdm</property>
		</output>
	</filter>
	
	<filter>
		<name>Throttle 2</name>
		<debug>false</debug>
		<type>gain</type>
		<gain>1.0</gain>
		<enable>
			<condition>
				<and>
					<equals>
						<property>/systems/thrust/alpha-floor</property>
						<value>0</value>
					</equals>
					<equals>
						<property>/systems/thrust/toga-lk</property>
						<value>0</value>
					</equals>
					<or>
						<and>
							<equals>
								<property>/systems/thrust/eng-out</property>
								<value>1</value>
							</equals>
							<equals>
								<property>/systems/thrust/lim-flex</property>
								<value>0</value>
							</equals>
							<equals>
								<property>/systems/thrust/state2</property>
								<value>MCT</value>
							</equals>
						</and>
						<equals>
							<property>/systems/thrust/state2</property>
							<value>MAN THR</value>
						</equals>
						<equals>
							<property>/systems/thrust/state2</property>
							<value>CL</value>
						</equals>
						<equals>
							<property>/systems/thrust/state2</property>
							<value>MAN</value>
						</equals>
						<equals>
							<property>/systems/thrust/state2</property>
							<value>IDLE</value>
						</equals>
					</or>
				</and>
			</condition>
		</enable>
		<input>
			<condition>
				<or>
					<and>
						<equals>
							<property>/systems/thrust/eng-out</property>
							<value>0</value>
						</equals>
						<less-than>
							<property>/controls/engines/engine[1]/throttle-pos</property>
							<value>0.83</value>
						</less-than>
						<equals>
							<property>/systems/thrust/state2</property>
							<value>MAN THR</value>
						</equals>
					</and>
					<and>
						<greater-than-equals>
							<property>/controls/engines/engine[1]/throttle-pos</property>
							<value>0.83</value>
						</greater-than-equals>
						<equals>
							<property>/systems/thrust/state2</property>
							<value>MAN THR</value>
						</equals>
					</and>
					<and>
						<equals>
							<property>/it-autoflight/output/athr</property>
							<value>0</value>
						</equals>
						<or>
							<and>
								<equals>
									<property>/systems/thrust/eng-out</property>
									<value>1</value>
								</equals>
								<equals>
									<property>/systems/thrust/lim-flex</property>
									<value>0</value>
								</equals>
								<equals>
									<property>/systems/thrust/state2</property>
									<value>MCT</value>
								</equals>
							</and>
							<and>
								<equals>
									<property>/systems/thrust/eng-out</property>
									<value>1</value>
								</equals>
								<equals>
									<property>/systems/thrust/state2</property>
									<value>MAN THR</value>
								</equals>
							</and>
							<equals>
								<property>/systems/thrust/state2</property>
								<value>CL</value>
							</equals>
							<equals>
								<property>/systems/thrust/state2</property>
								<value>MAN</value>
							</equals>
							<equals>
								<property>/systems/thrust/state2</property>
								<value>IDLE</value>
							</equals>
						</or>
					</and>
				</or>
			</condition>
			<property>/controls/engines/engine[1]/throttle-man</property>
		</input>
		<input>
			<condition>
				<and>
					<equals>
						<property>/it-autoflight/output/athr</property>
						<value>1</value>
					</equals>
					<or>
						<and>
							<equals>
								<property>/systems/thrust/eng-out</property>
								<value>1</value>
							</equals>
							<equals>
								<property>/systems/thrust/lim-flex</property>
								<value>0</value>
							</equals>
							<equals>
								<property>/systems/thrust/state2</property>
								<value>MCT</value>
							</equals>
						</and>
						<and>
							<equals>
								<property>/systems/thrust/eng-out</property>
								<value>1</value>
							</equals>
							<less-than>
								<property>/controls/engines/engine[1]/throttle-pos</property>
								<value>0.83</value>
							</less-than>
							<equals>
								<property>/systems/thrust/state2</property>
								<value>MAN THR</value>
							</equals>
						</and>
						<equals>
							<property>/systems/thrust/state2</property>
							<value>CL</value>
						</equals>
						<equals>
							<property>/systems/thrust/state2</property>
							<value>MAN</value>
						</equals>
					</or>
				</and>
			</condition>
			<property>/controls/engines/engine[1]/throttle-cmd</property>
		</input>
		<output>
			<property>/controls/engines/engine[1]/throttle-fdm</property>
		</output>
	</filter>
	
	<filter>
		<name>N1 Limit TOGA</name>
		<type>gain</type>
		<gain>1.0</gain>
		<update-interval-secs type="double">0.05</update-interval-secs>
		<input>
			<expression>
				<table>
					<product>
						<value>0.99</value>
						<property>/controls/engines/throttle-scale</property>
					</product>
					<entry><ind>0.00</ind><dep> 19.7</dep></entry>
					<entry><ind>1.00</ind><dep>103.8</dep></entry>
				</table>
			</expression>
		</input>
		<output>/systems/thrust/n1/toga-lim</output>
	</filter>
	
	<filter>
		<name>N1 Limit MCT</name>
		<type>gain</type>
		<gain>1.0</gain>
		<update-interval-secs type="double">0.05</update-interval-secs>
		<input>
			<expression>
				<table>
					<product>
						<value>0.95</value>
						<property>/controls/engines/throttle-scale</property>
					</product>
					<entry><ind>0.00</ind><dep> 19.7</dep></entry>
					<entry><ind>1.00</ind><dep>103.8</dep></entry>
				</table>
			</expression>
		</input>
		<output>/systems/thrust/n1/mct-lim</output>
	</filter>
	
	<filter>
		<name>N1 Limit FLX</name>
		<type>gain</type>
		<gain>1.0</gain>
		<update-interval-secs type="double">0.05</update-interval-secs>
		<input>
			<expression>
				<table>
					<product>
						<value>0.99</value>
						<property>/engines/flx-throttle</property>
					</product>
					<entry><ind>0.00</ind><dep> 19.7</dep></entry>
					<entry><ind>1.00</ind><dep>103.8</dep></entry>
				</table>
			</expression>
		</input>
		<output>/systems/thrust/n1/flx-lim</output>
	</filter>
	
	<filter>
		<name>N1 Limit CLB</name>
		<type>gain</type>
		<gain>1.0</gain>
		<update-interval-secs type="double">0.05</update-interval-secs>
		<input>
			<expression>
				<table>
					<product>
						<value>0.91</value>
						<property>/controls/engines/throttle-scale</property>
					</product>
					<entry><ind>0.00</ind><dep> 19.7</dep></entry>
					<entry><ind>1.00</ind><dep>103.8</dep></entry>
				</table>
			</expression>
		</input>
		<output>/systems/thrust/n1/clb-lim</output>
	</filter>
	
	<filter>
		<name>Throttle Output One</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<condition>
				<equals>
					<property>/controls/engines/engine[0]/reverser</property>
					<value>1</value>
				</equals>
			</condition>
			<property>/controls/engines/engine[0]/throttle-rev</property>
		</input>
		<input>
			<condition>
				<and>
					<equals>
						<property>/controls/engines/thrust-limit</property>
						<value>FLX</value>
					</equals>
					<equals>
						<property>/systems/thrust/state1</property>
						<value>MCT</value>
					</equals>
				</and>
			</condition>
			<expression>
				<product>
					<property>/controls/engines/engine[0]/throttle-fdm</property>
					<property>/engines/flx-throttle</property>
				</product>
			</expression>
		</input>
		<input>
			<expression>
				<product>
					<property>/controls/engines/engine[0]/throttle-fdm</property>
					<property>/controls/engines/throttle-scale</property>
				</product>
			</expression>
		</input>
		<output>/controls/engines/engine[0]/throttle-output</output>
		<min>
			<property>/controls/engines/idle-limit</property>
		</min>
		<max>1.0</max>
	</filter>
	
	<filter>
		<name>Throttle Output Two</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<condition>
				<equals>
					<property>/controls/engines/engine[1]/reverser</property>
					<value>1</value>
				</equals>
			</condition>
			<property>/controls/engines/engine[1]/throttle-rev</property>
		</input>
		<input>
			<condition>
				<and>
					<equals>
						<property>/controls/engines/thrust-limit</property>
						<value>FLX</value>
					</equals>
					<equals>
						<property>/systems/thrust/state2</property>
						<value>MCT</value>
					</equals>
				</and>
			</condition>
			<expression>
				<product>
					<property>/controls/engines/engine[1]/throttle-fdm</property>
					<property>/engines/flx-throttle</property>
				</product>
			</expression>
		</input>
		<input>
			<expression>
				<product>
					<property>/controls/engines/engine[1]/throttle-fdm</property>
					<property>/controls/engines/throttle-scale</property>
				</product>
			</expression>
		</input>
		<output>/controls/engines/engine[1]/throttle-output</output>
		<min>
			<property>/controls/engines/idle-limit</property>
		</min>
		<max>1.0</max>
	</filter>
	
	<filter>
		<name>EGT L</name>
		<type>gain</type>
		<gain>1.0</gain>
		<enable>
			<condition>
				<and>
					<equals>
						<property>/engines/engine[0]/state</property>
						<value>3</value>
					</equals>
					<greater-than>
						<property>/engines/engine[0]/n1-actual</property>
						<value>19</value>
					</greater-than>
				</and>
			</condition>
		</enable>
		<input>
			<expression>
				<table>
					<property>/engines/engine[0]/n1-actual</property> 
					<entry><ind> 19.7</ind><dep>434</dep></entry>
					<entry><ind>110.0</ind><dep>620</dep></entry>
				</table>
			</expression>
		</input>
		<output>/engines/engine[0]/egt-actual</output>
	</filter>
	
	<filter>
		<name>EGT R</name>
		<type>gain</type>
		<gain>1.0</gain>
		<enable>
			<condition>
				<and>
					<equals>
						<property>/engines/engine[1]/state</property>
						<value>3</value>
					</equals>
					<greater-than>
						<property>/engines/engine[1]/n1-actual</property>
						<value>19</value>
					</greater-than>
				</and>
			</condition>
		</enable>
		<input>
			<expression>
				<table>
					<property>/engines/engine[1]/n1-actual</property> 
					<entry><ind> 19.7</ind><dep>434</dep></entry>
					<entry><ind>110.0</ind><dep>620</dep></entry>
				</table>
			</expression>
		</input>
		<output>/engines/engine[1]/egt-actual</output>
	</filter>

</PropertyList>