<?xml version="1.0"?>

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

<PropertyList>

	<path>res/a320.nacelle.cfmleapx.ac</path>

	<params>
		<n1>engines/engine[3]/n1</n1>
		<on-fire>systems/failures/fire/engine-left-fire</on-fire>
		<contrail>engines/engine[0]/contrail</contrail>
		<reverser-pos-norm>sim/multiplay/generic/float[2]</reverser-pos-norm>
	</params>

	<offsets>
		<heading-deg>-1</heading-deg>
		<pitch-deg>2.2</pitch-deg>
	</offsets>

	<animation>
		<type>translate</type>
		<object-name>Reverser</object-name>
		<object-name>Nozzle</object-name>
		<property alias="../../params/reverser-pos-norm" />
		<factor>0.25</factor>
		<axis>
			<x>1</x>
			<y>0</y>
			<z>0</z>
		</axis>
	</animation>

	<animation>
		<name>Chrome shader</name>
		<type>shader</type>
		<shader>chrome</shader>
		<texture>../Models/chrome.png</texture>
		<object-name>Nozzle</object-name>
	</animation>

	<model>
		<path>Aircraft/A320-family/Models/Engines/NEO/res/cfmleapx.ac</path>
	</model>

	<model>
		<path>Aircraft/A320-family/Models/Engines/NEO/res/a320.pylon.cfmleapx.left.ac</path>
	</model>

	<model>
		<path>Aircraft/A320-family/Models/Effects/contrail.xml</path>
		<name>contrail</name>
		<condition>
			<property>environment/contrail</property>
		</condition>
		<overlay>
			<params>
				<contrail alias="../../../../params/contrail" />
			</params>
		</overlay>
		<offsets>
			<x-m>4.875</x-m>
			<y-m>0</y-m>
			<z-m>0</z-m>
		</offsets>
	</model>

	<!-- Takeoff/Landing Engine Moisture -->
	<model>
		<path>Aircraft/A320-family/Models/Effects/Moisture-neo.xml</path>
		<name>moisture</name>
		<condition>
			<and>
				<greater-than>
					<property>position/altitude-agl-ft</property>
					<value>1</value>
				</greater-than>
				<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[0]/n1</property>
					<value>60</value>
				</greater-than>
			</and>
		</condition>
		<offsets>
			<x-m>0</x-m>
			<y-m>0</y-m>
			<z-m>0.4</z-m>
			<pitch-deg>0</pitch-deg>
		</offsets>
	</model>

	<!-- Takeoff/Landing Engine spray -->
	<model>
		<path>Aircraft/A320-family/Models/Effects/engine-spray.xml</path>
		<name>engine-spray</name>
		<condition>
			<and>
				<greater-than>
					<property>position/altitude-agl-ft</property>
					<value>1</value>
				</greater-than>
				<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[0]/n1-actual</property>
					<value>65</value>
				</greater-than>
				<equals>
					<property>engines/engine[0]/reverser-pos-norm</property>
					<value>0</value>
				</equals>
			</and>
		</condition>
		<offsets>
			<x-m>4.875</x-m>
			<y-m>0</y-m>
			<z-m>-5</z-m>
		</offsets>
	</model>

	<!-- Takeoff/Landing Engine Reverse spray -->
	<model>
		<path>Aircraft/A320-family/Models/Effects/engine-spray-reverse.xml</path>
		<name>engine-spray-reverse</name>
		<condition>
			<and>
				<greater-than>
					<property>position/altitude-agl-ft</property>
					<value>1</value>
				</greater-than>
				<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[0]/n1-actual</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>-1.0</x-m>
			<y-m>0</y-m>
			<z-m>0</z-m>
		</offsets>
	</model>
 
<!-- ############### -->
<!-- Tubofan Exhaust -->
<!-- ############### 
    <model>
        <name>Left Tubofan Exhaust</name>
        <path>Aircraft/A320-family/Models/Effects/Exhaust/Exhaust.xml</path>
        <offsets>
            <x-m>-7.0</x-m>
            <y-m>-7.77</y-m>
            <z-m>-4.4</z-m>
            <pitch-deg>0</pitch-deg>
        </offsets>
    </model> -->

	<model>
		<name>Engine fire</name>
		<path>Aircraft/A320-family/Models/Effects/enginefire.xml</path>
		<offsets>
			<x-m>2.774</x-m>
			<y-m>0</y-m>
			<z-m>0</z-m>
		</offsets>
		<condition>
			<property alias="../../../params/on-fire" />
		</condition>
	</model>

	<animation>
		<name>Fan</name>
		<type>spin</type>
		<object-name>fan</object-name>
		<object-name>cone</object-name>
		<factor>-67</factor>
		<property alias="../../params/n1" />
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
	</animation>
	
	<!-- <effect>
        <inherits-from>Aircraft/A320-family/Models/Effects/engineLEAPl</inherits-from>
        <object-name>Nacelle</object-name>
        <object-name>Reverser</object-name>
	</effect> -->

</PropertyList>