<?xml version="1.0"?>

<!-- ADF Radio Magnetic Indicator :

-->

<PropertyList>

 <name>ADF RMI</name>

 <w-base>128</w-base>
 <h-base>128</h-base>

 <params>
  <voltage>/systems/electrical/outputs/bus</voltage>
 </params>


 <layers>

  <layer>
   <name>gauge face</name>
   <texture>
    <path>Aircraft/747-200/Panels/Instruments/Textures/faces-1.rgb</path>
    <x1>0.0</x1>
    <y1>0.51</y1>
    <x2>0.49</x2>
    <y2>1.0</y2>
   </texture>
    <w>104</w>
    <h>104</h>
   <transformations>
    <transformation>
     <type>x-shift</type>
     <offset>1</offset>
    </transformation>
    <transformation>
     <type>rotation</type>
     <property>/orientation/heading-magnetic-deg</property>
     <min>0.0</min>
     <max>360.0</max>
     <scale>-1.0</scale>
    </transformation>
   </transformations>
  </layer>

  <layer>
   <name>Face with markings</name>
   <texture>
    <path>Aircraft/747-200/Panels/Instruments/Textures/gyro-fronts.rgb</path>
    <x1>0.01</x1>
    <y1>0.5</y1>
    <x2>0.5</x2>
    <y2>1.0</y2>
   </texture>
   <w>104</w>
   <h>104</h>
  </layer>

<!-- OFF FLAGS -->

  <layer>
   <name>OFF flag</name>
   <condition>
    <less-than-equals>
     <property alias="../../../../../params/voltage"/>
     <value>20.0</value>
    </less-than-equals>
   </condition>
   <texture>
    <path>Aircraft/747-200/Panels/Instruments/Textures/misc-1.rgb</path>
    <x1>0.9375</x1>
    <y1>0.5</y1>
    <x2>1.0</x2>
    <y2>0.546875</y2>
   </texture>
   <w>25</w>
   <h>10</h>
   <transformations>
    <transformation>
     <type>x-shift</type>
     <offset>-5</offset>
    </transformation>
    <transformation>
     <type>y-shift</type>
     <offset>41</offset>
    </transformation>
    <transformation>
     <type>rotation</type>
     <offset>-45</offset>
    </transformation>
   </transformations>
  </layer>

  <layer>
   <name>OFF 1 flag</name>
   <condition>
    <or>
     <not>
      <property>/instrumentation/adf[0]/in-range</property>
     </not>
     <less-than>
      <property>/systems/electrical/outputs/adf</property>
      <value>20.0</value>
     </less-than>
    </or>
   </condition>
   <texture>
    <path>Aircraft/747-200/Panels/Instruments/Textures/misc-1.rgb</path>
    <x1>0.9375</x1>
    <y1>0.5</y1>
    <x2>1.0</x2>
    <y2>0.546875</y2>
   </texture>
   <w>16</w>
   <h>10</h>
   <transformations>
    <transformation>
     <type>x-shift</type>
     <offset>-16</offset>
    </transformation>
    <transformation>
     <type>y-shift</type>
     <offset>-18</offset>
    </transformation>
   </transformations>
  </layer>

  <layer>
   <name>OFF 2 flag</name>
   <condition>
    <or>
     <not>
      <property>/instrumentation/adf[1]/in-range</property>
     </not>
     <less-than>
      <property>/systems/electrical/outputs/adf</property>
      <value>20.0</value>
     </less-than>
    </or>
   </condition>
   <texture>
    <path>Aircraft/747-200/Panels/Instruments/Textures/misc-1.rgb</path>
    <x1>0.9375</x1>
    <y1>0.5</y1>
    <x2>1.0</x2>
    <y2>0.546875</y2>
   </texture>
   <w>16</w>
   <h>10</h>
   <transformations>
    <transformation>
     <type>x-shift</type>
     <offset>15</offset>
    </transformation>
    <transformation>
     <type>y-shift</type>
     <offset>-18</offset>
    </transformation>
   </transformations>
  </layer>

<!-- ADF 1 -->

  <layer>
   <name>ADF 1</name>
   <type>switch</type>

   <layer>
    <name>Needle 1</name>
    <condition>
     <property>/instrumentation/adf[0]/in-range</property>
    </condition>
    <texture>
     <path>Aircraft/747-200/Panels/Instruments/Textures/misc-1.rgb</path>
     <x1>0.8671875</x1>
     <y1>0.25</y1>
     <x2>0.921875</x2>
     <y2>1.0</y2>
    </texture>
    <w>9</w>
    <h>64</h>
    <transformations>
     <transformation>
      <type>rotation</type>
      <property>/instrumentation/adf[0]/indicated-bearing-deg</property>
      <min>-360</min>
      <max>360</max>
     </transformation>
     <transformation>
      <type>x-shift</type>
      <offset>-1</offset>
     </transformation> 
    </transformations>
   </layer>

   <layer>
    <name>Needle 1 out of range</name>
    <texture>
     <path>Aircraft/747-200/Panels/Instruments/Textures/misc-1.rgb</path>
     <x1>0.8671875</x1>
     <y1>0.25</y1>
     <x2>0.921875</x2>
     <y2>1.0</y2>
    </texture>
    <w>9</w>
    <h>64</h>
    <transformations>
     <transformation>
      <type>rotation</type>
      <property>/orientation/heading-magnetic-deg</property>
      <offset>-90</offset> <!-- horizontal left -->
     </transformation>
     <transformation>
      <type>rotation</type>
      <property>/orientation/heading-magnetic-deg</property>
      <min>0.0</min>
      <max>360.0</max>
      <scale>-1.0</scale>
     </transformation>
     <transformation>
      <type>x-shift</type>
      <offset>-1</offset>
     </transformation> 
    </transformations>
   </layer>
  </layer>

