<Gauge Name="L188 Altimeter" Version="1.0">
<Image Name="Altimeter_Background.bmp" Luminous="Yes" ImageSizes="256,256"/>
//---------------------------------------------------
    <Element>
      <Select>
         <Value>(A:Light panel,bool)</Value>
         <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="0"/>
         </Failures>
         <Case Value="0">
           <Image Name="Altimeter_Background.bmp" ImageSizes="256,256"/>
         </Case>
         <Case Value="1">
           <Image Name="Altimeter_Background_B.bmp" ImageSizes="256,256" Luminous="1" Bright="YES"/>
         </Case>
      </Select>
    </Element>
//---------------------------------------------------
<Element>
	<Position X="0" Y="0"/>
	<MaskImage Name="Altimeter_Mask.bmp" ImageSizes="256,256">
	<Axis X="71" Y="70"/>
	</MaskImage>
	<Image Name="Altimeter_Ten_Thousands.bmp" Luminous="Yes" ImageSizes="23,330">
	<Nonlinearity>
	<Item Value="0" X="0" Y="0"/>
	<Item Value="10" X="0" Y="300"/>
	</Nonlinearity>
	</Image>
	<Shift>
	<Value>(A:Indicated Altitude,feet) 100000 + 100000 % d 100 % 100 / r 100 / flr d 100 / flr  r 100 %  99 == if{ + } </Value>
	<Failures>
	<SYSTEM_PITOT_STATIC Action="Freeze"/>
	<GAUGE_ALTIMETER Action="Freeze"/>
	</Failures>
	</Shift>
</Element>
<Element>
	<Position X="0" Y="0"/>
	<MaskImage Name="Altimeter_Mask.bmp" ImageSizes="256,256">
	<Axis X="95" Y="70"/>
	</MaskImage>
	<Image Name="Altimeter_Thousands.bmp" Luminous="Yes" ImageSizes="23,330">
	<Nonlinearity>
	<Item Value="0" X="0" Y="0"/>
	<Item Value="10" X="0" Y="300"/>
	</Nonlinearity>
	</Image>
	<Shift>
	<Value>(A:Indicated Altitude,feet) 100000 + 100000 % d 100 % 100 / r 100 / flr d 10 / 10 % flr  r 10 %  9 == if{ + } </Value>
	<Failures>
	<SYSTEM_PITOT_STATIC Action="Freeze"/>
	<GAUGE_ALTIMETER Action="Freeze"/>
	</Failures>
	</Shift>
</Element>
<Element>
	<Position X="0" Y="0"/>
	<MaskImage Name="Altimeter_Mask.bmp" ImageSizes="256,256">
	<Axis X="129" Y="70"/>
	</MaskImage>
	<Image Name="Altimeter_Hundreds.bmp" Luminous="Yes" ImageSizes="21,330">
	<Nonlinearity>
	<Item Value="0" X="0" Y="0"/>
	<Item Value="10" X="0" Y="300"/>
	</Nonlinearity>
	</Image>
	<Shift>
	<Value>(A:Indicated Altitude,feet) 100000 + 100000 % 1000 % 100 /</Value>
	<Failures>
	<SYSTEM_PITOT_STATIC Action="Freeze"/>
	<GAUGE_ALTIMETER Action="Freeze"/>
	</Failures>
	</Shift>
</Element>
<Element>
	<Position X="0" Y="0"/>
	<MaskImage Name="Altimeter_Mask.bmp" ImageSizes="256,256">
	<Axis X="151" Y="70"/>
	</MaskImage>
	<Image Name="Altimeter_Tenstrip.bmp" Luminous="Yes" ImageSizes="38,330">
	<Nonlinearity>
	<Item Value="0" X="0" Y="0"/>
	<Item Value="10" X="0" Y="300"/>
	</Nonlinearity>
	</Image>
	<Shift>
	<Value>(A:Indicated Altitude,feet) 100000 + 100 % 10 / flr</Value>
	<Failures>
	<SYSTEM_PITOT_STATIC Action="Freeze"/>
	<GAUGE_ALTIMETER Action="Freeze"/>
	</Failures>
	</Shift>
