<?xml version="1.0"?>

<PropertyList>

  <path>MiG-15bis-Gyrocompass.ac</path> 

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

	<animation>
		<type>range</type>
		<min-m>0</min-m>
		<max-m>30</max-m>
	</animation>

	<animation>
		<type>material</type>
		<object-name>GC_MDisk</object-name>
		<object-name>GC_CDisk</object-name>
		<object-name>GC_Needle</object-name>
  		<emission>
			<factor-prop>systems/electrical-real/outputs/horizon/volts-norm</factor-prop>
			<red>0.222</red>
			<green>0.212</green>
			<blue>0.212</blue>
		</emission>
	</animation>

<!--

	<animation>
		<type>material</type>
		<object-name>GC_MDisk</object-name>
		<object-name>GC_CDisk</object-name>
		<object-name>GC_Needle</object-name>
		<object-name>GC_Bezel</object-name>
		<object-name>GC_Up</object-name>
		<object-name>GC_Down</object-name>
		<object-name>GC_Vern</object-name>
  		<emission>
			<factor-prop>systems/electrical-real/outputs/horizon/volts-norm</factor-prop>
			<red>0.777</red>
			<green>0.700</green>
			<blue>0.700</blue>
		</emission>
		<condition>
			<equals>
				<property>systems/light/use-canopy-lamps</property>
				<value>1</value>
			</equals>
		</condition>
	</animation>

-->

	<animation>
		<type>rotate</type>
		<object-name>GC_MDisk</object-name>
		<object-name>GC_Needle</object-name>
		<property>fdm/jsbsim/systems/gyrocompass/heading-indicated-deg</property>
		<center>
			<x-m>0</x-m>
			<y-m>0</y-m>
			<z-m>0</z-m>
		</center>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
	</animation>

	<animation>
		<type>rotate</type>
		<object-name>GC_CDisk</object-name>
		<property>fdm/jsbsim/systems/gyrocompass/offset-deg</property>
		<center>
			<x-m>0</x-m>
			<y-m>0</y-m>
			<z-m>0</z-m>
		</center>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
	</animation>

	<animation>
		<type>rotate</type>
		<object-name>GC_Vern</object-name>
		<property>fdm/jsbsim/systems/gyrocompass/offset-deg</property>
		<factor>10</factor>
		<center>
			<x-m>0</x-m>
			<y-m>0</y-m>
			<z-m>-0.053</z-m>
		</center>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
	</animation>

	<animation>
		<type>translate</type>
		<object-name>GC_Vern</object-name>
		<property>fdm/jsbsim/systems/gyrocompass/button-pos</property>
		<factor>0.004</factor>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
	</animation>

	<animation>
		<type>pick</type>
		<object-name>GC_Vern</object-name>
		<action>
			<button>0</button>
			<repeatable>false</repeatable>
			<interval-sec>0.1</interval-sec>
			<binding>
				<command>nasal</command>
				<script>MIG15BIS.bitswap("fdm/jsbsim/systems/gyrocompass/button-input")</script>
			</binding>
		</action>
		<action>
			<button>0</button>
			<repeatable>false</repeatable>
			<interval-sec>0.1</interval-sec>
			<binding>
				<command>nasal</command>
				<script>MIG15BIS.bitswap("fdm/jsbsim/systems/gyrocompass/button-input")</script>
			</binding>
		</action>
	</animation>

	<animation>
		<type>pick</type>
		<object-name>GC_Down</object-name>
		<action>
			<button>0</button>
			<repeatable>true</repeatable>
			<interval-sec>0.1</interval-sec>
			<binding>
				<command>property-adjust</command>
				<property>fdm/jsbsim/systems/gyrocompass/offset-input-deg</property>
				<step>-1</step>
				<min>0</min>
				<max>360</max>
				<wrap>true</wrap>
			</binding>
		</action>
		<action>
			<button>1</button>
			<repeatable>true</repeatable>
			<interval-sec>0.1</interval-sec>
			<binding>
				<command>property-adjust</command>
				<property>fdm/jsbsim/systems/gyrocompass/offset-input-deg</property>
				<step>-5</step>
				<wrap>true</wrap>
			</binding>
		</action>
	</animation>

	<animation>
		<type>pick</type>
		<object-name>GC_Up</object-name>
		<action>
			<button>0</button>
			<repeatable>true</repeatable>
			<interval-sec>0.1</interval-sec>
			<binding>
				<command>property-adjust</command>
				<property>fdm/jsbsim/systems/gyrocompass/offset-input-deg</property>
				<step>1</step>
				<wrap>true</wrap>
			</binding>
		</action>
		<action>
			<button>1</button>
			<repeatable>true</repeatable>
			<interval-sec>0.1</interval-sec>
			<binding>
				<command>property-adjust</command>
				<property>fdm/jsbsim/systems/gyrocompass/offset-input-deg</property>
				<step>5</step>
				<min>0</min>
				<max>360</max>
				<wrap>true</wrap>
			</binding>
		</action>
	</animation>

</PropertyList> 
