<?xml version="1.0"?>

<!-- Lockheed 1049 Radio Magnetic Indicator :

     - 2 frequencies among ADF and VOR.
     - ignore ILS.
-->

<PropertyList>
 <name>Radio Magnetic Indicator</name>
 <w-base>128</w-base>
 <h-base>128</h-base>

 <layers>
  <layer>
   <name>gauge face</name>
   <texture>
    <path>Aircraft/Lockheed1049/Panels/Instruments/Textures/faces-1-hi.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>NAV 1 title</name>
   <w>50</w>
   <h>18</h>
   <texture>
    <path>Aircraft/Lockheed1049/Panels/Instruments/Textures/misc-1.rgb</path>
    <x1>0</x1>
    <y1>0.05</y1>
    <x2>0.25</x2>
    <y2>0.1125</y2>
   </texture>
   <transformations>
    <transformation>
     <type>x-shift</type>
     <offset>-3</offset>
    </transformation> 
    <transformation>
     <type>y-shift</type>
     <offset>-3</offset>
    </transformation> 
   </transformations>
  </layer>

  <layer>
   <name>NAV 1 number</name>
   <type>text</type>
   <point-size>16</point-size>
   <color>
    <red>1.0</red>
    <green>1.0</green>
    <blue>1.0</blue>
   </color>
   <chunks>
    <chunk>
     <type>literal</type>
     <text>1</text>
    </chunk>
   </chunks>
   <transformations>
    <transformation>
     <type>x-shift</type>
     <offset>-9</offset>
    </transformation>
    <transformation>
     <type>y-shift</type>
     <offset>-13</offset>
    </transformation>
   </transformations>
  </layer>

  <layer>
   <name>NAV 2 title</name>
   <w>50</w>
   <h>18</h>
   <texture>
    <path>Aircraft/Lockheed1049/Panels/Instruments/Textures/misc-1.rgb</path>
    <x1>0</x1>
    <y1>0.05</y1>
    <x2>0.25</x2>
    <y2>0.1125</y2>
   </texture>
   <transformations>
    <transformation>
     <type>x-shift</type>
     <offset>25</offset>
    </transformation> 
    <transformation>
     <type>y-shift</type>
     <offset>-3</offset>
    </transformation> 
   </transformations>
  </layer>

  <layer>
   <name>NAV 2 number</name>
   <type>text</type>
   <point-size>14</point-size>
   <color>
    <red>1.0</red>
    <green>1.0</green>
    <blue>1.0</blue>
   </color>
   <chunks>
    <chunk>
     <type>literal</type>
     <text>2</text>
    </chunk>
   </chunks>
   <transformations>
    <transformation>
     <type>x-shift</type>
     <offset>22</offset>
    </transformation>
    <transformation>
     <type>y-shift</type>
     <offset>-13</offset>
    </transformation>
   </transformations>
  </layer>

<!-- OFF FLAGS -->

  <layer>
   <name>OFF 1 flag</name>
   <condition>
    <or>
     <and>
      <property>/instrumentation/radio-magnetic-indicator/vor[0]</property>
      <or>
       <not>
        <property>/instrumentation/nav[0]/in-range</property>
       </not>
       <property>/instrumentation/nav[0]/has-gs</property>
      </or>
     </and>
     <and>
      <not>
       <property>/instrumentation/radio-magnetic-indicator/vor[0]</property>
      </not>
      <not>
       <property>/instrumentation/adf[0]/in-range</property>
      </not>
     </and>
    </or>
   </condition>
   <texture>
    <path>Aircraft/Lockheed1049/Panels/Instruments/Textures/misc-1.rgb</path>
    <x1>0.9375</x1>
    <y1>0.50</y1>
    <x2>1.0</x2>
    <y2>0.546875</y2>
   </texture>
   <w>16</w>
   <h>10</h>
   <transformations>
    <transformation>
     <type>x-shift</type>
     <offset>-14</offset>
    </transformation>
    <transformation>
     <type>y-shift</type>
     <offset>-18</offset>
    </transformation>
   </transformations>
  </layer>

  <layer>
   <name>OFF 2 flag</name>
   <condition>
    <or>
     <and>
      <property>/instrumentation/radio-magnetic-indicator/vor[1]</property>
      <or>
       <not>
        <property>/instrumentation/nav[1]/in-range</property>
       </not>
       <property>/instrumentation/nav[1]/has-gs</property>
      </or>
     </and>
     <and>
      <not>
       <property>/instrumentation/radio-magnetic-indicator/vor[1]</property>
      </not>
      <not>
       <property>/instrumentation/adf[1]/in-range</property>
      </not>
     </and>
    </or>
   </condition>
   <texture>
    <path>Aircraft/Lockheed1049/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>