</Element>

<Element>
	<Position X="0" Y="0"/>
	<MaskImage Name="Altimeter_Baro_Mask.bmp" ImageSizes="256,256">
	<Axis X="56" Y="179"/>
	</MaskImage>
	<Image Name="Altimeter_Baro_Card.bmp" Luminous="Yes" ImageSizes="15,253">
	<Nonlinearity>
	<Item Value="0" X="0" Y="0"/>
	<Item Value="10" X="0" Y="230"/>
	</Nonlinearity>
	</Image>
	<Shift>
	<Value>(A:Kohlsman setting hg,mbar) 100000 +  d 1 % r flr 10000 % d 1000 / flr r 1000 %  999 == if{ + }</Value>
	</Shift>
</Element>
<Element>
	<Position X="0" Y="0"/>
	<MaskImage Name="Altimeter_Baro_Mask.bmp" ImageSizes="256,256">
	<Axis X="72" Y="179"/>
	</MaskImage>
	<Image Name="Altimeter_Baro_Card.bmp" Luminous="Yes" ImageSizes="15,253">
	<Nonlinearity>
	<Item Value="0" X="0" Y="0"/>
	<Item Value="10" X="0" Y="230"/>
	</Nonlinearity>
	</Image>
	<Shift>
	<Value>(A:Kohlsman setting hg,mbar) 100000 +  d 1 % r flr 1000 % d 100 / flr r 100 %  99 == if{ + }</Value>
	</Shift>
</Element>
<Element>
	<Position X="0" Y="0"/>
	<MaskImage Name="Altimeter_Baro_Mask.bmp" ImageSizes="256,256">
	<Axis X="88" Y="179"/>
	</MaskImage>
	<Image Name="Altimeter_Baro_Card.bmp" Luminous="Yes" ImageSizes="15,253">
	<Nonlinearity>
	<Item Value="0" X="0" Y="0"/>
	<Item Value="10" X="0" Y="230"/>
	</Nonlinearity>
	</Image>
	<Shift>
	<Value>(A:Kohlsman setting hg,mbar) 100000 +  d 1 % r flr 100 % d 10 / flr r 10 % 9 == if{ + }</Value>
	</Shift>
</Element>
<Element>
      <Position X="0" Y="0"/>
	<MaskImage Name="Altimeter_Baro_Mask.bmp" ImageSizes="256,256">
	<Axis X="104" Y="179"/>
	</MaskImage>
	<Image Name="Altimeter_Baro_Card.bmp" Luminous="Yes" ImageSizes="15,253">
	<Nonlinearity>
	<Item Value="0" X="0" Y="0"/>
	<Item Value="10" X="0" Y="230"/>
	</Nonlinearity>
	</Image>
	<Shift>
	<Value>(A:Kohlsman setting hg,mbar) 100000 +  10 %</Value>
	</Shift>
</Element>

<Element>
	<Position X="0" Y="0"/>
	<MaskImage Name="Altimeter_Baro_Mask.bmp" ImageSizes="256,256">
	<Axis X="138" Y="179"/>
	</MaskImage>
	<Image Name="Altimeter_Baro_Card.bmp" Luminous="Yes" ImageSizes="15,253">
	<Nonlinearity>
	<Item Value="0" X="0" Y="0"/>
	<Item Value="1" X="0" Y="23"/>
	<Item Value="2" X="0" Y="46"/>
	<Item Value="3" X="0" Y="69"/>
	<Item Value="4" X="0" Y="92"/>
	<Item Value="5" X="0" Y="115"/>
	<Item Value="6" X="0" Y="138"/>
	<Item Value="7" X="0" Y="161"/>
	<Item Value="8" X="0" Y="184"/>
	<Item Value="9" X="0" Y="207"/>
	<Item Value="10" X="0" Y="230"/>
	</Nonlinearity>
	</Image>
	<Shift>
	<Value>(A:Kohlsman setting hg,inHg) 100000 +  100 * d 1 % r flr 10000 % d 1000 / flr r 1000 %  999 == if{ + }</Value>
	</Shift>
