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

<!-- ATR 72-500 for FlightGear -->
<!-- Standby Altimeter -->

<PropertyList>

	<path>altimeter.ac</path>

	<!-- PARAMETERS -->
	<params>
		<indicated-altitude-ft>instrumentation/altimeter[0]/indicated-altitude-ft</indicated-altitude-ft>
		<setting-inhg>instrumentation/altimeter[0]/setting-inhg</setting-inhg>
	</params>

	<!-- ANIMATIONS -->
	<animation>
		<name>Face lighting</name>
		<type>material</type>
		<object-name>Face</object-name>
		<condition>
			<greater-than>
				<property>systems/electrical/outputs/panel-lights</property>
				<value>15</value>
			</greater-than>
		</condition>
		<emission>
			<red>0.2</red>
			<green>0.2</green>
			<blue>0.2</blue>
		</emission>
	</animation>

	<animation>
		<name>100's needle</name>
		<type>rotate</type>
		<object-name>Needle100</object-name>
		<property alias="../../params/indicated-altitude-ft" />
		<factor>0.36</factor>
		<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>1,000's needle</name>
		<type>rotate</type>
		<object-name>Needle1000</object-name>
		<property alias="../../params/indicated-altitude-ft" />
		<factor>0.036</factor>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
	</animation>
	<animation>
		<name>10,000's needle</name>
		<type>rotate</type>
		<object-name>Needle10000</object-name>
		<property alias="../../params/indicated-altitude-ft" />
		<factor>0.0036</factor>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
	</animation>

	<animation>
		<name>INHG display</name>
		<type>texrotate</type>
		<object-name>inhg</object-name>
		<property alias="../../params/setting-inhg" />
		<interpolation>
			<entry><ind>27.9</ind><dep>0</dep></entry>
			<entry><ind>28</ind><dep>-9.35</dep></entry>
			<entry><ind>28.5</ind><dep>-59</dep></entry>
			<entry><ind>29</ind><dep>-109</dep></entry>
			<entry><ind>29.5</ind><dep>-159.5</dep></entry>
			<entry><ind>29.9</ind><dep>-200</dep></entry>
			<entry><ind>30</ind><dep>-210</dep></entry>
			<entry><ind>30.5</ind><dep>-261</dep></entry>
			<entry><ind>31</ind><dep>-310</dep></entry>
			<entry><ind>31.4</ind><dep>-350</dep></entry>
		</interpolation>
		<center>
			<x>0.5</x>
			<y>0.5</y>
		</center>
		<axis>
			<x>0</x>
			<y>0</y>
			<z>1</z>
		</axis>
	</animation>

	<animation>
		<name>INHG knob</name>
		<type>pick</type>
		<object-name>Knob</object-name>
		<action>
			<button>0</button>
			<button>3</button>
			<repeatable type="bool">true</repeatable>
			<binding>
				<command>property-adjust</command>
				<property alias="../../../../params/setting-inhg" />
				<step>0.01</step>
				<max>33</max>
			</binding>
		</action>
		<action>
			<button>1</button>
			<button>4</button>
			<repeatable type="bool">true</repeatable>
			<binding>
				<command>property-adjust</command>
				<property alias="../../../../params/setting-inhg" />
				<step>-0.01</step>
				<min>26</min>
			</binding>
		</action>
	</animation>

</PropertyList>
