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

<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->

<PropertyList>
	
	<filter>
		<name>EPR 1</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>IAE</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[0]/epr-actual</property>
					<entry><ind>0.970</ind><dep>-139</dep></entry>
					<entry><ind>1.000</ind><dep>-125</dep></entry>
					<entry><ind>1.200</ind><dep> -55</dep></entry>
					<entry><ind>1.400</ind><dep>  16</dep></entry>
					<entry><ind>1.600</ind><dep>  87</dep></entry>
					<entry><ind>1.650</ind><dep>  98</dep></entry>
				</table>
			</expression>
		</input>
		<input>0</input>
		<output>/ECAM/Upper/EPR[0]</output>
	</filter>
	
	<filter>
		<name>EPR THR 1</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>IAE</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[0]/epr-cmd</property>
					<entry><ind>0.970</ind><dep>-139</dep></entry>
					<entry><ind>1.000</ind><dep>-125</dep></entry>
					<entry><ind>1.200</ind><dep> -55</dep></entry>
					<entry><ind>1.400</ind><dep>  16</dep></entry>
					<entry><ind>1.600</ind><dep>  87</dep></entry>
					<entry><ind>1.650</ind><dep>  98</dep></entry>
				</table>
			</expression>
		</input>
		<input>0</input>
		<output>/ECAM/Upper/EPRthr[0]</output>
	</filter>
	
	<filter>
		<name>EPR 2</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>IAE</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[1]/epr-actual</property>
					<entry><ind>0.970</ind><dep>-139</dep></entry>
					<entry><ind>1.000</ind><dep>-125</dep></entry>
					<entry><ind>1.200</ind><dep> -55</dep></entry>
					<entry><ind>1.400</ind><dep>  16</dep></entry>
					<entry><ind>1.600</ind><dep>  87</dep></entry>
					<entry><ind>1.650</ind><dep>  98</dep></entry>
				</table>
			</expression>
		</input>
		<input>0</input>
		<output>/ECAM/Upper/EPR[1]</output>
	</filter>
	
	<filter>
		<name>EPR THR 2</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>IAE</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[1]/epr-cmd</property>
					<entry><ind>0.970</ind><dep>-139</dep></entry>
					<entry><ind>1.000</ind><dep>-125</dep></entry>
					<entry><ind>1.200</ind><dep> -55</dep></entry>
					<entry><ind>1.400</ind><dep>  16</dep></entry>
					<entry><ind>1.600</ind><dep>  87</dep></entry>
					<entry><ind>1.650</ind><dep>  98</dep></entry>
				</table>
			</expression>
		</input>
		<input>0</input>
		<output>/ECAM/Upper/EPRthr[1]</output>
	</filter>
	
	<filter>
		<name>EPR LIMIT</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>IAE</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/systems/thrust/epr/toga-lim</property>
					<entry><ind>0.970</ind><dep>-139</dep></entry>
					<entry><ind>1.000</ind><dep>-125</dep></entry>
					<entry><ind>1.200</ind><dep> -55</dep></entry>
					<entry><ind>1.400</ind><dep>  16</dep></entry>
					<entry><ind>1.600</ind><dep>  87</dep></entry>
					<entry><ind>1.650</ind><dep>  98</dep></entry>
				</table>
			</expression>
		</input>
		<input>0</input>
		<output>/ECAM/Upper/EPRylim</output>
	</filter>
	
	<filter>
		<name>EGT 1</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>CFM</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[0]/egt-actual</property>
					<entry><ind>   0</ind><dep>-90</dep></entry>
					<entry><ind> 500</ind><dep>  0</dep></entry>
					<entry><ind>1000</ind><dep> 90</dep></entry>
				</table>
			</expression>
		</input>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>IAE</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[0]/egt-actual</property>
					<entry><ind>  0</ind><dep>-90</dep></entry>
					<entry><ind>400</ind><dep>  0</dep></entry>
					<entry><ind>800</ind><dep> 90</dep></entry>
				</table>
			</expression>
		</input>
		<output>/ECAM/Upper/EGT[0]</output>
	</filter>
	
	<filter>
		<name>EGT 2</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>CFM</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[1]/egt-actual</property>
					<entry><ind>   0</ind><dep>-90</dep></entry>
					<entry><ind> 500</ind><dep>  0</dep></entry>
					<entry><ind>1000</ind><dep> 90</dep></entry>
				</table>
			</expression>
		</input>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>IAE</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[1]/egt-actual</property>
					<entry><ind>  0</ind><dep>-90</dep></entry>
					<entry><ind>400</ind><dep>  0</dep></entry>
					<entry><ind>800</ind><dep> 90</dep></entry>
				</table>
			</expression>
		</input>
		<output>/ECAM/Upper/EGT[1]</output>
	</filter>
	
	<filter>
		<name>N1 1</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>CFM</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[0]/n1-actual</property>
					<entry><ind> 20.0</ind><dep>-131</dep></entry>
					<entry><ind> 50.0</ind><dep> -64</dep></entry>
					<entry><ind>100.0</ind><dep>  48</dep></entry>
					<entry><ind>110.0</ind><dep>  65</dep></entry>
				</table>
			</expression>
		</input>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>IAE</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[0]/n1-actual</property>
					<entry><ind> 20.0</ind><dep>-112.5</dep></entry>
					<entry><ind> 40.0</ind><dep> -67.5</dep></entry>
					<entry><ind>100.0</ind><dep>  67.5</dep></entry>
					<entry><ind>110.0</ind><dep>  90.0</dep></entry>
				</table>
			</expression>
		</input>
		<output>/ECAM/Upper/N1[0]</output>
	</filter>
	
	<filter>
		<name>N1 THR 1</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>CFM</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[0]/n1-actual-cmd</property>
					<entry><ind> 20.0</ind><dep>-131</dep></entry>
					<entry><ind> 50.0</ind><dep> -64</dep></entry>
					<entry><ind>100.0</ind><dep>  48</dep></entry>
					<entry><ind>110.0</ind><dep>  65</dep></entry>
				</table>
			</expression>
		</input>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>IAE</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[0]/n1-actual-cmd</property>
					<entry><ind> 20.0</ind><dep>-112.5</dep></entry>
					<entry><ind> 40.0</ind><dep> -67.5</dep></entry>
					<entry><ind>100.0</ind><dep>  67.5</dep></entry>
					<entry><ind>110.0</ind><dep>  90.0</dep></entry>
				</table>
			</expression>
		</input>
		<output>/ECAM/Upper/N1thr[0]</output>
	</filter>
	
	<filter>
		<name>N1 2</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>CFM</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[1]/n1-actual</property>
					<entry><ind> 20.0</ind><dep>-131</dep></entry>
					<entry><ind> 50.0</ind><dep> -64</dep></entry>
					<entry><ind>100.0</ind><dep>  48</dep></entry>
					<entry><ind>110.0</ind><dep>  65</dep></entry>
				</table>
			</expression>
		</input>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>IAE</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[1]/n1-actual</property>
					<entry><ind> 20.0</ind><dep>-112.5</dep></entry>
					<entry><ind> 40.0</ind><dep> -67.5</dep></entry>
					<entry><ind>100.0</ind><dep>  67.5</dep></entry>
					<entry><ind>110.0</ind><dep>  90.0</dep></entry>
				</table>
			</expression>
		</input>
		<output>/ECAM/Upper/N1[1]</output>
	</filter>
	
	<filter>
		<name>N1 THR 2</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>CFM</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[1]/n1-actual-cmd</property>
					<entry><ind> 20.0</ind><dep>-131</dep></entry>
					<entry><ind> 50.0</ind><dep> -64</dep></entry>
					<entry><ind>100.0</ind><dep>  48</dep></entry>
					<entry><ind>110.0</ind><dep>  65</dep></entry>
				</table>
			</expression>
		</input>
		<input>
			<condition>
				<equals>
					<property>/options/eng</property>
					<value>IAE</value>
				</equals>
			</condition>
			<expression>
				<table>
					<property>/engines/engine[1]/n1-actual-cmd</property>
					<entry><ind> 20.0</ind><dep>-112.5</dep></entry>
					<entry><ind> 40.0</ind><dep> -67.5</dep></entry>
					<entry><ind>100.0</ind><dep>  67.5</dep></entry>
					<entry><ind>110.0</ind><dep>  90.0</dep></entry>
				</table>
			</expression>
		</input>
		<output>/ECAM/Upper/N1thr[1]</output>
	</filter>
	
	<filter>
		<name>N1 LIMIT</name>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<expression>
				<table>
					<property>/systems/thrust/n1/toga-lim</property>
					<entry><ind> 20.0</ind><dep>-131</dep></entry>
					<entry><ind> 50.0</ind><dep> -64</dep></entry>
					<entry><ind>100.0</ind><dep>  48</dep></entry>
					<entry><ind>110.0</ind><dep>  65</dep></entry>
				</table>
			</expression>
		</input>
		<input>0</input>
		<output>/ECAM/Upper/N1ylim</output>
	</filter>


	<flipflop>
		<type>RS</type>
		<S>
			<property>/systems/electrical/some-electric-thingie/emer-elec-config-generator-1-bustie</property>
		</S>
		<R>
			<not>
				<property>/systems/electrical/some-electric-thingie/emer-elec-config</property>
			</not>
		</R>
		<output>/systems/electrical/some-electric-thingie/generator-1-reset-bustie</output>
	</flipflop>
	
	<flipflop>
		<type>RS</type>
		<S>
			<property>/systems/electrical/some-electric-thingie/emer-elec-config-generator-2-bustie</property>
		</S>
		<R>
			<not>
				<property>/systems/electrical/some-electric-thingie/emer-elec-config</property>
			</not>
		</R>
		<output>/systems/electrical/some-electric-thingie/generator-2-reset-bustie</output>
	</flipflop>
	
	<flipflop>
		<type>RS</type>
		<S>
			<property>/systems/electrical/some-electric-thingie/emer-elec-config-generator-1</property>
		</S>
		<R>
			<not>
				<property>/systems/electrical/some-electric-thingie/emer-elec-config</property>
			</not>
		</R>
		<output>/systems/electrical/some-electric-thingie/generator-1-reset</output>
	</flipflop>
	
	<flipflop>
		<type>RS</type>
		<S>
			<property>/systems/electrical/some-electric-thingie/emer-elec-config-generator-2</property>
		</S>
		<R>
			<not>
				<property>/systems/electrical/some-electric-thingie/emer-elec-config</property>
			</not>
		</R>
		<output>/systems/electrical/some-electric-thingie/generator-2-reset</output>
	</flipflop>
	
	<flipflop>
		<type>RS</type>
		<S>
			<property>/ECAM/to-config-set</property>
		</S>
		<R>
			<property>/ECAM/to-config-reset</property>
		</R>
		<output>/ECAM/to-config-flipflop</output>
	</flipflop>
	
	<flipflop>
		<type>RS</type>
		<S>
			<property>/ECAM/to-memo-set</property>
		</S>
		<R>
			<property>/ECAM/to-memo-reset</property>
		</R>
		<output>/ECAM/to-memo-flipflop</output>
	</flipflop>
	
	<flipflop>
		<type>SR</type>
		<S>
			<property>/ECAM/ldg-memo-set</property>
		</S>
		<R>
			<property>/ECAM/ldg-memo-reset</property>
		</R>
		<output>/ECAM/ldg-memo-flipflop</output>
	</flipflop>
	
	<flipflop>
		<type>RS</type>
		<S>
			<property>/ECAM/ldg-memo-2200-set</property>
		</S>
		<R>
			<property>/ECAM/ldg-memo-2200-reset</property>
		</R>
		<output>/ECAM/ldg-memo-2200-flipflop</output>
	</flipflop>
	
	<flipflop>
		<type>SR</type>
		<S>
			<property>/ECAM/phases/flipflop/gear-set</property>
		</S>
		<R>
			<property>/ECAM/phases/flipflop/gear-reset</property>
		</R>
		<output>/ECAM/phases/flipflop/gear-output</output>
	</flipflop>
	
	<flipflop>
		<type>SR</type>
		<S>
			<property>/ECAM/phases/flipflop/phase-2-set</property>
		</S>
		<R>
			<property>/ECAM/phases/flipflop/phase-2-reset</property>
		</R>
		<output>/ECAM/phases/flipflop/phase-2-output</output>
	</flipflop>
	
	<flipflop>
		<type>RS</type>
		<S>
			<property>/ECAM/phases/flipflop/phase-10-set</property>
		</S>
		<R>
			<property>/ECAM/phases/flipflop/phase-10-reset</property>
		</R>
		<output>/ECAM/phases/flipflop/phase-10-output</output>
	</flipflop>
	
	<flipflop>
		<type>RS</type>
		<S>
			<property>/ECAM/flipflop/recall-set</property>
		</S>
		<R>
			<property>/ECAM/flipflop/recall-reset</property>
		</R>
		<output>/ECAM/flipflop/recall-output</output>
	</flipflop>
	
	<flipflop>
		<type>monostable</type>
		<time>
			<value>2.0</value>
		</time>
		<S>
			<not>
				<property>/ECAM/phases/speed-gt-80</property>
			</not>
		</S>
		<output>/ECAM/phases/monostable-80kt</output>
	</flipflop>
	
	<flipflop>
		<type>monostable</type>
		<time>
			<value>300.0</value>
		</time>
		<S>
			<property>/ECAM/phases/monostable/phase-1-300</property>
		</S>
		<output>/ECAM/phases/monostable/phase-1-output</output>
	</flipflop>
	
	<flipflop>
		<type>monostable</type>
		<time>
			<value>120.0</value>
		</time>
		<S>
			<property>/ECAM/phases/monostable/phase-5</property>
		</S>
		<output>/ECAM/phases/monostable/phase-5-output</output>
	</flipflop>
	
	<flipflop>
		<type>monostable</type>
		<time>
			<value>180.0</value>
		</time>
		<S>
			<property>/ECAM/phases/monostable/phase-7</property>
		</S>
		<output>/ECAM/phases/monostable/phase-7-output</output>
	</flipflop>
	
	<flipflop>
		<type>monostable</type>
		<time>
			<value>5.0</value>
		</time>
		<S>
			<property>/ECAM/buttons/recall-status-normal</property>
		</S>
		<R>
			<property>/ECAM/buttons/clear-btn</property>
		</R>
		<output>/ECAM/buttons/recall-status-normal-output</output>
	</flipflop>
	
	<!-- falling edge detector - take inverse of following -->
	<flipflop>
		<type>monostable</type>
		<inverted type="bool">true</inverted>
		<time>
			<value>3.0</value>
		</time>
		<S>
			<property>/ECAM/phases/monostable/phase-9</property>
		</S>
		<output>/ECAM/phases/monostable/phase-9-output</output>
	</flipflop>
	
	<flipflop>
		<type>monostable</type>
		<inverted type="bool">true</inverted>
		<time>
			<value>1.0</value>
		</time>
		<S>
			<property>/ECAM/phases/to-power-set</property>
		</S>
		<output>/ECAM/phases/monostable/to-power-set-output</output>
	</flipflop>
</PropertyList>