</Element>
<Element>
	<Position X="0" Y="0"/>
	<MaskImage Name="Altimeter_Baro_Mask.bmp" ImageSizes="256,256">
	<Axis X="154" Y="179"/>
	</MaskImage>
	<Image Name="Altimeter_Baro_Card.bmp" Luminous="Yes" ImageSizes="15,253">
	<Nonlinearity>
	<Item Value="0" X="0" Y="0"/>
	<Item Value="1" X="0" Y="23"/>
	<Item Value="2" X="0" Y="46"/>
	<Item Value="3" X="0" Y="69"/>
	<Item Value="4" X="0" Y="92"/>
	<Item Value="5" X="0" Y="115"/>
	<Item Value="6" X="0" Y="138"/>
	<Item Value="7" X="0" Y="161"/>
	<Item Value="8" X="0" Y="184"/>
	<Item Value="9" X="0" Y="207"/>
	<Item Value="10" X="0" Y="230"/>
	</Nonlinearity>
	</Image>
	<Shift>
	<Value>(A:Kohlsman setting hg,inHg) 100000 +  100 * d 1 % r flr 1000 % d 100 / flr r 100 % 99 == if{ + }</Value>
	</Shift>
</Element>
<Element>
	<Position X="0" Y="0"/>
	<MaskImage Name="Altimeter_Baro_Mask.bmp" ImageSizes="256,256">
	<Axis X="173" Y="179"/>
	</MaskImage>
	<Image Name="Altimeter_Baro_Card.bmp" Luminous="Yes" ImageSizes="15,253">
	<Nonlinearity>
	<Item Value="0" X="0" Y="0"/>
	<Item Value="1" X="0" Y="23"/>
	<Item Value="2" X="0" Y="46"/>
	<Item Value="3" X="0" Y="69"/>
	<Item Value="4" X="0" Y="92"/>
	<Item Value="5" X="0" Y="115"/>
	<Item Value="6" X="0" Y="138"/>
	<Item Value="7" X="0" Y="161"/>
	<Item Value="8" X="0" Y="184"/>
	<Item Value="9" X="0" Y="207"/>
	<Item Value="10" X="0" Y="230"/>
	</Nonlinearity>
	</Image>
	<Shift>
	<Value>(A:Kohlsman setting hg,inHg) 100000 +  100 * d 1 % r flr 100 % d 10 / flr r 10 % 9 == if{ + }</Value>
	</Shift>
</Element>
<Element>
	<Position X="0" Y="0"/>
	<MaskImage Name="Altimeter_Baro_Mask.bmp" ImageSizes="256,256">
	<Axis X="189" Y="179"/>
	</MaskImage>
	<Image Name="Altimeter_Baro_Card.bmp" Luminous="Yes" ImageSizes="15,253">
	<Nonlinearity>
	<Item Value="0" X="0" Y="0"/>
	<Item Value="1" X="0" Y="23"/>
	<Item Value="2" X="0" Y="46"/>
	<Item Value="3" X="0" Y="69"/>
	<Item Value="4" X="0" Y="92"/>
	<Item Value="5" X="0" Y="115"/>
	<Item Value="6" X="0" Y="138"/>
	<Item Value="7" X="0" Y="161"/>
	<Item Value="8" X="0" Y="184"/>
	<Item Value="9" X="0" Y="207"/>
	<Item Value="10" X="0" Y="230"/>
	</Nonlinearity>
	</Image>
	<Shift>
	<Value>(A:Kohlsman setting hg,inHg) 100000 +  100 * 10 %</Value>
	</Shift>
</Element>

<Element>
	<Position X="63" Y="64"/>
	<Visible>(A:CIRCUIT GENERAL PANEL ON, bool) (A:CIRCUIT AVIONICS ON, bool) &amp; 0 ==</Visible>
	<Image Name="Altimeter_Off_Flag1.bmp" Luminous="Yes" ImageSizes="134,42">
	</Image>
