<Gauge Name="An24FuelIndicator" Version="1.0">
<!-- 
  Copyright (c) 2004, PI314
  Based on Stepan Gritsewsky's excellent IL-18/AN-24 Gauges Pack.
  Freeware, may be used in any nonprofit project.
-->
  <Image Name="fuel_ring.bmp" /> 
  <!--  ............. background ....................... --> 
  <Element>
    <Position X="2" Y="2" /> 
    <Image Name="fuel_bg.bmp" Luminous="Yes"/>
  </Element>
  <!--  ............. Left needle ....................... --> 
  <Element>
    <Position X="104" Y="104" /> 
    <Image Name="fuel_needle1.bmp" PointsTo="Nort" Luminous="Yes">
      <Axis X="8" Y="65" /> 
    </Image>
    <Rotate>
      <Value Minimum="0" Maximum="105">(G:var5) 1 != (A:CIRCUIT GENERAL PANEL ON, Boolean) &amp;&amp; (L:fuel_sw_pos, number) 0 != &amp;&amp; if{ (L:fuel_sw_pos, number) 2 == if{ (A:fuel tank left main quantity, liter) 77.5 * 1500 / } els{ (L:fuel_sw_pos, number) 3 == if{ (A:fuel tank left aux quantity, liter) 77.5 * 1500 / } els{ (L:fuel_sw_pos, number) 1 == if{ (A:fuel left quantity, liter) 77.5 * 3000 / } } } (A:PLANE PITCH DEGREES, degree) 2 / 5 min + (A:G FORCE, Gforce) 1 - + }</Value> 
      <Nonlinearity>
        <Item Value="0" Degrees="212" /> 
        <Item Value="100" Degrees="150" /> 
        <Item Value="105" Degrees="165" />
      </Nonlinearity>
      <Delay DegreesPerSecond="120"/>
    </Rotate>
  </Element>
  <!--  ............. Right needle ....................... --> 
  <Element>
    <Position X="104" Y="104" /> 
    <Image Name="fuel_needle2.bmp" PointsTo="Nort" Luminous="Yes">
      <Axis X="8" Y="65" /> 
    </Image>
    <Rotate>
      <Value Minimum="0" Maximum="105">(G:var5) 1 != (A:CIRCUIT GENERAL PANEL ON, Boolean) &amp;&amp; (L:fuel_sw_pos, number) 0 != &amp;&amp; if{ (L:fuel_sw_pos, number) 2 == if{ (A:fuel tank right main quantity, liter) 77.5 * 1500 / } els{ (L:fuel_sw_pos, number) 3 == if{ (A:fuel tank right aux quantity, liter) 77.5 * 1500 / } els{ (L:fuel_sw_pos, number) 1 == if{ (A:fuel right quantity, liter) 77.5 * 3000 / } } } (A:PLANE PITCH DEGREES, degree) 2 / 5 min + (A:G FORCE, Gforce) 1 - + }</Value> 
      <Nonlinearity>
        <Item Value="0" Degrees="212" /> 
        <Item Value="100" Degrees="150" /> 
        <Item Value="105" Degrees="165" />
      </Nonlinearity>
      <Delay DegreesPerSecond="150"/>
    </Rotate>
  </Element>
  <!-- test button  -->
  <Element>
    <Position X="95" Y="179" /> 
    <Select>
      <Value>(G:var5) 1 ==</Value>
      <Case Value="1">
        <Image Name="test_knob.bmp" />
      </Case>
     </Select>
  </Element>
  <!-- test button click -->
  <Mouse>
  - <Area Left="95" Right="14575" Top="179" Bottom="230">
      <Cursor Type="Hand" /> 
      <Click Kind="LeftSingle+Leave">
            (M:Event) 'LeftSingle' scmp 0 == if{ 1 (&gt;G:var5) }
            (M:Event) 'Leave' scmp 0 == if{ 0 (&gt;G:var5) }
        </Click>
    </Area>
  </Mouse>

  
</Gauge>