<!-- ADF 2 -->

  <layer>
   <name>ADF 2</name>
   <type>switch</type>

   <layer>
    <name>Needle 2</name>
    <condition>
     <property>/instrumentation/adf[1]/in-range</property>
    </condition>
    <texture>
     <path>Aircraft/747-200/Panels/Instruments/Textures/misc-1.rgb</path>
     <x1>0.8671875</x1>
     <y1>0.25</y1>
     <x2>0.921875</x2>
     <y2>1.0</y2>
    </texture>
    <w>9</w>
    <h>64</h>
    <transformations>
     <transformation>
      <type>rotation</type>
      <property>/instrumentation/adf[1]/indicated-bearing-deg</property>
      <min>-360</min>
      <max>360</max>
     </transformation>
     <transformation>
      <type>x-shift</type>
      <offset>-1</offset>
     </transformation> 
    </transformations>
   </layer>

   <layer>
    <name>Needle 2 out of range</name>
    <texture>
     <path>Aircraft/747-200/Panels/Instruments/Textures/misc-1.rgb</path>
     <x1>0.8671875</x1>
     <y1>0.25</y1>
     <x2>0.921875</x2>
     <y2>1.0</y2>
    </texture>
    <w>6</w>
    <h>64</h>
    <transformations>
     <transformation>
      <type>rotation</type>
      <property>/orientation/heading-magnetic-deg</property>
      <offset>90</offset> <!-- horizontal right -->
     </transformation>
     <transformation>
      <type>rotation</type>
      <property>/orientation/heading-magnetic-deg</property>
      <min>0.0</min>
      <max>360.0</max>
      <scale>-1.0</scale>
     </transformation>
     <transformation>
      <type>x-shift</type>
      <offset>-1</offset>
     </transformation> 
    </transformations>
   </layer>
  </layer>

<!-- ADF 2 tip -->

  <layer>
   <name>ADF 2 tip</name>
   <type>switch</type>

   <layer>
    <name>Needle tip 2</name>
    <condition>
     <property>/instrumentation/adf[1]/in-range</property>
    </condition>
    <w>16</w>
    <h>16</h>
    <texture>
     <path>Aircraft/747-200/Panels/Instruments/Textures/hsi2.rgb</path>
     <x1>0.8465625</x1>
     <x2>0.948125</x2>
     <y1>0.449375</y1>
     <y2>0.5375</y2>
    </texture>
    <transformations>
     <transformation>
      <type>rotation</type>
      <property>/instrumentation/adf[1]/indicated-bearing-deg</property>
      <min>-360</min>
      <max>360</max>
     </transformation>
     <transformation>
      <type>rotation</type>
      <offset>180</offset>
     </transformation>
     <transformation>
      <type>y-shift</type>
      <offset>-23</offset>
     </transformation> 
    </transformations>
   </layer>
 
   <layer>
    <name>Needle tip 2 out of range</name>
    <w>16</w>
    <h>16</h>
    <texture>
     <path>Aircraft/747-200/Panels/Instruments/Textures/hsi2.rgb</path>
     <x1>0.8465625</x1>
     <x2>0.948125</x2>
     <y1>0.449375</y1>
     <y2>0.5375</y2>
    </texture>
    <transformations>
     <transformation>
      <type>rotation</type>
      <property>/orientation/heading-magnetic-deg</property>
      <offset>90</offset> <!-- horizontal right -->
     </transformation>
     <transformation>
      <type>rotation</type>
      <property>/orientation/heading-magnetic-deg</property>
      <min>0.0</min>
      <max>360.0</max>
      <scale>-1.0</scale>
     </transformation>
     <transformation>
      <type>rotation</type>
      <offset>180</offset>
     </transformation>
     <transformation>
      <type>y-shift</type>
      <offset>-23</offset>
     </transformation> 
    </transformations>
   </layer>
  </layer>
 
  <layer>
   <name>Plane</name>
   <texture>
    <path>Aircraft/747-200/Panels/Instruments/Textures/misc-1.rgb</path>
    <x1>0.5</x1>
    <y1>0.734375</y1>
    <x2>0.59375</x2>
    <y2>0.828125</y2>
   </texture>
   <w>25</w>
   <h>25</h>
   <transformations>
    <transformation> 
     <type>y-shift</type>
     <offset>-6</offset>
    </transformation> 
   </transformations>
  </layer>

  <layer>
   <name>glare shield</name>
   <texture>
    <path>Aircraft/747-200/Panels/Instruments/Textures/bezel1.rgb</path>
    <x1>0.5</x1>
    <y1>0.0</y1>
    <x2>1.0</x2>
    <y2>0.5</y2>
   </texture>
   <w>124</w>
   <h>124</h>
   <transformations>
    <transformation>
     <type>rotation</type>
     <property>/orientation/roll-deg</property>
     <min>-360.0</min>
     <max>360.0</max>
     <scale>1.0</scale>
     <wrap>1</wrap>
    </transformation>
    <transformation>
     <type>x-shift</type>
     <offset>2</offset>
    </transformation>
    <transformation>
     <type>y-shift</type>
     <offset>-2</offset>
    </transformation>
   </transformations>
  </layer>

 </layers>

</PropertyList>
