<?xml version="1.0"?>

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

<PropertyList>
	<path>res/CFMLEAP1A.ac</path>
	
	<params>
		<contrail1>engines/engine[0]/contrail</contrail1>
		<contrail2>engines/engine[1]/contrail</contrail2>
	</params>
	
	<!-- Particle Effects -->
	<model>
		<path>Aircraft/A320-family/Models/Effects/Particles/contrail.xml</path>
		<name>contrailLeft</name>
		<condition>
			<property>environment/contrail</property>
		</condition>
		<overlay>
			<params>
				<contrail alias="../../../../params/contrail1" />
			</params>
		</overlay>
		<offsets>
			<x-m> 4.51789</x-m>
			<y-m>-5.63029</y-m>
			<z-m>-2.22295</z-m>
		</offsets>
	</model>
	
	<model>
		<path>Aircraft/A320-family/Models/Effects/Particles/contrail.xml</path>
		<name>contrailRight</name>
		<condition>
			<property>environment/contrail</property>
		</condition>
		<overlay>
			<params>
				<contrail alias="../../../../params/contrail2" />
			</params>
		</overlay>
		<offsets>
			<x-m> 4.51789</x-m>
			<y-m> 5.63029</y-m>
			<z-m>-2.22295</z-m>
		</offsets>
	</model>

	<model>
		<path>Aircraft/A320-family/Models/Effects/Particles/Moisture.xml</path>
		<name>moistureLeft</name>
		<condition>
			<and>
				<greater-than>
					<property>environment/relative-humidity</property>
					<value>45</value>
				</greater-than>
				<less-than-equals>
					<property>position/altitude-agl-ft</property>
					<value>75</value>
				</less-than-equals>
				<less-than-equals>
					<property>sim/time/sun-angle-rad</property>
					<value>1.63</value>
				</less-than-equals>
				<greater-than>
					<property>engines/engine[3]/n1</property>
					<value>65</value>
				</greater-than>
			</and>
		</condition>
		<offsets>
			<x-m>-7.432</x-m>
			<y-m>-5.63029</y-m>
			<z-m>-2.46943</z-m>
			<pitch-deg>0</pitch-deg>
		</offsets>
	</model>
	
	<model>
		<path>Aircraft/A320-family/Models/Effects/Particles/Moisture.xml</path>
		<name>moistureRight</name>
		<condition>
			<and>
				<greater-than>
					<property>environment/relative-humidity</property>
					<value>45</value>
				</greater-than>
				<less-than-equals>
					<property>position/altitude-agl-ft</property>
					<value>75</value>
				</less-than-equals>
				<less-than-equals>
					<property>sim/time/sun-angle-rad</property>
					<value>1.63</value>
				</less-than-equals>
				<greater-than>
					<property>engines/engine[4]/n1</property>
					<value>65</value>
				</greater-than>
			</and>
		</condition>
		<offsets>
			<x-m>-7.432</x-m>
			<y-m> 5.63029</y-m>
			<z-m>-2.46943</z-m>
			<pitch-deg>0</pitch-deg>
		</offsets>
	</model>
	
	<model>
		<path>Aircraft/A320-family/Models/Effects/Particles/engine-spray.xml</path>
		<name>engine-spray-left</name>
		<condition>
			<and>
				<greater-than>
					<property>environment/surface/wetness</property>
					<value>0.3</value>
				</greater-than>
				<less-than-equals>
					<property>position/altitude-agl-ft</property>
					<value>15</value>
				</less-than-equals>
				<less-than-equals>
					<property>sim/time/sun-angle-rad</property>
					<value>1.63</value>
				</less-than-equals>
				<greater-than>
					<property>engines/engine[3]/n1</property>
					<value>65</value>
				</greater-than>
				<equals>
					<property>engines/engine[0]/reverser-pos-norm</property>
					<value>0</value>
				</equals>
			</and>
		</condition>
		<offsets>
			<x-m>-0.62458</x-m>
			<y-m>-5.63029</y-m>
			<z-m>-5</z-m>
		</offsets>
	</model>
	
	<model>
		<path>Aircraft/A320-family/Models/Effects/Particles/engine-spray.xml</path>
		<name>engine-spray-right</name>
		<condition>
			<and>
				<greater-than>
					<property>environment/surface/wetness</property>
					<value>0.3</value>
				</greater-than>
				<less-than-equals>
					<property>position/altitude-agl-ft</property>
					<value>15</value>
				</less-than-equals>
				<less-than-equals>
					<property>sim/time/sun-angle-rad</property>
					<value>1.63</value>
				</less-than-equals>
				<greater-than>
					<property>engines/engine[4]/n1</property>
					<value>65</value>
				</greater-than>
				<equals>
					<property>engines/engine[1]/reverser-pos-norm</property>
					<value>0</value>
				</equals>
			</and>
		</condition>
		<offsets>
			<x-m>-0.62458</x-m>
			<y-m>5.63029</y-m>
			<z-m>-5</z-m>
		</offsets>
	</model>
	
	<model>
		<path>Aircraft/A320-family/Models/Effects/Particles/engine-spray-reverse.xml</path>
		<name>engine-spray-reverse</name>
		<condition>
			<and>
				<greater-than>
					<property>environment/surface/wetness</property>
					<value>0.3</value>
				</greater-than>
				<less-than-equals>
					<property>sim/time/sun-angle-rad</property>
					<value>1.63</value>
				</less-than-equals>
				<greater-than>
					<property>engines/engine[3]/n1</property>
					<value>65</value>
				</greater-than>
				<greater-than>
					<property>engines/engine[0]/reverser-pos-norm</property>
					<value>0.75</value>
				</greater-than>
			</and>
		</condition>
		<offsets>
			<x-m>-6.62458</x-m>
			<y-m>-5.63029</y-m>
			<z-m>-5</z-m>
		</offsets>
	</model>
	
	<model>
		<path>Aircraft/A320-family/Models/Effects/Particles/engine-spray-reverse.xml</path>
		<name>engine-spray-reverse</name>
		<condition>
			<and>
				<greater-than>
					<property>environment/surface/wetness</property>
					<value>0.3</value>
				</greater-than>
				<less-than-equals>
					<property>sim/time/sun-angle-rad</property>
					<value>1.63</value>
				</less-than-equals>
				<greater-than>
					<property>engines/engine[4]/n1</property>
					<value>65</value>
				</greater-than>
				<greater-than>
					<property>engines/engine[1]/reverser-pos-norm</property>
					<value>0.75</value>
				</greater-than>
			</and>
		</condition>
		<offsets>
			<x-m>-6.62458</x-m>
			<y-m>5.63029</y-m>
			<z-m>-5</z-m>
		</offsets>
	</model>

	<model>
		<name>Engine fire left</name>
		<path>Aircraft/A320-family/Models/Effects/Particles/enginefire.xml</path>
		<offsets>
			<x-m>-3.96705</x-m>
			<y-m>-5.63029</y-m>
			<z-m>-2.22295</z-m>
		</offsets>
		<condition>
			<property>systems/failures/fire/engine-left-fire</property>
		</condition>
	</model>
	
	<model>
		<name>Engine fire right</name>
		<path>Aircraft/A320-family/Models/Effects/Particles/enginefire.xml</path>
		<offsets>
			<x-m>-3.96705</x-m>
			<y-m> 5.63029</y-m>
			<z-m>-2.22295</z-m>
		</offsets>
		<condition>
			<property>systems/failures/fire/engine-right-fire</property>
		</condition>
	</model>
	
	<!-- Animations -->
	<animation>
		<name>Fan spinning animation (slow)</name>
		<type>spin</type>
		<object-name>FanLEAPL</object-name>
		<factor>50</factor> <!-- TCDS sourced - don't tune! -->
		<property>engines/engine[3]/n1</property>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>-6.73265</x-m>
			<y-m>-5.63098</y-m>
			<z-m>-2.33038</z-m>
		</center>
	</animation>
	
	<animation>
		<name>Fan spinning animation (slow)</name>
		<type>spin</type>
		<object-name>FanLEAPR</object-name>
		<factor>50</factor>
		<property>engines/engine[4]/n1</property>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>-6.73265</x-m>
			<y-m> 5.63098</y-m>
			<z-m>-2.33038</z-m>
		</center>
	</animation>
	
	<animation>
		<name>Fan spinning animation (fast)</name>
		<type>spin</type>
		<object-name>FanSpinningLEAPL</object-name>
		<factor>5</factor>
		<property>engines/engine[3]/n1</property>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>-6.73265</x-m>
			<y-m>-5.63098</y-m>
			<z-m>-2.33038</z-m>
		</center>
	</animation>
	
	<animation>
		<name>Fan spinning animation (fast)</name>
		<type>spin</type>
		<object-name>FanSpinningLEAPR</object-name>
		<factor>5</factor>
		<property>engines/engine[4]/n1</property>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>-6.73265</x-m>
			<y-m> 5.63098</y-m>
			<z-m>-2.33038</z-m>
		</center>
	</animation>
	
	<animation>
		<type>select</type>
		<object-name>FanSpinningLEAPL</object-name>
		<condition>
			<greater-than>
				<property>engines/engine[3]/n1</property>
				<value>40.0</value>
			</greater-than>
		</condition>
	</animation>
	
	<animation>
		<type>select</type>
		<object-name>FanSpinningLEAPR</object-name>
		<condition>
			<greater-than>
				<property>engines/engine[4]/n1</property>
				<value>40.0</value>
			</greater-than>
		</condition>
	</animation>
	
	<animation>
		<type>select</type>
		<object-name>FanLEAPL</object-name>
		<condition>
			<less-than-equals>
				<property>engines/engine[3]/n1</property>
				<value>40.0</value>
			</less-than-equals>
		</condition>
	</animation>
	
	<animation>
		<type>select</type>
		<object-name>FanLEAPR</object-name>
		<condition>
			<less-than-equals>
				<property>engines/engine[4]/n1</property>
				<value>40.0</value>
			</less-than-equals>
		</condition>
	</animation>
	
	<animation>
		<type>translate</type>
		<object-name>ReverserLDoorLEAP</object-name>
		<object-name>ReverserLDoorLEAP.Inner</object-name>
		<property>engines/engine[0]/reverser-pos-norm</property>
		<factor>0.50</factor> <!-- According to photo reference -->
		<axis>
			<x>1</x>
			<y>0</y>
			<z>0</z>
		</axis>
	</animation>

	<animation>
		<type>translate</type>
		<object-name>ReverserRDoorLEAP</object-name>
		<object-name>ReverserRDoorLEAP.Inner</object-name>
		<property>engines/engine[1]/reverser-pos-norm</property>
		<factor>0.50</factor> <!-- According to photo reference -->
		<axis>
			<x>1</x>
			<y>0</y>
			<z>0</z>
		</axis>
	</animation>
	
	<!-- Effect -->
	<effect>
		<inherits-from>Aircraft/A320-family/Models/Effects/Model/reflection-engine-LEAP</inherits-from>
		<object-name>EngineLEAPL</object-name>
		<object-name>EngineLEAPR</object-name>
		<object-name>ReverserLDoorLEAP</object-name>
		<object-name>ReverserRDoorLEAP</object-name>
	</effect>
	
	<effect>
		<inherits-from>Aircraft/A320-family/Models/Effects/Model/reflection-matt-engine-LEAP</inherits-from>
		<object-name>EngineLEAPL.Inner</object-name>
                <object-name>EngineLEAPR.Inner</object-name>
		<object-name>PylonLEAPL</object-name>
		<object-name>PylonLEAPR</object-name>
		<object-name>ReverserLDoorLEAP.Inner</object-name>
		<object-name>ReverserRDoorLEAP.Inner</object-name>
	</effect>
	
	<effect>
		<inherits-from>Aircraft/A320-family/Models/Effects/Model/reflection-chrome-engine-LEAP</inherits-from>
		<object-name>IntakeLEAPL</object-name>
		<object-name>IntakeLEAPR</object-name>
		<object-name>Exhaust3LEAPL</object-name>
		<object-name>Exhaust2LEAPL</object-name>
		<object-name>Exhaust3LEAPR</object-name>
		<object-name>Exhaust2LEAPR</object-name>
	</effect>
</PropertyList>