<?xml version="1.0"?>

<!-- Additional HUD features -->

<PropertyList>

	<path>hud.ac</path>

	<effect>
		<inherits-from>Aircraft/f-14b/Effects/model-transparent</inherits-from>
		<object-name>sw-seeker</object-name>
		<object-name>piper</object-name>
		<object-name>tacan-from</object-name>
		<object-name>tacan-to</object-name>
		<object-name>ac-reticle</object-name>
		<object-name>g-label</object-name>
		<object-name>sw-label</object-name>
		<object-name>sp-label</object-name>
		<object-name>lock-1</object-name>
		<object-name>master-arm-locked</object-name>
		<object-name>sw-digit</object-name>
		<object-name>gun-digit</object-name>
		<object-name>sw-rng-5-scale</object-name>
		<object-name>sw-rng-5-pointer</object-name>
		<object-name>sw-rng-5-max-tick</object-name>
		<object-name>sw-rng-5-min-tick</object-name>
		<object-name>sw-rng-10-scale</object-name>
		<object-name>sw-rng-10-pointer</object-name>
		<object-name>sw-rng-10-max-tick</object-name>
		<object-name>sw-rng-10-min-tick</object-name>
		<object-name>sw-rng-20-max-tick</object-name>
		<object-name>sw-rng-20-pointer</object-name>
		<object-name>sw-rng-20-scale</object-name>
		<object-name>sw-rng-20-min-tick</object-name>
		<object-name>closure-rate-scale</object-name>
		<object-name>closure-rate-pointer</object-name>
	</effect>

	<animation>
		<type>select</type>
		<object-name>hud</object-name>
		<condition>
				<greater-than>
					<property>/fdm/jsbsim/systems/electrics/ac-left-main-bus</property>
					<value>0</value>
				</greater-than>
			<equals>
				<property>sim/current-view/name</property>
				<value>Cockpit View</value>
			</equals>
			<property>sim/model/f-14b/controls/hud/on-off</property>
        </condition>
	</animation>

	<!-- Diamond -->
	<animation>
		<type>select</type>
		<object-name>lock-1</object-name>
		<condition>
			<property>sim/model/f-14b/instrumentation/radar-awg-9/hud/target-display</property>
			<not><property>instrumentation/radar/radar-standby</property></not>
			<property>sim/model/f-14b/lighting/hud-diamond-switch/state</property>
		</condition>
	</animation>
	<animation>
		<type>rotate</type>
		<object-name>lock-1</object-name>
		<property>sim/model/f-14b/instrumentation/radar-awg-9/hud/target-total-angle</property>
		<axis><x>-1</x></axis>
	</animation>
	<animation>
		<type>translate</type>
		<object-name>lock-1</object-name>
		<property>sim/model/f-14b/instrumentation/radar-awg-9/hud/target-total-deviation</property>
		<factor>1</factor>
		<axis>
			<z>1</z>
		</axis>
	</animation>
	<animation><!-- post-rotate in inverse direction to keep the symbol vertical -->
		<type>rotate</type>
		<object-name>lock-1</object-name>
		<property>sim/model/f-14b/instrumentation/radar-awg-9/hud/target-total-angle</property>
		<axis><x>1</x></axis>
	</animation>

	<!-- Weapons labels -->
	<animation>
		<type>select</type>
		<object-name>master-arm-locked</object-name>
		<condition>
            <and><or>
                <and>
			        <not>
				        <equals>
					        <property>sim/model/f-14b/controls/armament/master-arm-switch</property>
					        <value>2</value>
				        </equals>
			        </not>
			        <not>
				        <equals>
					        <property>sim/model/f-14b/controls/armament/stick-selector</property>
					        <value>0</value>
				        </equals>
			        </not>
                </and>
                <and>
 				    <equals>
					    <property>sim/model/f-14b/controls/armament/master-arm-switch</property>
					    <value>2</value>
				    </equals>
				    <equals>
					    <property>sim/model/f-14b/controls/armament/stick-selector</property>
					    <value>1</value>
				    </equals>
                    <not>
                        <property>sim/model/f-14b/systems/gun/ready</property>
                    </not>               
                </and>
            </or>
			<property>sim/model/f-14b/controls/pilots-displays/mode/aa-bt</property></and>
		</condition>
	</animation>
	<animation>
		<type>select</type>
		<object-name>g-label</object-name>
		<condition>
			<equals>
				<property>sim/model/f-14b/controls/armament/stick-selector</property>
				<value>1</value>
			</equals>
			<property>sim/model/f-14b/controls/pilots-displays/mode/aa-bt</property>
		</condition>
	</animation>
	<animation>
		<type>select</type>
		<object-name>sw-label</object-name>
		<condition>
			<equals>
				<property>sim/model/f-14b/controls/armament/stick-selector</property>
				<value>2</value>
			</equals>
			<property>sim/model/f-14b/controls/pilots-displays/mode/aa-bt</property>
		</condition>
	</animation>
	<animation>
		<type>select</type>
		<object-name>sw-digit</object-name>
		<condition>
			<equals>
				<property>sim/model/f-14b/controls/armament/stick-selector</property>
				<value>2</value>
			</equals>
			<property>sim/model/f-14b/controls/pilots-displays/mode/aa-bt</property>
		</condition>
	</animation>
	<animation>
		<type>textranslate</type>
		<object-name>sw-digit</object-name>
		<property>sim/model/f-14b/systems/armament/aim9/count</property>
		<factor>0.1</factor>
		<offset>-1</offset>
		<step>1</step>
		<!--<scroll>0.5</scroll>-->
		<axis>
			<x>0</x>
			<y>-1</y>
			<z>0</z>
		</axis>
	</animation>
	<animation>
		<type>select</type>
		<object-name>sp-label</object-name>
		<condition>
			<equals>
				<property>sim/model/f-14b/controls/armament/stick-selector</property>
				<value>3</value>
			</equals>
			<property>sim/model/f-14b/controls/pilots-displays/mode/aa-bt</property>
		</condition>
	</animation>
	<animation>
		<type>select</type>
		<object-name>gun-digit</object-name>
		<condition>
			<equals>
				<property>sim/model/f-14b/controls/armament/stick-selector</property>
				<value>1</value>
			</equals>
			<property>sim/model/f-14b/systems/gun/ready</property>
			<property>sim/model/f-14b/controls/pilots-displays/mode/aa-bt</property>
		</condition>
	</animation>
	<animation>
		<type>textranslate</type>
		<object-name>gun-digit</object-name>
		<property>sim/model/f-14b/systems/gun/rounds</property>
		<factor>0.001</factor>
		<offset>-100</offset>
		<step>100</step>
		<scroll>0.5</scroll>
		<axis>
			<x>0</x>
			<y>-1</y>
			<z>0</z>
		</axis>
	</animation>
	<animation>
		<type>select</type>
		<object-name>piper</object-name>
		<condition>
			<equals>
				<property>sim/model/f-14b/controls/armament/stick-selector</property>
				<value>1</value>
			</equals>
			<property>sim/model/f-14b/controls/pilots-displays/mode/aa-bt</property>
		</condition>
	</animation>

	<!-- Sidewinder Range label -->
	<animation>
		<type>select</type>
		<object-name>sw-rng-5</object-name>
		<condition>
			<equals>
				<property>sim/model/f-14b/controls/armament/stick-selector</property>
				<value>2</value>
			</equals>
			<equals>
				<property>instrumentation/radar/radar2-range</property>
				<value>5</value>
			</equals>
			<property>sim/model/f-14b/controls/pilots-displays/mode/aa-bt</property>
		</condition>
	</animation>
	<animation>
		<type>translate</type>
		<object-name>sw-rng-5-pointer</object-name>
		<property>sim/model/f-14b/systems/armament/aim9/target-range-nm</property>
		<factor>0.0148</factor>
		<axis><z>1</z></axis>
	</animation>
	<animation>
		<type>select</type>
		<object-name>sw-rng-10</object-name>
		<condition>
			<equals>
				<property>sim/model/f-14b/controls/armament/stick-selector</property>
				<value>2</value>
			</equals>
			<equals>
				<property>instrumentation/radar/radar2-range</property>
				<value>10</value>
			</equals>
			<property>sim/model/f-14b/controls/pilots-displays/mode/aa-bt</property>
		</condition>
	</animation>
	<animation>
		<type>translate</type>
		<object-name>sw-rng-10-pointer</object-name>
		<property>sim/model/f-14b/systems/armament/aim9/target-range-nm</property>
		<factor>0.0074</factor>
		<axis><z>1</z></axis>
	</animation>
	<animation>
		<type>select</type>
		<object-name>sw-rng-20</object-name>
		<condition>
			<equals>
				<property>sim/model/f-14b/controls/armament/stick-selector</property>
				<value>2</value>
			</equals>
			<equals>
				<property>instrumentation/radar/radar2-range</property>
				<value>20</value>
			</equals>
			<property>sim/model/f-14b/controls/pilots-displays/mode/aa-bt</property>
		</condition>
	</animation>
	<animation>
		<type>translate</type>
		<object-name>sw-rng-20-pointer</object-name>
		<property>sim/model/f-14b/systems/armament/aim9/target-range-nm</property>
		<factor>0.0037</factor>
		<axis><z>1</z></axis>
	</animation>

	<animation>
		<type>select</type>
		<object-name>sw-seeker</object-name>
		<condition>
			<equals>
				<property>sim/model/f-14b/controls/armament/stick-selector</property>
				<value>2</value>
			</equals>
			<property>sim/model/f-14b/controls/pilots-displays/mode/aa-bt</property>
		</condition>
	</animation>
	<animation>
		<type>rotate</type>
		<object-name>sw-seeker</object-name>
		<property>sim/model/f-14b/instrumentation/radar-awg-9/hud/reticle-total-angle</property>
		<axis><x>-1</x></axis>
	</animation>
	<animation>
		<type>translate</type>
		<object-name>sw-seeker</object-name>
		<property>sim/model/f-14b/instrumentation/radar-awg-9/hud/reticle-total-deviation</property>
		<factor>1</factor>
		<axis>
			<z>1</z>
		</axis>
	</animation>
	<animation><!-- post-rotate in inverse direction to keep the symbol vertical -->
		<type>rotate</type>
		<object-name>sw-seeker</object-name>
		<property>sim/model/f-14b/instrumentation/radar-awg-9/hud/reticle-total-angle</property>
		<axis><x>1</x></axis>
	</animation>

	<!-- Closure Rate Scale -->
	<animation>
		<type>select</type>
		<object-name>closure-rate</object-name>
		<condition>
			<not>
				<equals>
					<property>sim/model/f-14b/controls/armament/stick-selector</property>
					<value>0</value>
				</equals>
			</not>
			<property>sim/model/f-14b/controls/pilots-displays/mode/aa-bt</property>
		</condition>
	</animation>
	<animation>
		<type>translate</type>
		<object-name>closure-rate-pointer</object-name>
		<property>sim/model/f-14b/instrumentation/radar-awg-9/hud/closure-rate</property>
		<factor>0.0000598</factor>
		<min>-0.0123</min>
		<max>0.0721</max>
		<axis><z>1</z></axis>
	</animation>


	<!-- Tacan -->
	<animation>
		<type>select</type>
		<object-name>tacan-to</object-name>
		<condition>
			<and>
				<property>sim/model/f-14b/instrumentation/hsd/to-flag</property>
				<property>instrumentation/tacan/in-range</property>
				<or>
					<equals>
						<property>sim/model/f-14b/instrumentation/tacan/mode</property>
						<value>1</value>
					</equals>
					<equals>
						<property>sim/model/f-14b/instrumentation/tacan/mode</property>
						<value>2</value>
					</equals>
				</or>
				<property>sim/model/f-14b/controls/pilots-displays/mode/cruise-bt</property>
			</and>
		</condition>
	</animation>
	<animation>
		<type>translate</type>
		<object-name>tacan-to</object-name>
		<property>sim/model/f-14b/instrumentation/hsd/needle-deflection</property>
		<interpolation>
			<entry><ind>-10</ind><dep>-0.0606</dep></entry>
			<entry><ind>0</ind><dep>0</dep></entry>
			<entry><ind>10</ind><dep>0.0606</dep></entry>
		</interpolation>
		<axis><y>1</y></axis>
	</animation>

	<animation>
		<type>select</type>
		<object-name>tacan-from</object-name>
		<condition>
			<and>
				<property>sim/model/f-14b/instrumentation/hsd/from-flag</property>
				<property>instrumentation/tacan/in-range</property>
				<or>
					<equals>
						<property>sim/model/f-14b/instrumentation/tacan/mode</property>
						<value>1</value>
					</equals>
					<equals>
						<property>sim/model/f-14b/instrumentation/tacan/mode</property>
						<value>2</value>
					</equals>
				</or>
				<property>sim/model/f-14b/controls/pilots-displays/mode/cruise-bt</property>
			</and>
		</condition>
	</animation>
	<animation>
		<type>translate</type>
		<object-name>tacan-from</object-name>
		<property>sim/model/f-14b/instrumentation/hsd/needle-deflection</property>
		<interpolation>
			<entry><ind>-10</ind><dep>0.0606</dep></entry>
			<entry><ind>0</ind><dep>0</dep></entry>
			<entry><ind>10</ind><dep>-0.0606</dep></entry>
		</interpolation>
		<axis><y>1</y></axis>
	</animation>


	<!-- lighting -->
	<animation>
		<object-name>hud</object-name>
		<type>material</type>
		<emission>
			<factor-prop>sim/model/f-14b/controls/hud/intens</factor-prop>
			<red-prop>sim/hud/color/red</red-prop>
			<green-prop>sim/hud/color/green</green-prop>
			<blue-prop>sim/hud/color/blue</blue-prop>
		</emission>
		<transparency>
			<!-- <alpha-prop>sim/hud/color/alpha</alpha-prop> -->
			<alpha-prop>sim/model/f-14b/controls/hud/intens</alpha-prop>
		</transparency>
	</animation>



</PropertyList>
