<?xml version="1.0"?>

<PropertyList>
	<path>sg38.ac</path>

	<nasal>
		<load>
			var rplayer = cmdarg();

			rplayer.getNode("controls/cabin/panel").alias( rplayer.getNode( "sim/multiplay/generic/int[0]" ) );
			rplayer.getNode("controls/flight/rear-fairing").alias( rplayer.getNode( "sim/multiplay/generic/int[1]" ) );
		</load>
		<unload>
			rplayer.getNode("controls/cabin/panel").unalias();
			rplayer.getNode("controls/flight/rear-fairing").unalias();
		</unload>
	</nasal>

	<effect>
		<inherits-from>Effects/model-transparent</inherits-from>
		<object-name>wingL</object-name>
		<object-name>wingR</object-name>
		<object-name>rear_fairing</object-name>
	</effect>

	<!--PILOT-->
	<animation>
		<type>select</type>
		<object-name>Head</object-name>
		<condition>
			<not-equals>
				<property>sim/current-view/view-number</property>
				<value>0</value>
			</not-equals>
		</condition>
	</animation>
	<animation>
		<type>select</type>
		<object-name>pilot</object-name>
		<condition>
			<and>
				<or>
					<property>/sim/model/pilots-view-enabled</property>
					<not-equals>
						<property>/sim/current-view/view-number</property>
						<value>0</value>
					</not-equals>
				</or>
				<greater-than>
					<property>sim/weight/weight-lb</property>
					<value>100</value>
				</greater-than>
				<property>/sim/model/pilots-enabled</property>
			</and>
		</condition>
	</animation>

	<!--Instruments: ASI, VSI, ALT-->
	<model>
		<name>asi</name>
		<path>Instruments/winter-asi-6221/winter-asi-6221.xml</path>
		<offsets>
			<x-m>-2.93523 </x-m>
			<y-m> 0.0     </y-m>
			<z-m>-0.442379</z-m>
			<pitch-deg>-23.69</pitch-deg>
		</offsets>
	</model>
	<model>
		<name>vsi</name>
		<path>Instruments/vario-5stv5/winter-vario-5stv5.xml</path>
		<offsets>
			<x-m>-2.89797 </x-m>
			<y-m> 0.0     </y-m>
			<z-m>-0.527305</z-m>
			<pitch-deg>-23.69</pitch-deg>
		</offsets>
	</model>
	<model>
		<name>alt</name>
		<path>Instruments/alti-4110/winter-4110.xml</path>
		<offsets>
			<x-m>-2.85927 </x-m>
			<y-m> 0.0     </y-m>
			<z-m>-0.615515</z-m>
			<pitch-deg>-23.69</pitch-deg>
		</offsets>
	</model>

	<animation>
		<type>select</type>
		<object-name>panel</object-name>
		<object-name>asi</object-name>
		<object-name>vsi</object-name>
		<object-name>alt</object-name>
		<condition>
			<property>controls/cabin/panel</property>
		</condition>
	</animation>
	<animation>
		<type>select</type>
		<object-name>rear_fairing</object-name>
		<condition>
			<property>controls/flight/rear-fairing</property>
		</condition>
	</animation>

	<!--Rudder-->
	<animation>
		<type>rotate</type>
		<object-name>rudder_pedals.tube.1</object-name>
		<object-name>rudder_pedal.L</object-name>
		<object-name>rudder_pedal.R</object-name>
		<property>surface-positions/rudder-pos-norm</property>
		<factor>20</factor>
		<axis>
			<object-name>rudder_pedals.tube.1.axis</object-name>
		</axis>
	</animation>
	<animation>
		<type>rotate</type>
		<object-name>rudder_pedals.tube.2</object-name>
		<property>surface-positions/rudder-pos-norm</property>
		<factor>20</factor>
		<axis>
			<object-name>rudder_pedals.tube.2.axis</object-name>
		</axis>
	</animation>
	<animation>
		<type>rotate</type>
		<object-name>rudder_pedal.L</object-name>
		<property>surface-positions/rudder-pos-norm</property>
		<factor>-20</factor>
		<axis>
			<object-name>rudder_pedal.L.axis</object-name>
		</axis>
	</animation>
	<animation>
		<type>rotate</type>
		<object-name>rudder_pedal.R</object-name>
		<property>surface-positions/rudder-pos-norm</property>
		<factor>20</factor>
		<axis>
			<object-name>rudder_pedal.R.axis</object-name>
		</axis>
	</animation>

	<animation>
		<type>rotate</type>
		<object-name>aileronL</object-name>
		<property>surface-positions/left-aileron-pos-norm</property>
		<factor>20</factor>
		<center>
			<x-m>-0.83688</x-m>
			<y-m>0</y-m>
			<z-m>0.35951</z-m>
		</center>
		<axis>
			<x>0</x>
			<y>1</y>
			<z>0</z>
		</axis>
	</animation>
	<animation>
		<type>rotate</type>
		<object-name>aileronR</object-name>
		<property>surface-positions/right-aileron-pos-norm</property>
		<factor>20</factor>
		<center>
			<x-m>-0.83688</x-m>
			<y-m>0</y-m>
			<z-m>0.35951</z-m>
		</center>
		<axis>
			<x>0</x>
			<y>1</y>
			<z>0</z>
		</axis>
	</animation>
	
	<animation>
		<type>rotate</type>
		<object-name>elevator</object-name>
		<property>surface-positions/elevator-pos-norm</property>
		<factor>-20</factor>
		<axis>
			<object-name>elevator.axis</object-name>
		</axis>
	</animation>
	
	<animation>
		<type>rotate</type>
		<object-name>rudder</object-name>
		<property>surface-positions/rudder-pos-norm</property>
		<factor>-20</factor>
		<axis>
			<object-name>rudder.axis</object-name>
		</axis>
	</animation>

	<!-- Yoke -->
	<animation>
		<type>rotate</type>
		<object-name>control_stick</object-name>
		<property>surface-positions/elevator-pos-norm</property>
		<factor>-20</factor>
		<axis>
			<object-name>control_stick.axis</object-name>
		</axis>
	</animation>
	<animation>
		<type>rotate</type>
		<object-name>control_stick</object-name>
		<object-name>control_stick.tube</object-name>
		<property>controls/flight/aileron</property>
		<factor>20</factor>
		<axis>
			<object-name>control_stick.tube.axis</object-name>
		</axis>
	</animation>
	
	<!-- Skid Compression -->
	<animation>
		<type>rotate</type>
		<object-name>skid</object-name>
		<object-name>damper.F.low</object-name>
		<object-name>damper.R.low</object-name>
		<property>gear/gear[0]/compression-norm</property>
		<factor>1</factor>
		<axis>
			<object-name>skid.axis</object-name>
		</axis>
	</animation>
	
	
</PropertyList>
