<?xml version="1.0"?>

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

<PropertyList>

	<path>NSA360.ac</path>
	
	<effect>
		<inherits-from>Effects/model-transparent</inherits-from>
		<object-name>heading.card</object-name>
		<object-name>loc.scale</object-name>
		<object-name>gs.scale</object-name>
	</effect>
	
	<animation>
		<type>material</type>
		<object-name>ac_symbol</object-name>
		<object-name>heading.card</object-name>
		<object-name>heading.bug</object-name>
		<object-name>hdg.flag</object-name>
		<object-name>nav.flag</object-name>
		<object-name>gs.flag</object-name>
		<object-name>loc.scale</object-name>
		<object-name>gs.scale</object-name>
		<object-name>cdi.needle.1</object-name>
		<object-name>cdi.needle.2</object-name>
		<object-name>Plane</object-name>
		<object-name>Plane.004</object-name>
		<emission>
			<red>0.6</red>
			<green>0.6</green>
			<blue>0.6</blue>
			<factor-prop>controls/lighting/panel-norm</factor-prop>
		</emission>
	</animation>
	
	<animation>
		<type>select</type>
		<object-name>hdg.flag</object-name>
		<condition>
			<less-than>
				<property>instrumentation/heading-indicator/spin</property>
				<value>0.2</value>
			</less-than>
		</condition>
	</animation>
	
	<animation> <!-- TODO: Rotate -->
		<type>select</type>
		<object-name>nav.flag</object-name>
		<condition>
			<less-than>
				<property>instrumentation/nav[0]/nav-flag</property>
				<value>0.1</value>
			</less-than>
		</condition>
	</animation>
	
	<animation> <!-- TODO: Rotate -->
		<type>select</type>
		<object-name>gs.flag</object-name>
		<condition>
			<or>
				<less-than>
					<property>instrumentation/nav[0]/gs-flag</property>
					<value>0.1</value>
				</less-than>
				<not><property>instrumentation/nav[0]/has-gs</property></not>
			</or>
		</condition>
	</animation>
	
	<animation>
		<type>rotate</type>
		<object-name>heading.card</object-name>
		<object-name>heading.bug</object-name>
		<object-name>cdi.needle.1</object-name>
		<object-name>cdi.needle.2</object-name>
		<object-name>loc.scale</object-name>
		<property>instrumentation/heading-indicator/indicated-heading-deg</property>
		<factor>-1</factor>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>0</x-m>
			<y-m>0.0</y-m>
			<z-m>-0.002834</z-m>
		</center>
	</animation>
	
	<animation>
		<type>rotate</type>
		<object-name>heading.bug</object-name>
		<property>autopilot/settings/heading-bug-deg</property>
		<factor>1</factor>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>0</x-m>
			<y-m>0.0</y-m>
			<z-m>-0.002834</z-m>
		</center>
	</animation>

	<animation>
		<type>rotate</type>
		<object-name>cdi.needle.1</object-name>
		<object-name>cdi.needle.2</object-name>
		<object-name>loc.scale</object-name>
		<property>instrumentation/nav[0]/radials/selected-deg</property>
		<factor>1</factor>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>0</x-m>
			<y-m>0.0</y-m>
			<z-m>-0.002834</z-m>
		</center>
	</animation>

	<animation>
		<type>translate</type>
		<object-name>cdi.needle.1</object-name>
		<property>instrumentation/nav[0]/heading-needle-deflection-norm-lag</property>
		<interpolation>
			<entry><ind>-0.4</ind><dep>-0.0129</dep></entry>
			<entry><ind>0.4</ind><dep>0.0129</dep></entry>
		</interpolation>
		<axis>
			<x>0</x>
			<y>1</y>
			<z>0</z>
		</axis>
	</animation>

	<animation>
		<type>translate</type>
		<object-name>gs.needle</object-name>
		<property>instrumentation/nav[0]/gs-needle-deflection-norm-lag</property>
		<interpolation>
			<entry><ind>-0.4</ind><dep>-0.0115</dep></entry>
			<entry><ind>0.4</ind><dep>0.0115</dep></entry>
		</interpolation>
		<axis>
			<x>0</x>
			<y>0</y>
			<z>1</z>
		</axis>
	</animation>

	<!-- Heading Offset/Bug -->
	<animation>
		<type>pick</type>
		<object-name>card.knob</object-name>
		<action>
			<button>0</button>
			<button>3</button>
			<repeatable>true</repeatable>
			<binding>
				<condition>
					<and>
						<not><property>devices/status/keyboard/ctrl</property></not>
						<not><property>devices/status/keyboard/shift</property></not>
					</and>
				</condition>
				<command>property-adjust</command>
				<property>autopilot/settings/heading-bug-deg</property>
				<step>1</step>
				<min>1</min>
				<max>361</max>
				<wrap>true</wrap>
			</binding>
			<binding>
				<condition>
					<and>
						<not><property>devices/status/keyboard/ctrl</property></not>
						<property>devices/status/keyboard/shift</property>
					</and>
				</condition>
				<command>property-adjust</command>
				<property>autopilot/settings/heading-bug-deg</property>
				<step>10</step>
				<min>1</min>
				<max>361</max>
				<wrap>true</wrap>
			</binding>
			<binding>
				<condition>
					<and>
						<property>devices/status/keyboard/ctrl</property>
						<not><property>devices/status/keyboard/shift</property></not>
					</and>
				</condition>
				<command>property-adjust</command>
				<property>instrumentation/heading-indicator/offset-deg</property>
				<step>1</step>
				<min>1</min>
				<max>361</max>
				<wrap>true</wrap>
			</binding>
			<binding>
				<condition>
					<and>
						<property>devices/status/keyboard/ctrl</property>
						<property>devices/status/keyboard/shift</property>
					</and>
				</condition>
				<command>property-adjust</command>
				<property>instrumentation/heading-indicator/offset-deg</property>
				<step>10</step>
				<min>1</min>
				<max>361</max>
				<wrap>true</wrap>
			</binding>
		</action>
		<action>
			<button>1</button>
			<button>4</button>
			<repeatable>true</repeatable>
			<binding>
				<condition>
					<and>
						<not><property>devices/status/keyboard/ctrl</property></not>
						<not><property>devices/status/keyboard/shift</property></not>
					</and>
				</condition>
				<command>property-adjust</command>
				<property>autopilot/settings/heading-bug-deg</property>
				<step>-1</step>
				<min>1</min>
				<max>361</max>
				<wrap>true</wrap>
			</binding>
			<binding>
				<condition>
					<and>
						<not><property>devices/status/keyboard/ctrl</property></not>
						<property>devices/status/keyboard/shift</property>
					</and>
				</condition>
				<command>property-adjust</command>
				<property>autopilot/settings/heading-bug-deg</property>
				<step>-10</step>
				<min>1</min>
				<max>361</max>
				<wrap>true</wrap>
			</binding>
			<binding>
				<condition>
					<and>
						<property>devices/status/keyboard/ctrl</property>
						<not><property>devices/status/keyboard/shift</property></not>
					</and>
				</condition>
				<command>property-adjust</command>
				<property>instrumentation/heading-indicator/offset-deg</property>
				<step>-1</step>
				<min>1</min>
				<max>361</max>
				<wrap>true</wrap>
			</binding>
			<binding>
				<condition>
					<and>
						<property>devices/status/keyboard/ctrl</property>
						<property>devices/status/keyboard/shift</property>
					</and>
				</condition>
				<command>property-adjust</command>
				<property>instrumentation/heading-indicator/offset-deg</property>
				<step>-10</step>
				<min>1</min>
				<max>361</max>
				<wrap>true</wrap>
			</binding>
		</action>
		<hovered>
			<binding>
				<condition>
					<not><property>devices/status/keyboard/ctrl</property></not>
				</condition>
				<command>set-tooltip</command>
				<tooltip-id>nsa360-bug</tooltip-id>
				<mapping>heading</mapping>
				<label>Heading Bug: %3d</label>
				<property>autopilot/settings/heading-bug-deg</property>
			</binding>
			<binding>
				<condition>
					<property>devices/status/keyboard/ctrl</property>
				</condition>
				<command>set-tooltip</command>
				<tooltip-id>nsa360-offset</tooltip-id>
				<mapping>heading</mapping>
				<label>Card Offset</label>
				<property>instrumentation/heading-indicator/offset-deg</property>
			</binding>
		</hovered>
	</animation>
	
	<animation>
		<type>rotate</type>
		<object-name>card.knob</object-name>
		<property>instrumentation/heading-indicator/offset-deg</property>
		<factor>6</factor>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>0</x-m>
			<y-m>0.03546</y-m>
			<z-m>-0.034725</z-m>
		</center>
	</animation>
	<animation>
		<type>rotate</type>
		<object-name>card.knob</object-name>
		<property>autopilot/settings/heading-bug-deg</property>
		<factor>6</factor>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>0</x-m>
			<y-m>0.03546</y-m>
			<z-m>-0.034725</z-m>
		</center>
	</animation>
	<!--
	<animation>
		<type>translate</type>
		<object-name>card.knob</object-name>
		<property>devices/status/keyboard/ctrl</property>
		<factor>-0.004</factor>
		<axis>
			<x>1</x>
			<y>0</y>
			<z>0</z>
		</axis>
	</animation>-->
	
	<!-- Course control -->
	<animation>
		<type>pick</type>
		<object-name>crs.knob</object-name>
		<action>
			<button>0</button>
			<button>3</button>
			<repeatable>true</repeatable>
			<binding>
				<condition>
					<not><property>devices/status/keyboard/shift</property></not>
				</condition>
				<command>property-adjust</command>
				<property>instrumentation/nav[0]/radials/selected-deg</property>
				<step>1</step>
				<min>1</min>
				<max>361</max>
				<wrap>true</wrap>
			</binding>
			<binding>
				<condition>
					<property>devices/status/keyboard/shift</property>
				</condition>
				<command>property-adjust</command>
				<property>instrumentation/nav[0]/radials/selected-deg</property>
				<step>10</step>
				<min>1</min>
				<max>361</max>
				<wrap>true</wrap>
			</binding>
		</action>
		<action>
			<button>1</button>
			<button>4</button>
			<repeatable>true</repeatable>
			<binding>
				<condition>
					<not><property>devices/status/keyboard/shift</property></not>
				</condition>
				<command>property-adjust</command>
				<property>instrumentation/nav[0]/radials/selected-deg</property>
				<step>-1</step>
				<min>1</min>
				<max>361</max>
				<wrap>true</wrap>
			</binding>
			<binding>
				<condition>
					<property>devices/status/keyboard/shift</property>
				</condition>
				<command>property-adjust</command>
				<property>instrumentation/nav[0]/radials/selected-deg</property>
				<step>-10</step>
				<min>1</min>
				<max>361</max>
				<wrap>true</wrap>
			</binding>
		</action>
		<hovered>
			<binding>
				<command>set-tooltip</command>
				<tooltip-id>nsa360-crs</tooltip-id>
				<mapping>heading</mapping>
				<label>NAV1 Course: %3d</label>
				<property>instrumentation/nav[0]/radials/selected-deg</property>
			</binding>
		</hovered>
	</animation>
	
	<animation>
		<type>rotate</type>
		<object-name>crs.knob</object-name>
		<property>instrumentation/nav[0]/radials/selected-deg</property>
		<factor>6</factor>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>0</x-m>
			<y-m>-0.03546</y-m>
			<z-m>-0.034725</z-m>
		</center>
	</animation>

</PropertyList>
