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

<PropertyList>

	<path>vor.ac</path>

	<!-- PARAMETERS -->
	<params>
		<indicated-heading-deg>orientation/heading-magnetic-deg</indicated-heading-deg>
		<nav-display n="0">instrumentation/nav-compass[0]/nav-display[0]</nav-display>
		<nav-display n="1">instrumentation/nav-compass[0]/nav-display[1]</nav-display>
	</params>

	<!-- ANIMATIONS -->
	<!-- Lighting -->
	<animation>
		<name>Standby VOR display illumination</name>
		<type>material</type>
		<object-name>Face</object-name>
		<object-name>InsideFrame</object-name>
		<object-name>Needle1ADF</object-name>
		<object-name>Needle1VOR</object-name>
		<object-name>Needle2ADF</object-name>
		<object-name>Needle2VOR</object-name>
		<emission>
			<red>0.4</red>
			<green>0.35</green>
			<blue>0.21</blue>
			<factor-prop>controls/lighting/instruments-norm</factor-prop>
		</emission>
	</animation>

	<!-- Face and needles -->
	<animation>
		<name>Heading rotate</name>
		<type>rotate</type>
		<object-name>Face</object-name>
		<object-name>Needle1VOR</object-name>
		<object-name>Needle2VOR</object-name>
		<property alias="../../params/indicated-heading-deg" />
		<axis>
			<x>1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>0</x-m>
			<y-m>0</y-m>
			<z-m>0</z-m>
		</center>
	</animation>

	<animation>
		<name>VOR1 select</name>
		<type>select</type>
		<object-name>Needle1VOR</object-name>
		<condition>
			<equals>
				<property alias="../../../../params/nav-display[0]" />
				<value>0</value>
			</equals>
		</condition>
	</animation>
	<animation>
		<name>VOR1 rotate</name>
		<type>rotate</type>   
		<object-name>Needle1VOR</object-name>
		<property>instrumentation/nav[0]/heading-deg</property>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>0</x-m>
			<y-m>0</y-m>
			<z-m>0</z-m>
		</center>
	</animation>
	<animation>
		<name>ADF1 select</name>
		<type>select</type>
		<object-name>Needle1ADF</object-name>
		<condition>
			<equals>
				<property alias="../../../../params/nav-display[0]" />
				<value>1</value>
			</equals>
		</condition>
	</animation>
	<animation>
		<name>ADF1 rotate</name>
		<type>rotate</type>   
		<object-name>Needle1ADF</object-name>
		<property>instrumentation/adf[0]/indicated-bearing-deg</property>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>0</x-m>
			<y-m>0</y-m>
			<z-m>0</z-m>
		</center>
	</animation>

	<animation>
		<name>VOR2 select</name>
		<type>select</type>
		<object-name>Needle2VOR</object-name>
		<condition>
			<equals>
				<property alias="../../../../params/nav-display[1]" />
				<value>0</value>
			</equals>
		</condition>
	</animation>
	<animation>
		<name>VOR2 rotate</name>
		<type>rotate</type>   
		<object-name>Needle2VOR</object-name>
		<property>instrumentation/nav[1]/heading-deg</property>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>0</x-m>
			<y-m>0</y-m>
			<z-m>0</z-m>
		</center>
	</animation>
	<animation>
		<name>ADF2 select</name>
		<type>select</type>
		<object-name>Needle2ADF</object-name>
		<condition>
			<equals>
				<property alias="../../../../params/nav-display[1]" />
				<value>1</value>
			</equals>
		</condition>
	</animation>
	<animation>
		<name>ADF2 rotate</name>
		<type>rotate</type>   
		<object-name>Needle2ADF</object-name>
		<property>instrumentation/adf[1]/indicated-bearing-deg</property>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>0</x-m>
			<y-m>0</y-m>
			<z-m>0</z-m>
		</center>
	</animation>

	<!-- VOR/ADF switches -->
	<animation>
		<name>NAV1 switch pick</name>
		<type>pick</type>
		<object-name>NAV1</object-name>
		<action>
			<button>0</button>
			<repeatable type="bool">false</repeatable>
			<binding>
				<command>property-cycle</command>
				<property alias="../../../../params/nav-display[0]" />
				<value type="int">0</value>
				<value type="int">1</value>
			</binding>
		</action>
	</animation>
	<animation>
		<name>NAV1 switch rotate</name>
		<type>rotate</type>
		<object-name>NAV1</object-name>
		<property alias="../../params/nav-display[0]" />
		<factor>90</factor>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>0</x-m>
			<y-m>-0.030024</y-m>
			<z-m>-0.029376</z-m>
		</center>
	</animation>

	<animation>
		<name>NAV2 switch pick</name>
		<type>pick</type>
		<object-name>NAV2</object-name>
		<action>
			<button>0</button>
			<repeatable type="bool">false</repeatable>
			<binding>
				<command>property-cycle</command>
				<property alias="../../../../params/nav-display[1]" />
				<value type="int">0</value>
				<value type="int">1</value>
			</binding>
		</action>
	</animation>
	<animation>
		<name>NAV2 switch rotate</name>
		<type>rotate</type>
		<object-name>NAV2</object-name>
		<property alias="../../params/nav-display[1]" />
		<factor>90</factor>
		<axis>
			<x>1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>0</x-m>
			<y-m>0.0296055</y-m>
			<z-m>-0.029376</z-m>
		</center>
	</animation>

</PropertyList>
