<?xml version="1.0"?>

<!-- Lockheed 1049 Radio Magnetic Indicator :

     - 2 frequencies among ADF and VOR.
     - when not in range, VOR is parked at 90 degrees.
     - when not in range, ADF is indicated at 90 degrees.


     Credits :
     =======
     - adapted from G. Neely's Lockheed 1049-H.
-->


<!-- Gary R. Neely 'Buckaroo', Nov 2008  -->
<!-- Wolfram Gottfried 'Yakko', Nov 2008  -->

<PropertyList>

<path>rmi.ac</path>

<animation>
  <type>material</type>
  <object-name>RMI.Face</object-name>
  <object-name>RMI.Needle1</object-name>
  <object-name>RMI.Needle2</object-name>
  <object-name>RMI.Needle1ADF</object-name>
  <object-name>RMI.Needle2ADF</object-name>
  <emission>
    <red>0.81</red>
    <green>0.40</green>
    <blue>0.20</blue>
    <factor-prop>systems/lighting/internal/pilot/instrument-light</factor-prop>
  </emission>
  <ambient>
    <red>1.0</red>
    <green>1.0</green>
    <blue>1.0</blue>
    <factor-prop>systems/lighting/internal/ambient-light</factor-prop>
  </ambient>
</animation>

<animation>
  <type>rotate</type>
  <object-name>RMI.Face</object-name>
  <property>orientation/heading-magnetic-deg</property>
  <factor>-1</factor>
  <axis>
    <x>-1</x>
    <y>0</y>
    <z>0</z>
  </axis>
</animation>

<!-- Needle 1 -->

<!-- VOR -->

<animation>
  <type>rotate</type>
  <object-name>RMI.Needle1</object-name>
  <property>orientation/heading-magnetic-deg</property>
  <factor>-1</factor>
  <condition>
   <property>/instrumentation/nav[0]/in-range</property>
  </condition>
  <axis>
    <x>-1</x>
    <y>0</y>
    <z>0</z>
  </axis>
</animation>

<animation>
  <type>rotate</type>
  <object-name>RMI.Needle1</object-name>
  <property>/instrumentation/nav[0]/heading-deg</property>
  <axis>
    <x>-1</x>
    <y>0</y>
    <z>0</z>
  </axis>
</animation>

<animation>
  <type>select</type>
  <object-name>RMI.Needle1</object-name>
  <condition>
   <property>/instrumentation/radio-magnetic-indicator/vor[0]</property>
  </condition>
</animation>

<!-- ADF -->

<animation>
  <type>rotate</type>
  <object-name>RMI.Needle1ADF</object-name>
  <property>orientation/heading-magnetic-deg</property>
  <factor>-1</factor>
  <condition>
   <property>/instrumentation/adf[0]/in-range</property>
  </condition>
  <axis>
    <x>-1</x>
    <y>0</y>
    <z>0</z>
  </axis>
</animation>

<animation>
  <type>rotate</type>
  <object-name>RMI.Needle1ADF</object-name>
  <property>/instrumentation/adf[0]/indicated-bearing-deg</property>
  <axis>
    <x>-1</x>
    <y>0</y>
    <z>0</z>
  </axis>
</animation>

<animation>
  <type>select</type>
  <object-name>RMI.Needle1ADF</object-name>
  <condition>
   <not>
    <property>/instrumentation/radio-magnetic-indicator/vor[0]</property>
   </not>
  </condition>
</animation>

<!-- Needle 2 -->

<!-- VOR -->

<animation>
  <type>rotate</type>
  <object-name>RMI.Needle2</object-name>
  <property>orientation/heading-magnetic-deg</property>
  <factor>-1</factor>
  <condition>
   <property>/instrumentation/nav[1]/in-range</property>
  </condition>
  <axis>
    <x>-1</x>
    <y>0</y>
    <z>0</z>
  </axis>
</animation>

<animation>
  <type>rotate</type>
  <object-name>RMI.Needle2</object-name>
  <property>/instrumentation/nav[1]/heading-deg</property>
  <axis>
    <x>-1</x>
    <y>0</y>
    <z>0</z>
  </axis>
</animation>

<animation>
  <type>select</type>
  <object-name>RMI.Needle2</object-name>
  <condition>
   <property>/instrumentation/radio-magnetic-indicator/vor[1]</property>
  </condition>
</animation>

<!-- ADF -->

<animation>
  <type>rotate</type>
  <object-name>RMI.Needle2ADF</object-name>
  <property>orientation/heading-magnetic-deg</property>
  <factor>-1</factor>
  <condition>
   <property>/instrumentation/adf[1]/in-range</property>
  </condition>
  <axis>
    <x>-1</x>
    <y>0</y>
    <z>0</z>
  </axis>
</animation>

<animation>
  <type>rotate</type>
  <object-name>RMI.Needle2ADF</object-name>
  <property>/instrumentation/adf[1]/indicated-bearing-deg</property>
  <axis>
    <x>-1</x>
    <y>0</y>
    <z>0</z>
  </axis>
</animation>

<animation>
  <type>select</type>
  <object-name>RMI.Needle2ADF</object-name>
  <condition>
   <not>
    <property>/instrumentation/radio-magnetic-indicator/vor[1]</property>
   </not>
  </condition>
</animation>

</PropertyList>
