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

<!--
  Animations for the ki525 hsi indicator
  Maintainer: Torsten Dreyer
-->
<PropertyList>

  <path>ki525a.ac</path>

  <params>
    <has-gs>instrumentation/nav[0]/has-gs</has-gs>

    <gs-needle-deflection>instrumentation/kcs55/ki525/gs-deflection</gs-needle-deflection>
    <cdi-needle-deflection>instrumentation/kcs55/ki525/cdi-deflection</cdi-needle-deflection>
    <selected-heading>instrumentation/kcs55/ki525/selected-heading-deg</selected-heading>
    <selected-course>instrumentation/kcs55/ki525/selected-course-deg</selected-course>
    <to-flag>instrumentation/kcs55/ki525/to-flag</to-flag>
    <from-flag>instrumentation/kcs55/ki525/from-flag</from-flag>
    <nav-flag>instrumentation/kcs55/ki525/nav-flag</nav-flag>

    <indicated-heading>instrumentation/kcs55/kg102/indicated-heading-deg</indicated-heading>
    <hdg-flag>instrumentation/kcs55/kg102/flag-norm</hdg-flag>

    <heading-bug>autopilot/settings/heading-bug-deg</heading-bug>
  </params>

  <animation>
    <object-name>fond</object-name>
    <object-name>CompassRose</object-name>
    <object-name>cache</object-name>
    <object-name>TO</object-name>
    <object-name>FROM</object-name>
    <object-name>NAV</object-name>
    <object-name>HDG</object-name>
    <object-name>OBSSelector</object-name>
    <object-name>HDGSelector</object-name>
    <object-name>HDGBug</object-name>
    <object-name>Marker</object-name>
    <object-name>ArrowHead</object-name>
    <object-name>ArrowTail</object-name>
    <object-name>ArrowBody</object-name>
    <object-name>AircraftSymbol</object-name>
    <object-name>LubberLine</object-name>
    <object-name>CDIPlate</object-name>
    <object-name>GS</object-name>
    <object-name>.017</object-name>
    <object-name>.019</object-name>
    <object-name>.020</object-name>

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

  <animation>
    <type>noshadow</type>
    <object-name>fond</object-name>
    <object-name>cache</object-name>
    <object-name>CompassRose</object-name>
    <object-name>TO</object-name>
    <object-name>FROM</object-name>
    <object-name>NAV</object-name>
    <object-name>HDG</object-name>
    <object-name>OBSSelector</object-name>
    <object-name>HDGSelector</object-name>
    <object-name>HDGBug</object-name>
    <object-name>Marker</object-name>
    <object-name>ArrowHead</object-name>
    <object-name>ArrowTail</object-name>
    <object-name>ArrowBody</object-name>
    <object-name>AircraftSymbol</object-name>
    <object-name>LubberLine</object-name>
    <object-name>CDIPlate</object-name>
    <object-name>GS</object-name>
    <object-name>.017</object-name>
    <object-name>.019</object-name>
    <object-name>.020</object-name>
    <object-name>vitre</object-name>
  </animation>

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

  <animation>
    <type>material</type>
    <object-name>CompassRose</object-name>
    <object-name>TO</object-name>
    <object-name>FROM</object-name>
    <object-name>NAV</object-name>
    <object-name>HDG</object-name>
    <object-name>OBSSelector</object-name>
    <object-name>HDGSelector</object-name>
    <object-name>HDGBug</object-name>
    <object-name>Marker</object-name>
    <object-name>ArrowHead</object-name>
    <object-name>ArrowTail</object-name>
    <object-name>ArrowBody</object-name>
    <object-name>AircraftSymbol</object-name>
    <object-name>LubberLine</object-name>
    <object-name>CDIPlate</object-name>
    <object-name>GS</object-name>
    <object-name>.017</object-name>
    <object-name>.019</object-name>
    <object-name>.020</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>

  <animation>
    <type>rotate</type>
    <object-name>CompassRose</object-name>
    <property alias="../../params/indicated-heading"/>
    <factor>1.0</factor>
    <center>
      <x-m> -0.001 </x-m>
      <y-m>  0.000 </y-m>
      <z-m>  0.000 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>HDGBug</object-name>
    <property alias="../../params/indicated-heading"/>
    <factor>1.0</factor>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>HDGBug</object-name>
    <property alias="../../params/selected-heading"/>
    <factor> -1 </factor>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>HDGSelector</object-name>
    <property alias="../../params/selected-heading"/>
    <factor> -8 </factor>
    <center>
      <x-m>  0.008 </x-m>
      <y-m>  0.044 </y-m>
      <z-m> -0.039 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>HDGSelector</object-name>
    <property alias="../../params/indicated-heading"/>
    <factor> 8 </factor>
    <center>
      <x-m>  0.008 </x-m>
      <y-m>  0.044 </y-m>
      <z-m> -0.039 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>OBSSelector</object-name>
    <property alias="../../params/selected-course"/>
    <factor> -8 </factor>
    <center>
      <x-m>  0.008 </x-m>
      <y-m> -0.044 </y-m>
      <z-m> -0.039 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>OBSSelector</object-name>
    <property alias="../../params/indicated-heading"/>
    <factor> 8 </factor>
    <center>
      <x-m>  0.008 </x-m>
      <y-m> -0.044 </y-m>
      <z-m> -0.039 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>CDIPlate</object-name>
    <object-name>ArrowHead</object-name>
    <object-name>ArrowTail</object-name>
    <object-name>ArrowBody</object-name>
    <object-name>TO</object-name>
    <object-name>FROM</object-name>
    <property alias="../../params/indicated-heading"/>
    <factor> 1 </factor>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>CDIPlate</object-name>
    <object-name>ArrowHead</object-name>
    <object-name>ArrowTail</object-name>
    <object-name>ArrowBody</object-name>
    <object-name>TO</object-name>
    <object-name>FROM</object-name>
    <property alias="../../params/selected-course"/>
    <factor> -1 </factor>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>HDGSelector</object-name>
    <visible>true</visible>
    <action>
      <button>3</button>
      <repeatable>true</repeatable>
      <binding>
        <command>property-adjust</command>
        <property alias="../../../../params/selected-heading"/>
        <step>-1</step>
        <min>0</min>
        <max>360</max>
        <wrap>1</wrap>
      </binding>
    </action>
    <action>
      <button>4</button>
      <repeatable>true</repeatable>
      <binding>
        <command>property-adjust</command>
        <property alias="../../../../params/selected-heading"/>
        <step>1</step>
        <min>0</min>
        <max>360</max>
        <wrap>1</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>OBSSelector</object-name>
    <visible>true</visible>
    <action>
      <button>3</button>
      <repeatable>true</repeatable>
      <binding>
        <command>property-adjust</command>
        <property alias="../../../../params/selected-course"/>
        <step>-1</step>
        <min>0</min>
        <max>360</max>
        <wrap>1</wrap>
      </binding>
    </action>
    <action>
      <button>4</button>
      <repeatable>true</repeatable>
      <binding>
        <command>property-adjust</command>
        <property alias="../../../../params/selected-course"/>
        <step>1</step>
        <min>0</min>
        <max>360</max>
        <wrap>1</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>NAV</object-name>
    <property alias="../../params/nav-flag"/>
    <interpolation>
      <entry><ind> 0.0 </ind><dep>  0 </dep></entry>
      <entry><ind> 0.5 </ind><dep>  0 </dep></entry>
      <entry><ind> 0.9 </ind><dep> 30 </dep></entry>
      <entry><ind> 1.0 </ind><dep> 40 </dep></entry>
    </interpolation>
    <center>
      <x-m>  0.002 </x-m>
      <y-m> -0.016 </y-m>
      <z-m>  0.035 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>HDG</object-name>
    <property alias="../../params/hdg-flag"/>
    <interpolation>
      <entry><ind> 0 </ind><dep> -40 </dep></entry>
      <entry><ind> 1 </ind><dep>   0 </dep></entry>
    </interpolation>
    <center>
      <x-m> 0.002 </x-m>
      <y-m> 0.016 </y-m>
      <z-m> 0.035 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>translate</type>
    <object-name>TO</object-name>
    <property alias="../../params/to-flag"/>
    <factor>0.00712488</factor>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <animation>
    <type>translate</type>
    <object-name>FROM</object-name>
    <property alias="../../params/from-flag"/>
    <factor>-0.00712488</factor>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <animation>
    <type>translate</type>
    <object-name>GS</object-name>
    <property alias="../../params/gs-needle-deflection"/>
    <factor>0.004535342857142857143</factor>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <animation>
    <type>select</type>
    <object-name>GS</object-name>
    <condition>
      <property alias="../../../params/has-gs"/>
      <greater-than>
        <property alias="../../../../params/gs-needle-deflection"/>
        <value>-5</value>
      </greater-than>
      <less-than>
        <property alias="../../../../params/gs-needle-deflection"/>
        <value>5.0</value>
      </less-than>
    </condition>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>ArrowBody</object-name>
    <property alias="../../params/cdi-needle-deflection"/>
    <factor>2.5</factor>
    <center>
      <x-m> -0.001 </x-m>
      <y-m>  0.000 </y-m>
      <z-m>  0.001 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

</PropertyList>
