<Gauge Name="VOR" Version="1.0">
   <Image Name="VOR_BACK.bmp" ImageSizes="142,142"/>
//------- INITIALIZE AS BOTH VOR --------
   <Element>
      <Select>
         <Value>(L:Vor1_sw,number) 1 &lt; if{ 1 (&gt;L:Vor1_sw,number) 1 (&gt;L:Vor2_sw,number) }</Value>
      </Select>
   </Element>
//---------------------------------------
   <Element>
      <Position X="0" Y="0"/>
	<MaskImage Name="VOR_RING_MASK.bmp" ImageSizes="142,142">
		<Axis X="71.5" Y="71.5"/>
	</MaskImage>
      <Select>
         <Value>(A:Light panel,bool)</Value>
         <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="0"/>
         </Failures>
         <Case Value="0">
          <Image Name="VOR_RING.bmp" PointsTo="East" ImageSizes="119,119" Luminous="1">
         <Axis X="59" Y="59"/>
      </Image>
         </Case>
         <Case Value="1">
          <Image Name="VOR_RING2.bmp" PointsTo="East" ImageSizes="119,119" Luminous="1" Bright="YES">
         <Axis X="59" Y="59"/>
      </Image>
         </Case>
      </Select>
      <Rotate>
         <Value>(A:Plane heading degrees gyro,radians) /-/</Value>
         <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="Freeze"/>
            <GAUGE_GYRO_HEADING Action="Freeze"/>
         </Failures>
      </Rotate>
   </Element>
//---------------------------------------
   <Element>
      <Position X="71.5" Y="71.5"/>
      <Image Name="NEEDLE_VOR2.bmp" ImageSizes="77,11" Luminous="1">
         <Axis X="38.5" Y="5" PointsTo="East"/>
      </Image>
      <Rotate>
         <Value>(L:Vor2_sw,number) 1 == if{ (A:NAV2 Radial,radians) (A:Plane heading degrees gyro,radians) - pi 2 /  + } els{ (A:ADF Radial:2,radians) pi 2 / - }</Value>
         <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="Freeze"/>
            <SYSTEM_ELECTRICAL_AVIONICS Action="Freeze"/>
            <GAUGE_GYRO_HEADING Action="Freeze"/>
            <GAUGE_VOR2 Action="Freeze"/>
         </Failures>
         <Delay DegreesPerSecond="280"/>
      </Rotate>
   </Element>
    <Element>
      <Position X="71.5" Y="71.5"/>
      <Image Name="NEEDLE_VOR1.bmp" ImageSizes="77,8" Luminous="1">
         <Axis X="38.5" Y="5.5" PointsTo="East"/>
      </Image>
      <Rotate>
         <Value>(L:Vor1_sw,number) 1 == if{ (A:NAV1 Radial,radians) (A:Plane heading degrees gyro,radians) - pi 2 /  + } els{ (A:ADF1 Radial,radians) pi 2 / - }</Value>
         <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="Freeze"/>
            <SYSTEM_ELECTRICAL_AVIONICS Action="Freeze"/>
            <GAUGE_GYRO_HEADING Action="Freeze"/>
            <GAUGE_VOR1 Action="Freeze"/>
         </Failures>
         <Delay DegreesPerSecond="280"/>
      </Rotate>
   </Element>
//-------------- 1 VOR / ADF -------------------------
   <Element>
      <Position X="0" Y="0"/>
      <Select>
         <Value>(L:Vor1_sw,number)</Value>
         <Case Value="1">
            <Image Name="VOR_1_VOR.bmp" ImageSizes="142,142" Luminous="1"/>
         </Case>
         <Case Value="2">
            <Image Name="VOR_1_ADF.bmp" ImageSizes="142,142" Luminous="1"/>
         </Case>
      </Select>
   </Element>
//-------------- 2 VOR / ADF -------------------------
   <Element>
      <Position X="0" Y="0"/>
      <Select>
         <Value>(L:Vor2_sw,number)</Value>
         <Case Value="1">
            <Image Name="VOR_2_VOR.bmp" ImageSizes="142,142" Luminous="1"/>
         </Case>
         <Case Value="2">
            <Image Name="VOR_2_ADF.bmp" ImageSizes="142,142" Luminous="1"/>
         </Case>
      </Select>
   </Element>
//---------------------------------------
   <Element>
      <Position X="0" Y="0"/>
      <Select>
         <Value>(A:CIRCUIT GENERAL PANEL ON, bool) (A:CIRCUIT AVIONICS ON, bool) &amp;</Value>
         <Case Value="0">
            <Image Name="VOR_FLAG.bmp" ImageSizes="142,142" Luminous="1"/>
         </Case>
      </Select>
   </Element>
//---------------------------------------
   <Mouse>
      <Tooltip>VOR/ADF</Tooltip>
      <Area Left="0" Right="42" Top="70" Bottom="142">
         <Cursor Type="Hand"/>
         <Click>(L:Vor1_sw,number) 2 == if{ 1 (&gt;L:Vor1_sw,number) } els{ 2 (&gt;L:Vor1_sw,number) }</Click>
      </Area>
      <Area Left="98" Right="142" Top="70" Bottom="142">
         <Cursor Type="Hand"/>
         <Click>(L:Vor2_sw,number) 2 == if{ 1 (&gt;L:Vor2_sw,number) } els{ 2 (&gt;L:Vor2_sw,number) }</Click>
      </Area>
   </Mouse>
</Gauge>
