<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- #############################################################################
     #    (C) 2006 by Yurik V. Nikiforoff - port for FGFS,  FDM,                 #
     #    2d & 3d instruments, animations, systems and over.                     #
     #    yurik@megasignal.com                                                   #
     #                                                                           #
     #    Updated BARANGER Emmanuel 2015                                         #
     #    Updated BARANGER Emmanuel 09/2022                                      #
     #############################################################################
     ADF/VOR indicator USHDB 3D instrument for Tu-154
-->
<PropertyList>

  <path>ushdb.ac</path>

  <animation>
    <object-name>fond</object-name>
    <object-name>face</object-name>
    <object-name>info</object-name>
    <object-name>needle1</object-name>
    <object-name>needle2</object-name>
    <object-name>txt2</object-name>
    <object-name>txt3</object-name>
    <object-name>handle1</object-name>
    <object-name>handle2</object-name>
    <object-name>lamponnav1</object-name>
    <object-name>lamponnav2</object-name>
    <object-name>lamponadf1</object-name>
    <object-name>lamponadf2</object-name>
    <object-name>lampoffnav1</object-name>
    <object-name>lampoffnav2</object-name>
    <object-name>lampoffadf1</object-name>
    <object-name>lampoffadf2</object-name>

    <object-name>hotspot1</object-name>
    <object-name>hotspot2</object-name>
    <object-name>hotspot3</object-name>
    <object-name>hotspot4</object-name>
    <object-name>hs</object-name>
    <object-name>vitre</object-name>
  </animation>

  <animation>
    <type>noshadow</type>
    <object-name>fond</object-name>
    <object-name>face</object-name>
    <object-name>info</object-name>
    <object-name>needle1</object-name>
    <object-name>needle2</object-name>
    <object-name>txt2</object-name>
    <object-name>txt3</object-name>
    <object-name>handle1</object-name>
    <object-name>handle2</object-name>
    <object-name>lamponnav1</object-name>
    <object-name>lamponnav2</object-name>
    <object-name>lamponadf1</object-name>
    <object-name>lamponadf2</object-name>
    <object-name>lampoffnav1</object-name>
    <object-name>lampoffnav2</object-name>
    <object-name>lampoffadf1</object-name>
    <object-name>lampoffadf2</object-name>
    <object-name>hotspot1</object-name>
    <object-name>hotspot2</object-name>
    <object-name>hotspot3</object-name>
    <object-name>hotspot4</object-name>
    <object-name>hs</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>face</object-name>
    <object-name>needle1</object-name>
    <object-name>needle2</object-name>
    <object-name>txt2</object-name>
    <object-name>txt3</object-name>
    <object-name>info</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>material</type>
    <object-name>lampoffnav1</object-name>
    <object-name>lampoffnav2</object-name>
    <object-name>lampoffadf1</object-name>
    <object-name>lampoffadf2</object-name>
    <condition>
      <property>controls/electric/battery-switch</property>
    </condition>
    <emission>
      <red>   0.235 </red>
      <green> 0.235 </green>
      <blue>  0.235 </blue>
    </emission>
  </animation>

  <animation>
    <type>material</type>
    <object-name>lamponnav1</object-name>
    <object-name>lamponnav2</object-name>
    <object-name>lamponadf1</object-name>
    <object-name>lamponadf2</object-name>
    <condition>
      <property>controls/electric/battery-switch</property>
    </condition>
    <emission>
      <factor-prop>controls/switches/gauge-light</factor-prop>
      <red>   2 </red>
      <green> 2 </green>
      <blue>  2 </blue>
    </emission>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>face</object-name>
    <property>instrumentation/ushdb/compass</property>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

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

  <animation>
    <type>rotate</type>
    <object-name>needle2</object-name>
    <property>instrumentation/ushdb/heading-deg-2</property>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>knob</type>
    <object-name>hs</object-name>
    <visible>false</visible>
    <action>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ushdb/compass</property>
        <min>0</min>
        <max>360</max>
        <wrap>true</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>handle1</object-name>
    <property>controls/switches/ushdb-sel-1</property>
    <interpolation>
      <entry><ind> 0 </ind><dep> -60</dep></entry>
      <entry><ind> 1 </ind><dep>  60</dep></entry>
    </interpolation>
    <center>
      <x-m>  0.00013 </x-m>
      <y-m> -0.02533 </y-m>
      <z-m> -0.09988 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>handle2</object-name>
    <property>controls/switches/ushdb-sel-2</property>
    <interpolation>
      <entry><ind> 0 </ind><dep> -60 </dep></entry>
      <entry><ind> 1 </ind><dep>  60 </dep></entry>
    </interpolation>
    <center>
      <x-m>  0.00013 </x-m>
      <y-m>  0.02533 </y-m>
      <z-m> -0.09988 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hotspot1</object-name>
    <visible>false</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>nasal</command>
        <script>
          interpolate("controls/switches/ushdb-sel-1", 1.0, 0.1 );
        </script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hotspot2</object-name>
    <visible>false</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>nasal</command>
        <script>
          interpolate("controls/switches/ushdb-sel-1", 0.0, 0.1 );
        </script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hotspot3</object-name>
    <visible>false</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>nasal</command>
        <script>
          interpolate("controls/switches/ushdb-sel-2", 1.0, 0.1 );
        </script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hotspot4</object-name>
    <visible>false</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>nasal</command>
        <script>
          interpolate("controls/switches/ushdb-sel-2", 0.0, 0.1 );
        </script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>select</type>
    <object-name>lamponnav1</object-name>
    <condition>
      <equals>
        <property>/instrumentation/nav[0]/in-range</property>
        <value>0</value>
      </equals>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>lamponnav2</object-name>
    <condition>
      <equals>
        <property>/instrumentation/nav[1]/in-range</property>
        <value>0</value>
      </equals>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>lamponadf1</object-name>
    <condition>
      <equals>
        <property>/instrumentation/adf[0]/in-range</property>
        <value>0</value>
      </equals>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>lamponadf2</object-name>
    <condition>
      <equals>
        <property>/instrumentation/adf[1]/in-range</property>
        <value>0</value>
      </equals>
    </condition>
  </animation>

</PropertyList>
