<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- #############################################################################
     #    (C) 2007 by Yurik V. Nikiforoff                                        #
     #    yurik@megasignal.com                                                   #
     #    Jul 2007                                                               #
     #                                                                           #
     #    Updated BARANGER Emanuel 2015                                          #
     #    Updated BARANGER Emmanuel 09/2022                                      #
     #############################################################################
     IKU-1 heading indicator 3D instrument for Tu-154
-->
<PropertyList>

  <path>iku-1.ac</path>

  <animation>
    <object-name>fond</object-name>
    <object-name>text</object-name>
    <object-name>compass</object-name>
    <object-name>yellow_needle</object-name>
    <object-name>white_needle</object-name>
    <object-name>l_src</object-name>
    <object-name>r_src</object-name>
    <object-name>l_handle</object-name>
    <object-name>r_handle</object-name>

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

  <animation>
    <type>noshadow</type>
    <object-name>fond</object-name>
    <object-name>text</object-name>
    <object-name>compass</object-name>
    <object-name>yellow_needle</object-name>
    <object-name>white_needle</object-name>
    <object-name>l_src</object-name>
    <object-name>r_src</object-name>
    <object-name>l_handle</object-name>
    <object-name>r_handle</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>text</object-name>
    <object-name>compass</object-name>
    <object-name>yellow_needle</object-name>
    <object-name>white_needle</object-name>
    <object-name>l_src</object-name>
    <object-name>r_src</object-name>
    <object-name>l_handle</object-name>
    <object-name>r_handle</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>

  <!-- Compass -->
  <animation>
    <type>rotate</type>
    <object-name>compass</object-name>
    <property>/orientation/heading-deg</property>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!--Needles-->
  <animation>
    <type>rotate</type>
    <object-name>white_needle</object-name>
    <property>instrumentation/iku/heading-deg-2</property>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>yellow_needle</object-name>
    <property>instrumentation/iku/heading-deg-1</property>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!--Handles-->
  <animation>
    <type>rotate</type>
    <object-name>l_handle</object-name>
    <property>instrumentation/iku/l-mode</property>
    <interpolation>
      <entry><ind> 0 </ind><dep>  0 </dep></entry>
      <entry><ind> 1 </ind><dep> 90 </dep></entry>
    </interpolation>
    <center>
      <x-m>  0.00000 </x-m>
      <y-m> -0.03140 </y-m>
      <z-m> -0.03425 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>r_handle</object-name>
    <property>instrumentation/iku/r-mode</property>
    <interpolation>
      <entry><ind> 0 </ind><dep>  0 </dep></entry>
      <entry><ind> 1 </ind><dep> 90 </dep></entry>
    </interpolation>
    <center>
      <x-m>  0.00000 </x-m>
      <y-m>  0.03062 </y-m>
      <z-m> -0.03425 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!--VOR/ADF indicators-->
  <animation>
    <type>rotate</type>
    <object-name>l_src</object-name>
    <property>instrumentation/iku/l-mode</property>
    <interpolation>
      <entry><ind> 0 </ind><dep>   0 </dep></entry>
      <entry><ind> 1 </ind><dep> 120 </dep></entry>
    </interpolation>
    <center>
      <x-m>  0.00045 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m> -0.04601 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>r_src</object-name>
    <property>instrumentation/iku/r-mode</property>
    <interpolation>
      <entry><ind> 0 </ind><dep>   0 </dep></entry>
      <entry><ind> 1 </ind><dep> 120 </dep></entry>
    </interpolation>
    <center>
      <x-m>  0.00045 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m> -0.04601 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!--  *******************      Controls      *********************   -->
  <!--Left handle-->
  <animation>
    <type>pick</type>
    <object-name>l_handle</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>nasal</command>
        <script>
          if( getprop("instrumentation/iku/l-mode") == 0.0 )
          {interpolate("instrumentation/iku/l-mode", 1.0, 0.1 );}
          else { interpolate("instrumentation/iku/l-mode", 0.0, 0.1 );}
        </script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>l_handle</object-name>
    <visible>true</visible>
    <action>
      <button>3</button>
      <repeatable>false</repeatable>
      <binding>
        <command>nasal</command>
        <script>interpolate("instrumentation/iku/l-mode", 1.0, 0.1 );</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>l_handle</object-name>
    <visible>true</visible>
    <action>
      <button>4</button>
      <repeatable>false</repeatable>
      <binding>
        <command>nasal</command>
        <script>interpolate("instrumentation/iku/l-mode", 0.0, 0.1 );</script>
      </binding>
    </action>
  </animation>

  <!--Right handle-->
  <animation>
    <type>pick</type>
    <object-name>r_handle</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>nasal</command>
        <script>
          if( getprop("instrumentation/iku/r-mode") == 0.0 ){
          interpolate("instrumentation/iku/r-mode", 1.0, 0.1 );}
          else {interpolate("instrumentation/iku/r-mode", 0.0, 0.1 );}
        </script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>r_handle</object-name>
    <visible>true</visible>
    <action>
      <button>3</button>
      <repeatable>false</repeatable>
      <binding>
        <command>nasal</command>
        <script>interpolate("instrumentation/iku/r-mode", 1.0, 0.1 );</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>r_handle</object-name>
    <visible>true</visible>
    <action>
      <button>4</button>
      <repeatable>false</repeatable>
      <binding>
        <command>nasal</command>
        <script>interpolate("instrumentation/iku/r-mode", 0.0, 0.1 );</script>
      </binding>
    </action>
  </animation>

</PropertyList>
