<?xml version="1.0" encoding="UTF-8"?>
<Gauge Name="ISFD version 2 narrow" Version="1.0">
	<Image Name="ISFD_n_bckgrd.bmp" ImageSizes="280,240,280,240"/>
	
<!-- ATTITUDE DISPLAY -->
<!-- Attitude ball -->
<Element>
	<Position X="131.5" Y="129.5"/>
	<Image Name="ISFD_n_attitude_ball.bmp" ImageSizes="300,1000,300,1000">
	<Axis X="150" Y="500" />
	</Image>
		<Shift>
		<Value Minimum="-90" Maximum="90">(A:Attitude indicator pitch degrees,degrees) /-/</Value>
			<Scale X="0" Y="-4" />
		</Shift>
		<Rotate>
		<Value>(A:Attitude indicator bank degrees,radians)</Value>
		</Rotate>
</Element>

<!-- Roll scale -->
<Element>
	<Position X="33" Y="34"/>
	<Image Name="ISFD_n_roll_scale.bmp" ImageSizes="196,96,196,96"/>
</Element>

<!-- Roll Indicator -->
<Element>
	<Position X="131.5" Y="129.5"/>
	<Image Name="ISFD_n_roll_bug.bmp" ImageSizes="17,13,17,13">
	<Axis X="8.5" Y="85" />
	</Image>
		<Rotate>
		<Value Minimum="-360" Maximum="360">(A:Attitude indicator bank degrees:1, radians)</Value>
		</Rotate>
</Element>

<!-- Attitude bar -->
<Element>
	<Position X="68" Y="126"/>
	<Image Name="ISFD_n_attitude_bar.bmp" ImageSizes="127,13,127,13"/>
</Element>

<!-- ILS BARS DISPLAY -->
<!-- Glide slope scale -->
<Element>
	<Visible>(A:HSI GSI needle valid, bool) 1 ==</Visible>
	<Position X="198" Y="74"/>
	<Image Name="ISFD_n_glide.bmp" ImageSizes="11,111,11,111"/>
</Element>

<!-- Glide slope bug -->
<Element>
	<Visible>(A:HSI GSI needle valid, bool) 1 ==</Visible>
	<Image Name="ISFD_n_glide_bug.bmp" ImageSizes="17,9,17,9"/>
		<Shift>
		<Value Minimum="-120" Maximum="120">(A:HSI GSI needle valid, bool) if{ (A:HSI GSI needle, number) } els{ 120 }</Value>
		<Nonlinearity>
			<Item Value="-120" X="195" Y="77" />
			<Item Value="0" X="195" Y="125" />
			<Item Value="120" X="195" Y="173" />
		</Nonlinearity>
		</Shift>
</Element>

<!-- Localizer scale -->
<Element>
	<Visible>(A:HSI GSI needle valid, bool) 1 ==</Visible>
	<Position X="76" Y="185"/>
	<Image Name="ISFD_n_loc.bmp" ImageSizes="111,11,111,11"/>
</Element>

<!-- Localizer bug -->
<Element>
	<Visible>(A:HSI GSI needle valid, bool) 1 ==</Visible>
	<Image Name="ISFD_n_loc_bug.bmp" ImageSizes="9,17,9,17">
	</Image>
		<Shift>
		<Value Minimum="-100" Maximum="100">(A:HSI CDI needle, number)</Value>
		<Nonlinearity>
			<Item Value="-100" X="79" Y="182" />
			<Item Value="0" X="127" Y="182" />
			<Item Value="100" X="175" Y="182" />
		</Nonlinearity>
		</Shift>
</Element>

<!-- Lower cover -->
<Element>
	<Position X="40" Y="202"/>
	<Image Name="ISFD_n_cover.bmp" ImageSizes="183,34,183,34"/>
</Element>

<!-- Compas ring --> 
<Element>
	<Position X="131.5" Y="506"/>
	<Image Name="ISFD_n_compas.bmp" ImageSizes="600,600,600,600">
	<Axis X="300" Y="300" />
	</Image>
	<Rotate>
		<Value>(A:Plane heading degrees gyro,radians) /-/</Value>
	<Failures>
		<SYSTEM_ELECTRICAL_PANELS Action="Zero"/>
		<SYSTEM_ELECTRICAL_AVIONICS Action="Zero"/>
		<GAUGE_GYRO_HEADING Action="Freeze"/>
	</Failures>
	</Rotate>
</Element>

<!-- Compas bug -->
<Element>
	<Position X="123" Y="201"/>
	<Image Name="ISFD_n_compasl_bug.bmp" ImageSizes="17,13,17,13"/>