</Element>
<Element>
	<Position X="104" Y="144"/>
	<Visible>(A:CIRCUIT GENERAL PANEL ON, bool) (A:CIRCUIT AVIONICS ON, bool) &amp; 0 ==</Visible>
	<Image Name="Altimeter_Off_Flag2.bmp" Luminous="Yes" ImageSizes="48,23">
	</Image>
</Element>

<Element>
	<Position X="128" Y="128"/>
	<Image Name="Altimeter_Needle.bmp" Luminous="Yes" PointsTo="East" ImageSizes="133,22">
	<Axis X="16" Y="11"/>
	</Image>
	<Rotate>
	<Value>(A:CIRCUIT GENERAL PANEL ON, bool) (A:CIRCUIT AVIONICS ON, bool) &amp; if{ (A:Indicated Altitude,feet) 100 / } els{ 0 }</Value>
	<Failures>
	<SYSTEM_PITOT_STATIC Action="Freeze"/>
	<GAUGE_ALTIMETER Action="Freeze"/>
	</Failures>
	<Nonlinearity>
	<Item Value="0" X="128" Y="4"/>
	<Item Value="5" X="128" Y="252"/>
	</Nonlinearity>
	<Delay DegreesPerSecond="90"/>
	</Rotate>
</Element>

<Element>
    <Position X="128" Y="128"/>
    <Image Name="Alt_IAS_bug.bmp" PointsTo="East" Luminous="Yes" ImageSize="124,22" >
     <Axis X="1" Y="11" />
    </Image>
    <Rotate>
      <Value>(A:CIRCUIT GENERAL PANEL ON, bool) (A:CIRCUIT AVIONICS ON, bool) &amp; if{ (A:Autopilot altitude lock var, feet) 100 / } els{ 0 }</Value>
   <Failures>
     <SYSTEM_PITOT_STATIC Action="Freeze"/>
     <GAUGE_ALTIMETER Action="Freeze"/>
   </Failures>
	<Nonlinearity>
	  <Item Value="0" X="130" Y="4"/>
	  <Item Value="1" X="198" Y="26"/>
	  <Item Value="2" X="244" Y="85"/>
	  <Item Value="3" X="242" Y="164"/>
	  <Item Value="4" X="198" Y="229"/>
	  <Item Value="5" X="128" Y="252"/>
	  <Item Value="6" X="59" Y="229"/>
	  <Item Value="7" X="12" Y="164"/>
	  <Item Value="8" X="12" Y="85"/>
	  <Item Value="9" X="59" Y="26"/>
	</Nonlinearity>
	<Delay DegreesPerSecond="90"/>
	</Rotate>
</Element>

<Mouse>
	<Help ID="HELPID_GAUGE_ALTIMETER"/>
	<Tooltip ID="TOOLTIPTEXT_ALTIMETER_FEET" MetircID="TOOLTIPTEXT_ALTIMETER_FEET_METERS_SPECIAL"/>
	 <Area Left="0" Right="46" Top="215" Bottom="254">
	    <Help ID="HELPID_GAUGE_TAS_CALIBRATION"/>
	    <Tooltip ID="TOOLTIPTEXT_ALTIMETER_KOHLSMAN_INHG" MetircID="TOOLTIPTEXT_ALTIMETER_KOHLSMAN_MBAR"/>
	  <Area Right="23">
	    <Cursor Type="DownArrow"/>
	    <Click Event="KOHLSMAN_DEC" Repeat="Yes"/>
	  </Area>
	  <Area Left="23">
	    <Cursor Type="UpArrow"/>
	    <Click Event="KOHLSMAN_INC" Repeat="Yes"/>
	  </Area>
	</Area>

      <Area Left="204" Top="215" Right="254" Bottom="254">
         <Area Right="25">
            <Click Event="AP_ALT_VAR_DEC" Repeat="Yes"/>
            <Cursor Type="DownArrow"/>
         </Area>
         <Area Left="25">
            <Click Event="AP_ALT_VAR_INC" Repeat="Yes"/>
            <Cursor Type="UpArrow"/>
         </Area>
      </Area>
</Mouse>
</Gauge>
