<?xml version="1.0" encoding="ISO-8859-1"?>

<!-- (c) 2015 by lastmin-II

Based on work by Yurik V. Nikiroff (c) 2007 and Helijah (c) 2012, 2014.

Changes:
- new dial and graphics;
- improved 3D model;
- corrected centers;
- set for metric altitude and hPa pressure;
- knob with tooltips for QNH setting.

Updated Helijah 2015
-->

<PropertyList>

  <path>alt_m.ac</path>

  <animation>
    <object-name>fond</object-name>
    <object-name>bkg</object-name>
    <object-name>face</object-name>
    <object-name>needle</object-name>
    <object-name>knob</object-name>
    <object-name>alt10</object-name>
    <object-name>alt100</object-name>
    <object-name>alt1000</object-name>
    <object-name>alt10000</object-name>
    <object-name>millibar1</object-name>
    <object-name>millibar10</object-name>
    <object-name>millibar100</object-name>
    <object-name>millibar1000</object-name>

    <object-name>vitre</object-name>
  </animation>

  <animation>
    <type>noshadow</type>
    <object-name>fond</object-name>
    <object-name>bkg</object-name>
    <object-name>face</object-name>
    <object-name>needle</object-name>
    <object-name>knob</object-name>
    <object-name>alt10</object-name>
    <object-name>alt100</object-name>
    <object-name>alt1000</object-name>
    <object-name>alt10000</object-name>
    <object-name>millibar1</object-name>
    <object-name>millibar10</object-name>
    <object-name>millibar100</object-name>
    <object-name>millibar1000</object-name>
    <object-name>vitre</object-name>
  </animation>

  <!-- working for Compositor -->
  <effect>
    <inherits-from>../../../../Effects/Glass/glass</inherits-from>
    <object-name>vitre</object-name>
    <object-name>vitre</object-name>
  </effect>

  <!-- Internal instruments lighting -->
  <animation>
    <type>material</type>
    <object-name>face</object-name>
    <object-name>alt10</object-name>
    <object-name>alt100</object-name>
    <object-name>alt1000</object-name>
    <object-name>alt10000</object-name>
    <object-name>millibar1</object-name>
    <object-name>millibar10</object-name>
    <object-name>millibar100</object-name>
    <object-name>millibar1000</object-name>
    <object-name>needle</object-name>
    <condition>
      <property>controls/electric/battery-switch</property>
    </condition>
    <emission>
      <factor-prop>controls/lighting/instruments-norm</factor-prop>
      <red>   0.50 </red>
      <green> 0.40 </green>
      <blue>  0.30 </blue>
    </emission>
  </animation>

  <!-- Needle -->
  <animation>
    <type>rotate</type>
    <object-name>needle</object-name>
    <property>instrumentation/altimeter/indicated-altitude-ft</property>
    <factor> 0.10973 </factor>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!-- Altitude digits (meters) -->
  <animation>
    <type>rotate</type>
    <object-name>alt10</object-name>
    <property>instrumentation/altimeter/indicated-altitude-ft</property>
    <factor> 1.0973 </factor>
    <center>
      <x-m> -0.01188 </x-m>
      <y-m>  0.01731 </y-m>
      <z-m>  0.00311 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>alt100</object-name>
    <property>instrumentation/altimeter/m/unit100</property>
    <factor> 36 </factor>
    <center>
      <x-m> -0.01188 </x-m>
      <y-m>  0.00800 </y-m>
      <z-m>  0.00311 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>alt1000</object-name>
    <property>instrumentation/altimeter/m/unit1000</property>
    <factor> 36 </factor>
    <center>
      <x-m> -0.01188 </x-m>
      <y-m> -0.00761 </y-m>
      <z-m>  0.00311 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>alt10000</object-name>
    <property>instrumentation/altimeter/m/unit10000</property>
    <factor> 36 </factor>
    <center>
      <x-m> -0.01188 </x-m>
      <y-m> -0.01591 </y-m>
      <z-m>  0.00311 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Pressure digits (hPa) -->
  <animation>
    <type>rotate</type>
    <object-name>millibar1</object-name>
    <property>instrumentation/altimeter/millibar/unit1</property>
    <factor> 36 </factor>
    <center>
      <x-m> -0.00522 </x-m>
      <y-m>  0.00974 </y-m>
      <z-m> -0.02310 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>millibar10</object-name>
    <property>instrumentation/altimeter/millibar/unit10</property>
    <factor> 36 </factor>
    <center>
      <x-m> -0.00522 </x-m>
      <y-m>  0.00323 </y-m>
      <z-m> -0.02310 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>millibar100</object-name>
    <property>instrumentation/altimeter/millibar/unit100</property>
    <factor> 36 </factor>
    <center>
      <x-m> -0.00522 </x-m>
      <y-m> -0.00320 </y-m>
      <z-m> -0.02310 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>millibar1000</object-name>
    <property>instrumentation/altimeter/millibar/unit1000</property>
    <factor> 36 </factor>
    <center>
      <x-m> -0.00522 </x-m>
      <y-m> -0.00921 </y-m>
      <z-m> -0.02310 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Set QNH (hPa) -->
  <animation>
    <type>pick</type>
    <object-name>knob</object-name>
    <action>
      <button>3</button>
      <repeatable>true</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/altimeter/setting-inhg</property>
        <step> 0.029635 </step>
        <min> 10 </min>
        <max> 40 </max>
        <wrap>false</wrap>
      </binding>
    </action>
    <action>
      <button>4</button>
      <repeatable>true</repeatable>
      <interval-sec>0.2</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/altimeter/setting-inhg</property>
        <step> -0.029635 </step>
        <min> 10 </min>
        <max> 40 </max>
        <wrap>false</wrap>
      </binding>
    </action>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>setting-hpa-R</tooltip-id>
        <label>INGH (hPa):  %3d</label>
        <property>instrumentation/altimeter/setting-inhg</property>
      </binding>
    </hovered>
  </animation>

</PropertyList>