</Element>

<!-- AIR SPEED DISPLAY -->
<!-- Airspeed Tape -->
<Element>
	<Position X="0" Y="0"/>
	<MaskImage Name="ISFD_n_speed_mask_full.bmp" Imagesizes="40,240,40,240">
	<Axis X="0" Y="122" />
	</MaskImage>
	<Image Name="ISFD_n_speed_full.bmp" ImageSizes="40,2208,40,2208">
	<Axis X="0" Y="0" />
	</Image>
		<Shift>
		<Value Minimum="0" Maximum="1000">(A:AIRSPEED INDICATED, knots) %</Value>
		<Nonlinearity>
			<Item Value="0" X="0" Y="2052" />
			<Item Value="1000" X="0" Y="102" />
		</Nonlinearity>
		</Shift>
</Element>

<!-- Speed window -->
<Element>
	<Position X="0" Y="111"/>
	<Image Name="ISFD_n_speed_window.bmp" ImageSizes="45,38,45,38"/>
</Element>

<!-- speed tens stripe -->
<Element>
	<Position X="1" Y="113"/>
	<MaskImage Name="ISFD_n_speed_mask_tens.bmp" Imagesizes="26,34,26,34">
	<Axis X="0" Y="9" />
	</MaskImage>
	<Image Name="ISFD_n_speed_tens.bmp" ImageSizes="26,2509,26,2509">
	<Axis X="0" Y="0" />
	</Image>
		<Shift>
		<Value Minimum="0" Maximum="99">(A:AIRSPEED INDICATED, knots) 10 / %</Value>
		<Nonlinearity>
			<Item Value="0" X="0" Y="2484" />
			<Item Value="99" X="0" Y="9" />
		</Nonlinearity>
		</Shift>
</Element>

<!-- speed units stripe -->
<Element>
	<Position X="27" Y="113"/>
	<MaskImage Name="ISFD_n_speed_mask_tens.bmp" Imagesizes="13,34,13,34">
	<Axis X="0" Y="9" />
	</MaskImage>
	<Image Name="ISFD_n_speed_unit.bmp" ImageSizes="13,243,13,243">
	<Axis X="0" Y="0" />
	</Image>
	<Shift>
		<Value Minimum="0" Maximum="9">(A:AIRSPEED INDICATED, knots) (A:AIRSPEED INDICATED, knots) 10 div 10 * -</Value>
		<Nonlinearity>
			<Item Value="0" X="0" Y="200" />
			<Item Value="9" X="0" Y="38" />
		</Nonlinearity>
		</Shift>
</Element>

<!-- ALTITUDE DISPLAY -->
<!-- Altitude Tape -->
<Element>
	<Position X="223" Y="0"/>
	<MaskImage Name="ISFD_n_altitude_mask_full.bmp" Imagesizes="57,240,57,240">
	<Axis X="0" Y="124" />
	</MaskImage>
	<Image Name="ISFD_n_altitude_full.bmp" ImageSizes="57,15253,57,15253">
	<Axis X="0" Y="0" />
	</Image>
	<Shift>
		<Value Minimum="0" Maximum="61000">(A:Indicated Altitude, feet) %</Value>
		<Nonlinearity>
			<Item Value="0" X="0" Y="15111" />
			<Item Value="61000" X="0" Y="166" />
		</Nonlinearity>
		</Shift>
</Element>

<!-- Altitude window -->
<Element>
	<Position X="213" Y="111"/>
	<Image Name="ISFD_n_altitude_window.bmp" ImageSizes="67,38,67,38"/>
</Element>

<!-- Altitude thousands stripe -->
<Element>
	<Position X="216" Y="113"/>
	<MaskImage Name="ISFD_n_speed_mask_tens.bmp" Imagesizes="26,34,26,34">
	<Axis X="0" Y="9" />
	</MaskImage>
	<Image Name="ISFD_n_altitude_thousand.bmp" ImageSizes="26,1559,26,1559">
	<Axis X="0" Y="0" />
	</Image>
	<Shift>
		<Value Minimum="0" Maximum="61">(A:Indicated Altitude, feet) 1000 / %</Value>
		<Nonlinearity>
			<Item Value="0" X="0" Y="1534" />
			<Item Value="61" X="0" Y="9" />
		</Nonlinearity>
		</Shift>
</Element>