<!-- VOR 1 -->

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

   <layer>
    <name>VOR 1</name>
    <type>switch</type>
    <condition>
     <property>/instrumentation/radio-magnetic-indicator/vor[0]</property>
    </condition>

    <layer>
     <name>Needle VOR 1 in range</name>
     <condition>
      <and>
       <property>/instrumentation/nav[0]/in-range</property>
       <not>
        <property>/instrumentation/nav[0]/has-gs</property>
       </not>
      </and>
     </condition>
     <texture>
      <path>Aircraft/Lockheed1049/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/nav[0]/heading-deg</property>
       <min>-360</min>
       <max>360</max>
      </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>
     <name>Needle VOR 1 out of range</name>
     <texture>
      <path>Aircraft/Lockheed1049/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 1 -->

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

    <layer>
     <name>Needle ADF 1</name>
     <condition>
      <property>/instrumentation/adf[0]/in-range</property>
     </condition>
     <texture>
      <path>Aircraft/Lockheed1049/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 ADF 1 out of range</name>
     <texture>
      <path>Aircraft/Lockheed1049/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>
  </layer>

<!-- VOR 2 -->

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

   <layer>
    <name>VOR 2</name>
    <type>switch</type>
    <condition>
     <property>/instrumentation/radio-magnetic-indicator/vor[1]</property>
    </condition>
 
    <layer>
     <name>Needle VOR 2</name>
     <condition>
      <and>
       <property>/instrumentation/nav[1]/in-range</property>
       <not>
        <property>/instrumentation/nav[1]/has-gs</property>
       </not>
      </and>
     </condition>
     <texture>
      <path>Aircraft/Lockheed1049/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/nav[1]/heading-deg</property>
       <min>-360</min>
       <max>360</max>
      </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>
     <name>Needle VOR 2 out of range</name>
     <texture>
      <path>Aircraft/Lockheed1049/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 -->

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

    <layer>
     <name>Needle ADF 2</name>
     <condition>
      <property>/instrumentation/adf[1]/in-range</property>
     </condition>
     <texture>
      <path>Aircraft/Lockheed1049/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 ADF 2 out of range</name>
     <texture>
      <path>Aircraft/Lockheed1049/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 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>

  </layer>

<!-- VOR 2 tip -->

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

   <layer>
    <name>VOR 2 tip</name>
    <type>switch</type>
    <condition>
     <property>/instrumentation/radio-magnetic-indicator/vor[1]</property>
    </condition>

    <layer>
     <name>Needle tip VOR 2</name>
     <condition>
      <and>
       <property>/instrumentation/nav[1]/in-range</property>
       <not>
        <property>/instrumentation/nav[1]/has-gs</property>
       </not>
      </and>
     </condition>
     <w>16</w>
     <h>16</h>
     <texture>
      <path>Aircraft/Lockheed1049/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/nav[1]/heading-deg</property>
       <min>-360</min>
       <max>360</max>
      </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>
     <name>Needle tip VOR 2 out of range</name>
     <w>16</w>
     <h>16</h>
     <texture>
      <path>Aircraft/Lockheed1049/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>

<!-- ADF 2 tip  -->

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

    <layer>
     <name>Needle tip ADF 2</name>
     <condition>
      <property>/instrumentation/adf[1]/in-range</property>
     </condition>
     <w>16</w>
     <h>16</h>
     <texture>
      <path>Aircraft/Lockheed1049/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 ADF 2 out of range</name>
     <w>16</w>
     <h>16</h>
     <texture>
      <path>Aircraft/Lockheed1049/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>

<!-- fix misc.rgb -->
  <layer>
   <name>bezel</name>
   <texture>
    <path>Aircraft/Lockheed1049/Panels/Instruments/Textures/bezel.rgb</path>
    <x1>0.0</x1>
    <y1>0.0</y1>
    <x2>1.0</x2>
    <y2>1.0</y2>
   </texture>
   <transformations>
    <transformation>
    <type>x-shift</type>
    <offset>-1</offset>
    </transformation>
   </transformations>
  </layer>

  <layer>
   <name>glare shield</name>
   <texture>
     <path>Aircraft/Lockheed1049/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>x-shift</type>
     <offset>2</offset>
    </transformation>
    <transformation>
     <type>y-shift</type>
     <offset>-2</offset>
    </transformation>
   </transformations>
  </layer>

 </layers>

</PropertyList>

