<?xml version="1.0"?>
<!--
  Copyright (C) 2010  Anders Gidenstam  (anders(at)gidenstam.org)
  This file is licensed under the GPL license version 2 or later.
	
	Amendment to alter into standard RAF compass type P 11
	
-->
<PropertyList>

	<!-- Overlay these to set the compass indication and heading bug source
      properties.
 -->
	<params>
		<indicated-heading-deg>instrumentation/magnetic-compass[0]/indicated-heading-deg</indicated-heading-deg>
		<heading-bug-deg>autopilot/settings/heading-bug-deg</heading-bug-deg>
		<serviceable>instrumentation/magnetic-compass[0]/serviceable</serviceable>
	</params>

	<path>compass-p11.ac</path>

	<offsets>
		<!-- x/y/z == back/right/up -->
		<x-m> 0.000 </x-m>
		<y-m> 0.000 </y-m>
		<z-m> 0.000 </z-m>
	</offsets>

	<effect>
		<inherits-from>Effects/model-transparent</inherits-from>
		<object-name>glass</object-name>
	</effect>

	<animation>
		<type>pick</type>
		<object-name>button-left</object-name>
		<visible>false</visible>
		<action>
			<button>0</button>
			<repeatable>true</repeatable>
			<interval-sec>0.2</interval-sec>
			<binding>
				<command>property-adjust</command>
				<property alias="../../../../params/heading-bug-deg"/>
				<step>1.0</step>
				<min>0.0</min>
				<max>359.0</max>
				<wrap>true</wrap>
			</binding>
		</action>
	</animation>
	<animation>
		<type>pick</type>
		<object-name>button-right</object-name>
		<visible>false</visible>
		<action>
			<button>0</button>
			<repeatable>true</repeatable>
			<interval-sec>0.2</interval-sec>
			<binding>
				<command>property-adjust</command>
				<property alias="../../../../params/heading-bug-deg"/>
				<step>-1.0</step>
				<min>0.0</min>
				<max>359.0</max>
				<wrap>true</wrap>
			</binding>
		</action>
	</animation>
	<animation>
		<type>pick</type>
		<object-name>button-left-fast</object-name>
		<visible>false</visible>
		<action>
			<button>0</button>
			<repeatable>true</repeatable>
			<binding>
				<command>property-adjust</command>
				<property alias="../../../../params/heading-bug-deg"/>
				<step>1.0</step>
				<min>0.0</min>
				<max>359.0</max>
				<wrap>true</wrap>
			</binding>
		</action>
	</animation>
	<animation>
		<type>pick</type>
		<object-name>button-right-fast</object-name>
		<visible>false</visible>
		<action>
			<button>0</button>
			<repeatable>true</repeatable>
			<binding>
				<command>property-adjust</command>
				<property alias="../../../../params/heading-bug-deg"/>
				<step>-1.0</step>
				<min>0.0</min>
				<max>359.0</max>
				<wrap>true</wrap>
			</binding>
		</action>
	</animation>


	<!--<animation>
		<name>compass_unit</name>
		<object-name>housing</object-name>
		<object-name>glass</object-name>
		<object-name>bezel</object-name>
		<object-name>card</object-name>
		<object-name>heading_bug</object-name>
		<object-name>heading_bug_knob</object-name>
	</animation>-->

	<!--<animation>
		<type>rotate</type>
		<object-name>compass_unit</object-name>
		<property>orientation/roll-deg</property>
		<factor>1.0</factor>
		<center>
			<x-m>  0.00 </x-m>
			<y-m>  0.00 </y-m>
			<z-m>  0.25 </z-m>
		</center>
		<axis>
			<x>1.0</x>
			<y>0.0</y>
			<z>0.0</z>
		</axis>
	</animation>

	<animation>
		<type>rotate</type>
		<object-name>gimbal</object-name>
		<object-name>compass_unit</object-name>
		<property>orientation/pitch-deg</property>
		<factor>-1.0</factor>
		<center>
			<x-m>  0.00 </x-m>
			<y-m>  0.00 </y-m>
			<z-m>  0.25 </z-m>
		</center>
		<axis>
			<x>0.0</x>
			<y>1.0</y>
			<z>0.0</z>
		</axis>
	</animation>-->

	<animation>
		<type>rotate</type>
		<object-name>card</object-name>
		<property alias="../../params/indicated-heading-deg"/>
		<factor>1.0</factor>
		<center>
			<x-m>  0.00 </x-m>
			<y-m>  0.00 </y-m>
			<z-m>  0.00 </z-m>
		</center>
		<axis>
			<x>0.0</x>
			<y>0.0</y>
			<z>1.0</z>
		</axis>
	</animation>

	<animation>
		<type>rotate</type>
		<object-name>bezel</object-name>
		<object-name>heading_bug</object-name>
		<object-name>heading_bug_knob</object-name>
		<property alias="../../params/heading-bug-deg"/>
		<factor>1.0</factor>
		<center>
			<x-m>  0.00 </x-m>
			<y-m>  0.00 </y-m>
			<z-m>  0.00 </z-m>
		</center>
		<axis>
			<x>0.0</x>
			<y>0.0</y>
			<z>1.0</z>
		</axis>
	</animation>

	<animation>
		<type>material</type>
		<object-name>bracket-support</object-name>
		<condition>
			<or>
			<equals>
				<property>sim/aircraft</property>
				<value>seafireIIIc</value>
			</equals>	
				<equals>
				<property>sim/aircraft</property>
				<value>spitfireVb</value>
			</equals>
			</or>
		</condition>
		<texture>seafire-tx-00.png</texture>
	</animation>

	<animation>
		<type>material</type>
		<condition>
			<greater-than>
				<property>/controls/lighting/panel-norm</property>
				<value>0</value>
			</greater-than>
		</condition>
		<emission>
			<factor-prop>/controls/lighting/panel-norm</factor-prop>
			<red>0.75</red>
			<green>0.25</green>
			<blue>0.25</blue>
		</emission>
	</animation>

	<animation>
		<type>noshadow</type>
	</animation>

</PropertyList>