<!-- Altitude hundred stripe -->
<Element>
	<Position X="244" Y="113"/>
	<MaskImage Name="ISFD_n_altitude_mask_hundreds.bmp" Imagesizes="11,34,11,34">
	<Axis X="0" Y="11" />
	</MaskImage>
	<Image Name="ISFD_n_altitude_hundred.bmp" ImageSizes="11,299,11,299">
	<Axis X="0" Y="0" />
	</Image>
	<Shift>
		<Value Minimum="0" Maximum="9">(A:Indicated Altitude, feet) 100 div (A:Indicated Altitude, feet) 1000 div 10 * -</Value>
		<Nonlinearity>
			<Item Value="0" X="0" Y="251" />
			<Item Value="9" X="0" Y="35" />
		</Nonlinearity>
		</Shift>
</Element>

<!-- Altitude tens stripe -->
<Element>
	<Position X="255" Y="113"/>
	<MaskImage Name="ISFD_n_altitude_mask_tens.bmp" Imagesizes="22,34,22,34">
	<Axis X="0" Y="11" />
	</MaskImage>
	<Image Name="ISFD_n_altitude_tens.bmp" ImageSizes="22,129,22,129">
	<Axis X="0" Y="0" />
	</Image>
	<Shift>
		<Value Minimum="0" Maximum="9">(A:Indicated Altitude, feet) 10 div (A:Indicated Altitude, feet) 100 div 10 * -</Value>
		<Nonlinearity>
			<Item Value="0" X="0" Y="89" />
			<Item Value="9" X="0" Y="19" />
		</Nonlinearity>
		</Shift>
</Element>

<!-- Upper cover -->
<Element>
	<Position X="40" Y="0"/>
	<Image Name="ISFD_n_cover_up_InHg.bmp" ImageSizes="183,34,183,34"/>
</Element>

<!-- Autopilot APPROACH - Green "APR" display -->
<Element>
	<Image Name="ISFD_n_APP.bmp" ImageSizes="41,25,41,25"/>
		<Shift>
		<Value Minimum="0" Maximum="1">(A:Autopilot approach hold, bool) 1 ==</Value>
		<Nonlinearity>
			<Item Value="0" X="56" Y="-30" />
			<Item Value="1" X="56" Y="5" />
		</Nonlinearity>
		</Shift>
</Element>

<!-- QNH InHg units -->
<Element>
	<Position X="145" Y="10"/>
	<MaskImage Name="ISFD_n_Inhg_mask.bmp" Imagesizes="21,13,21,13">
	<Axis X="0" Y="0" />
	</MaskImage>
	<Image Name="ISFD_n_Inhg.bmp" ImageSizes="21,37,21,37">
	<Axis X="0" Y="0" />
	</Image>
	<Shift>
		<Value Minimum="28" Maximum="30">(A:Kohlsman setting hg,inHg) %</Value>
		<Nonlinearity>
			<Item Value="28" X="0" Y="24" />
			<Item Value="30" X="0" Y="0" />
		</Nonlinearity>
		</Shift>
</Element>

<!-- QNH InHg decimal -->
<Element>
	<Position X="166" Y="10"/>
	<MaskImage Name="ISFD_n_Inhg_mask_decimal.bmp" Imagesizes="19,13,19,13">
	<Axis X="0" Y="0" />
	</MaskImage>
	<Image Name="ISFD_n_InHg_decimal.bmp" ImageSizes="19,1201,19,1201">
	<Axis X="0" Y="0" />
	</Image>
	<Shift>
		<Value Minimum="0" Maximum="99">(A:Kohlsman setting hg,inHg) 1000 * 5 + 10 div (A:Kohlsman setting hg,inHg) % 100 * -</Value>
		<Nonlinearity>
			<Item Value="0" X="0" Y="1188" />
			<Item Value="99" X="0" Y="0" />
		</Nonlinearity>
		</Shift>
</Element>

<!-- KNOBS CONTROL  -->
<!-- Right knob controls QNH -->
<Mouse>
<Area>
	<Area>
		<Cursor Type="DownArrow" />
		<Click Event="KOHLSMAN_DEC" Repeat="Yes" />
	</Area>
	<Area>
		<Cursor Type="UpArrow" />
		<Click Event="KOHLSMAN_INC" Repeat="Yes" />
	</Area>
</Area>
</Mouse>

<!-- Left knob controls QNH -->
<Mouse>
<Area>
	<Area>
		<Cursor Type="DownArrow" />
		<Click Event="KOHLSMAN_DEC" Repeat="Yes" />
	</Area>
	<Area>
		<Cursor Type="UpArrow" />
		<Click Event="KOHLSMAN_INC" Repeat="Yes" />
	</Area>
</Area>
</Mouse>
</Gauge>