<Gauge Name="HUDHornet" Version="1.0">
<Element> 
	<Update Frequency="18"/>
	<Visible>(A:ELECTRICAL MASTER BATTERY, bool) (L:HUD Bright Switch, bool) (L:HUD Power, bool) ! &amp;&amp;</Visible>
	<Image Name="HUDX_G.bmp" Bright="Yes" ImageSizes="475,600"/>


//--**************************************************************************
//--- at zoom 1.05, 90 degrees or pi/2 radians = ~2060 pixels (2062); zoom 1 is 1964;
//--**************************************************************************
//--- insert L Vars, (L:TrackDiff,radians), (L:ClimbAngle,radians), (L:TrackDiffVVect,radians)
//--- 
	<Element>
		<Select>
			<Value>(L:Cage switch,bool) if{ 0 (>L:TrackDiff, radians) } els{ (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor (A:PLANE HEADING DEGREES TRUE, radians) rnor - abs 0.5 &lt; if{ (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor (A:PLANE HEADING DEGREES TRUE, radians) rnor - (>L:TrackDiff, radians) } els{ (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor (A:PLANE HEADING DEGREES TRUE, radians) rnor &lt; if{ (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor 3.14159 + (A:PLANE HEADING DEGREES TRUE, radians) rnor - (>L:TrackDiff, radians) ) } els{ (A:PLANE HEADING DEGREES TRUE, radians) rnor 3.14159 + (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor - /-/ (>L:TrackDiff, radians) ) } } }</Value>
		</Select>
	</Element>
	<Element>
		<Select>
			<Value>(A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor (A:PLANE HEADING DEGREES TRUE, radians) rnor - abs 0.5 &lt; if{ (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor (A:PLANE HEADING DEGREES TRUE, radians) rnor - (>L:TrackDiffVVect, radians) } els{ (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor (A:PLANE HEADING DEGREES TRUE, radians) rnor &lt; if{ (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor 3.14159 + (A:PLANE HEADING DEGREES TRUE, radians) rnor - (>L:TrackDiffVVect, radians) ) } els{ (A:PLANE HEADING DEGREES TRUE, radians) rnor 3.14159 + (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor - /-/ (>L:TrackDiffVVect, radians) ) } }</Value>
		</Select>
	</Element>
	<Element>
		<Select>
			<Value>(A:VELOCITY WORLD Y, m/s) (A:GROUND VELOCITY, m/s) atg2 /-/ (>L:ClimbAngle, radians)</Value>
		</Select>
	</Element>
	<Element>
		<Select>
			<Value>(A:Plane heading degrees gyro, radians) (L:TrackDiffVVect, radians) + (>L:TrackAngle, radians)</Value>
		</Select>
	</Element>
	
		


//----HUD waterline************************************************************
		<Element>
		   <Visible>(A:GEAR HANDLE POSITION,percent) 0 &gt;</Visible>
    	  		<Position X="140" Y="110"/>
			<Image Name="wtrln.bmp" Bright="Yes" ImageSizes="54,22">
		    	</Image>
		</Element>
//---HUD Steering at waterline****************************************************
(*--CDI value "1" = 2.5 deg if LOC, 10 degrees if VOR--*)
	<Element>
	     
	        <Element>
		<Visible>(L:Vector Switch, bool) (L:Steering Switch, enum) 0 &gt; &amp;&amp; (L:Steering Switch, enum) 2 == if{ (A:NAV2 HAS LOCALIZER, bool) ! } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 HAS LOCALIZER, bool) ! } } &amp;&amp;</Visible>
		    <Element>
		        <Visible>(L:Steering Switch, enum) 2 == if{ (A:NAV2 CDI, number) 127 / -0.005 &lt; } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 CDI, number) 127 / -0.005 &lt; } }</Visible>
			<Position X="167" Y="117"/> 
			<Image Name="VNvBkWL.bmp" Bright="Yes" ImageSizes="123,46">
				<Axis X="62" Y="23"/>
		    	</Image>
			<Rotate>
                  			<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 OBS, radians) (A:Plane heading degrees gyro, radians) - } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 OBS, radians) (A:Plane heading degrees gyro, radians) -  } }</Value>
              		</Rotate>
		    </Element>
		    <Element>
		         <Visible>(L:Steering Switch, enum) 2 == if{ (A:NAV2 CDI, number) 127 / 0.005 &gt; } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 CDI, number) 127 / 0.005 &gt; } }</Visible>
			<Position X="167" Y="117"/>
			<Image Name="VNvBkWR.bmp" Bright="Yes" ImageSizes="123,46">
				<Axis X="62" Y="23"/>
		    	</Image>
			<Rotate>
                  			<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 OBS, radians) (A:Plane heading degrees gyro, radians) - } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 OBS, radians) (A:Plane heading degrees gyro, radians) -  } }</Value>
              		</Rotate>
		    </Element>
		    <Element>  (*--pos was 165,120; at 52, -4 with needle centered--*)
			<Position X="167" Y="117"/>
			<Image Name="VNvArw.bmp" Bright="Yes" ImageSizes="19,52">
				<Axis X="10" Y="26"/>
		    	</Image>
			<Shift>   (*--104,158,212/91; r1/3 1dot, down 2/3 arrow--*)
				<Value Minimum="-1" Maximum="1">(L:Steering Switch, enum) 2 == if{ (A:NAV2 CDI, number) 127 / } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 CDI, number) 127 /  } }</Value>
				<Nonlinearity>
					<Item Value="-.8" X="113" Y="118"/>
					<Item Value="0" X="167" Y="118"/>
					<Item Value=".8" X="221" Y="118"/>
				</Nonlinearity>
			</Shift>
			<Rotate>
                  			<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 OBS, radians) (A:Plane heading degrees gyro, radians) - } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 OBS, radians) (A:Plane heading degrees gyro, radians) -  } }</Value>
              		</Rotate>
		    </Element>
		    <Element>
		       <Visible>(L:Steering Switch, enum) 2 == if{ (A:NAV2 HAS NAV, bool) } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 HAS NAV, bool) } }</Visible>
			<Position X="167" Y="117"/> 
			<Clip Top="10" Left="10" Right="322" Bottom="410"/> 
			<Image Name="VNvPtR.bmp" Bright="Yes" ImageSizes="123,46">
				<Axis X="62" Y="23"/>
		    	</Image>
			<Rotate>
				<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 RADIAL,radians) (A:PLANE HEADING DEGREES GYRO,radians) - pi  + } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 RADIAL,radians) (A:PLANE HEADING DEGREES GYRO,radians) - pi  +  } }</Value>
              		</Rotate>
		    </Element>
	            </Element>
	            <Element>  
		     <Visible>(L:Vector Switch, bool) (L:Steering Switch, enum) 0 &gt; &amp;&amp; (L:Steering Switch, enum) 2 == if{ (A:NAV2 HAS LOCALIZER, bool) } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 HAS LOCALIZER, bool) } } &amp;&amp;</Visible>
			<Element>
				<Position X="167" Y="117"/> 
				<Image Name="VNvArw.bmp" Bright="Yes" ImageSizes="19,52">
					<Axis X="10" Y="26"/>
		    		</Image>
				<Rotate>
                  				<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 OBS, radians) (A:Plane heading degrees gyro, radians) - } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 OBS, radians) (A:Plane heading degrees gyro, radians) -  } }</Value>
              			</Rotate>
		 	</Element>
		</Element>	
	</Element>
//---HUD Steering at velocity vector****************************************************
	<Element>
	     
	        <Element>
		<Visible>(L:Vector Switch, bool) ! (L:Steering Switch, enum) 0 &gt; &amp;&amp; (L:Steering Switch, enum) 2 == if{ (A:NAV2 HAS LOCALIZER, bool) ! } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 HAS LOCALIZER, bool) ! } } &amp;&amp;</Visible>
		    <Element>
		         <Visible>(L:Steering Switch, enum) 2 == if{ (A:NAV2 CDI, number) 127 / -0.005 &lt; } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 CDI, number) 127 / -0.005 &lt; } }</Visible>
			<Position X="165" Y="120"/> 
			<Clip Top="10" Left="10" Right="322" Bottom="410"/>
			<Image Name="VNvBkL.bmp" Bright="Yes" ImageSizes="123,46">
				<Axis X="62" Y="23"/>
		    	</Image>
			<Rotate>
                  				<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 OBS, radians) (A:Plane heading degrees gyro, radians) - } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 OBS, radians) (A:Plane heading degrees gyro, radians) -  } }</Value>
              			</Rotate>
			<Rotate>
				<Value>(A:PLANE BANK DEGREES,radians) /-/</Value>
			</Rotate>
			<Shift>
        		   	      <Value>(A:VELOCITY WORLD Y, m/s) (A:GROUND VELOCITY, m/s) atg2 /-/ (A:PLANE PITCH DEGREES, radians) - </Value>
		        		<Nonlinearity>
				 		<Item Value="-1.570795" X="167" Y="-1942"/>
						<Item Value="1.570795" X="167" Y="2178"/>
					</Nonlinearity>
		    	</Shift>
			<Shift>
			     <Value>(A:PLANE PITCH DEGREES,radians) abs cos (L:TrackDiffVVect, radians) * </Value>
			       <Nonlinearity>
					 <Item Value="-1.570795" X="-1893" Y="118"/>
					 <Item Value="1.570795" X="2227" Y="118"/>
			       </Nonlinearity>
		    	</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
		    </Element>
		     <Element> 		<comment>p165,120; a62,23 close </comment>
		         <Visible>(L:Steering Switch, enum) 2 == if{ (A:NAV2 CDI, number) 127 / 0.005 &gt; } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 CDI, number) 127 / 0.005 &gt; } }</Visible>
			<Position X="165" Y="120"/> 
			<Clip Top="10" Left="10" Right="322" Bottom="410"/>
			<Image Name="VNvBkR.bmp" Bright="Yes" ImageSizes="123,46">
				<Axis X="62" Y="23"/>
		    	</Image>
			<Rotate>
					<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 OBS, radians) (A:Plane heading degrees gyro, radians) - } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 OBS, radians) (A:Plane heading degrees gyro, radians) -  } }</Value>
              			</Rotate>
			<Rotate>
				<Value>(A:PLANE BANK DEGREES,radians) /-/</Value>
			</Rotate>
			<Shift>
        		   	      <Value>(A:VELOCITY WORLD Y, m/s) (A:GROUND VELOCITY, m/s) atg2 /-/ (A:PLANE PITCH DEGREES, radians) - </Value>
		        		<Nonlinearity>
				 	<Item Value="-1.570795" X="167" Y="-1942"/>
					<Item Value="1.570795" X="167" Y="2178"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
			     <Value>(A:PLANE PITCH DEGREES,radians) abs cos (L:TrackDiffVVect, radians) * </Value>
			       <Nonlinearity>
				 <Item Value="-1.570795" X="-1893" Y="118"/>
				 <Item Value="1.570795" X="2227" Y="118"/>
			       </Nonlinearity>
		    	</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
		    </Element>

		    <Element>  (*--p165,120;a10,26 with needle centered--*)
			<Position X="165" Y="120"/> 
			<Clip Top="10" Left="10" Right="322" Bottom="410"/>
			<Image Name="VNVARW.bmp" Bright="Yes" ImageSizes="19,52">
				<Axis X="10" Y="26"/>
		    	</Image>
			<Shift>   (*--104,158,212/91; r1/3 1dot, down 2/3 arrow--*)
               				<Value Minimum="-1" Maximum="1">(L:Steering Switch, enum) 2 == if{ (A:NAV2 CDI, number) 127 / } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 CDI, number) 127 /  } }</Value>
				<Nonlinearity>
					<Item Value="-.8" X="111" Y="120"/>
					<Item Value="0" X="165" Y="120"/>
					<Item Value=".8" X="219" Y="120"/>
				</Nonlinearity>
			</Shift>
			<Rotate>
                  			<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 OBS, radians) (A:Plane heading degrees gyro, radians) - } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 OBS, radians) (A:Plane heading degrees gyro, radians) -  } }</Value>
              			</Rotate>
			<Rotate>
				<Value>(A:PLANE BANK DEGREES,radians) /-/</Value>
			</Rotate>
			<Shift>
        		   	      <Value>(A:VELOCITY WORLD Y, m/s) (A:GROUND VELOCITY, m/s) atg2 /-/ (A:PLANE PITCH DEGREES, radians) - </Value>
		        		<Nonlinearity>
				 	<Item Value="-1.570795" X="167" Y="-1942"/>
					<Item Value="1.570795" X="167" Y="2178"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
			     <Value>(A:PLANE PITCH DEGREES,radians) abs cos (L:TrackDiffVVect, radians) * </Value>
			       <Nonlinearity>
				 <Item Value="-1.570795" X="-1893" Y="118"/>
				 <Item Value="1.570795" X="2227" Y="118"/>
			       </Nonlinearity>
		    	</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
		    </Element>
		     <Element>
		         <Visible>(L:Steering Switch, enum) 2 == if{ (A:NAV2 HAS NAV, bool) } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 HAS NAV, bool) } }</Visible>
			<Position X="165" Y="120"/>  
			<Clip Top="10" Left="10" Right="322" Bottom="410"/>
			<Image Name="VNvPtR.bmp" Bright="Yes" ImageSizes="123,46">
				<Axis X="62" Y="23"/>
		    	</Image>
			<Rotate>
					<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 RADIAL,radians) (A:PLANE HEADING DEGREES GYRO,radians) - pi  + } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 RADIAL,radians) (A:PLANE HEADING DEGREES GYRO,radians) - pi  +  } }</Value>
                  			</Rotate>
			<Rotate>
				<Value>(A:PLANE BANK DEGREES,radians) /-/</Value>
			</Rotate>
			<Shift>
        		   	      <Value>(A:VELOCITY WORLD Y, m/s) (A:GROUND VELOCITY, m/s) atg2 /-/ (A:PLANE PITCH DEGREES, radians) - </Value>
		        		<Nonlinearity>
				 	<Item Value="-1.570795" X="167" Y="-1942"/>
					<Item Value="1.570795" X="167" Y="2178"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
			     <Value>(A:PLANE PITCH DEGREES,radians) abs cos (L:TrackDiffVVect, radians) * </Value>
			       <Nonlinearity>
				 <Item Value="-1.570795" X="-1893" Y="118"/>
				 <Item Value="1.570795" X="2227" Y="118"/>
			       </Nonlinearity>
		    	</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
		    </Element>
	            </Element>
		<Element>  
		     <Visible>(L:Vector Switch, bool) ! (L:Steering Switch, enum) 0 &gt; &amp;&amp; (L:Steering Switch, enum) 2 == if{ (A:NAV2 HAS LOCALIZER, bool) } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 HAS LOCALIZER, bool) } } &amp;&amp;</Visible>
			<Element>
				<Position X="165" Y="120"/> 
				<Clip Top="10" Left="10" Right="322" Bottom="410"/>
				<Image Name="VNvArw.bmp" Bright="Yes" ImageSizes="19,52">
					<Axis X="10" Y="26"/>
		    		</Image>
				<Rotate>
                  				<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 OBS, radians) (A:Plane heading degrees gyro, radians) - } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 OBS, radians) (A:Plane heading degrees gyro, radians) -  } }</Value>
              				</Rotate>
				<Rotate>
					<Value>(A:PLANE BANK DEGREES,radians) /-/</Value>
				</Rotate>
				<Shift>
        		   	   	   <Value>(A:VELOCITY WORLD Y, m/s) (A:GROUND VELOCITY, m/s) atg2 /-/ (A:PLANE PITCH DEGREES, radians) - </Value>
		        			<Nonlinearity>
				 		<Item Value="-1.570795" X="167" Y="-1942"/>
						<Item Value="1.570795" X="167" Y="2178"/>
					</Nonlinearity>
		    		</Shift>
				<Shift>
				     <Value>(A:PLANE PITCH DEGREES,radians) abs cos (L:TrackDiffVVect, radians) * </Value>
				       <Nonlinearity>
					 <Item Value="-1.570795" X="-1893" Y="118"/>
					 <Item Value="1.570795" X="2227" Y="118"/>
				       </Nonlinearity>
		    		</Shift>
				<Rotate>
    	    				<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   		</Rotate>
		 	</Element>
		</Element>	
	</Element>
//----HUD steering text block
  <Element>
   <Visible>(L:Declutter Switch, enum) 1 &lt; (L:Steering Switch, enum) 0 &gt; &amp;&amp;</Visible>
     	<Element>
		<Position X="15" Y="394"/>
	  	<Text X="60" Y="12" Bright="Yes" Length="15" Font="arial" Color="#003300" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
			<String>%((L:Steering Switch, enum) 1 ==)%{if}%STR 1%{else}STR 2%</String>
          		</Text>
     	</Element>
	<Element>
	        <Visible>(L:Steering Switch, enum) 2 == if{ (A:NAV2 HAS LOCALIZER, bool) (A:NAV2 HAS NAV, bool) ! || } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 HAS LOCALIZER, bool) (A:NAV1 HAS NAV, bool) ! || } }</Visible>
		<Position X="15" Y="392"/>  
		<Image Name="X60.bmp" Bright="Yes" ImageSizes="90,16">
		</Image>
	</Element>
  </Element>

//----HUD Ladder************************************************************

		<Element>
		   <Visible>(L:Ladder Switch, enum) 0 ==</Visible> (*-- 0=full ladder, 1=horizon, 2=all off--*)
    	  		<Position X="0" Y="0"/>
	      		<MaskImage Name="LDRMSK.bmp" Bright="Yes" ImageSizes="333,421">
		  		<Axis X="167" Y="118"/>
		  	</MaskImage>
			<Image Name="LadderL.bmp" Bright="Yes" ImageSizes="291,511">
				<Axis X="146" Y="996"/>  (*--y is 272 for alternate ladder0.bmp--*)
		    	</Image>
			(*--Horizon should be at y=270 on ladder0--*)
			 <Shift>
        				<Value Maximum="90" Minimum="-90">(A:PLANE PITCH DEGREES,degrees) /-/</Value>
		        		<Nonlinearity>
						<Item Value="-90" Y="-2060"/>
						<Item Value="90" Y="2060"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
				<Value>(L:ClimbAngle, radians) abs cos (L:TrackDiff, radians) * </Value>
					<Nonlinearity>
						<Item Value="-1.570795" X="-2060"/>
						 <Item Value="1.570795" X="2060"/>
					</Nonlinearity>
			</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
<comment>
	//---- experiment
			<Element>
				<Position X="121" Y="975"/>
				<Image Name="VvctrRed.bmp" ImageSizes="52,37">
		    		</Image>
				<Shift>
				     <Value>(L:ClimbAngle, degrees) (A:PLANE PITCH DEGREES,degrees) - </Value>
					<Nonlinearity>
						<Item Value="-90" X="121" Y="-1085"/>
						 <Item Value="90" X="121" Y="3035"/>
					</Nonlinearity>
				</Shift>


			</Element>	
</comment>
		</Element>
		<Element>
		   <Visible>(L:Ladder Switch, enum) 0 == (A:GEAR HANDLE POSITION,percent) 0 == &amp;&amp;</Visible>
    	  		<Position X="0" Y="0"/>
	      		<MaskImage Name="LDRMSK.bmp" Bright="Yes" ImageSizes="333,421">
		  		<Axis X="167" Y="118"/>
		  	</MaskImage>
			<Image Name="HrznNrw.bmp" Bright="Yes" ImageSizes="281,42">
				<Axis X="146" Y="15"/> (*--axis must match ladder's; currently 1 pixel below 2 pixel high horizon at y=270 on ladder0--*)
		    	</Image>
			 <Shift>
        			<Value Maximum="90" Minimum="-90">(A:PLANE PITCH DEGREES,degrees) /-/</Value>
		        	<Nonlinearity>
						<Item Value="-90" Y="-2060"/>
						<Item Value="90" Y="2060"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
				<Value>(L:ClimbAngle, radians) abs cos (L:TrackDiff, radians) * </Value>
					<Nonlinearity>
						<Item Value="-1.570795" X="-2060"/>
						 <Item Value="1.570795" X="2060"/>
					</Nonlinearity>
			</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
		</Element>
		<Element>
		   <Visible>(L:Ladder Switch, enum) 0 == (A:GEAR HANDLE POSITION,percent) 0 &gt; &amp;&amp; (L:Ladder Switch, enum) 1 == ||</Visible>
    	  		<Position X="0" Y="0"/>
	      		<MaskImage Name="LDRMSK.bmp" Bright="Yes" ImageSizes="333,421">
		  		<Axis X="167" Y="118"/>
		  	</MaskImage>
			<Image Name="HrznWd.bmp" Bright="Yes" ImageSizes="361,42">
				<Axis X="181" Y="15"/> (*--axis must match ladder's; currently 1 pixel below 2 pixel high horizon at y=270 on ladder0--*)
		    	</Image>
			 <Shift>
        			<Value Maximum="90" Minimum="-90">(A:PLANE PITCH DEGREES,degrees) /-/</Value>
		        	<Nonlinearity>
						<Item Value="-90" Y="-2060"/>
						<Item Value="90" Y="2060"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
				<Value>(L:ClimbAngle, radians) abs cos (L:TrackDiff, radians) * </Value>
					<Nonlinearity>
						<Item Value="-1.570795" X="-2060"/>
						 <Item Value="1.570795" X="2060"/>
					</Nonlinearity>
			</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
			
		</Element>
	//3 and 4 degree glideslope mark
		<Element>
		   <Visible>(L:Slope Switch, enum) 1 ==</Visible>
    	  		<Position X="0" Y="0"/>
	      		<MaskImage Name="LDRMSK.bmp" Bright="Yes" ImageSizes="333,421">
		  		<Axis X="167" Y="118"/>
		  	</MaskImage>
			<Image Name="slope.bmp" Bright="Yes" ImageSizes="291,123">
				<Axis X="146" Y="5"/> 
		    	</Image>
			 <Shift>
        			<Value Maximum="90" Minimum="-90">(A:PLANE PITCH DEGREES,degrees) /-/</Value>
		        	<Nonlinearity>
						<Item Value="-90" Y="-2060"/>
						<Item Value="90" Y="2060"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
				<Value>(L:ClimbAngle, radians) abs cos (L:TrackDiff, radians) * </Value>
					<Nonlinearity>
						<Item Value="-1.570795" X="-2060"/>
						 <Item Value="1.570795" X="2060"/>
					</Nonlinearity>
			</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
		</Element>
	//--top 50 degrees
		<Element>
		   <Visible>(L:Ladder Switch, enum) 0 ==</Visible>
    	  		<Position X="0" Y="0"/>
	      		<MaskImage Name="LDRMSK.bmp" Bright="Yes" ImageSizes="333,421">
		  		<Axis X="167" Y="118"/>
		  	</MaskImage>
			<Image Name="LadderT.bmp" Bright="Yes" ImageSizes="291,511">
				<Axis X="146" Y="0"/> (*--264 px down bmp is zenith--*) 
		    	</Image>
			 <Shift>
        			<Value Maximum="90" Minimum="-90">(A:PLANE PITCH DEGREES,degrees) /-/</Value>
		        	<Nonlinearity>
						<Item Value="-90" Y="-4385"/>
						<Item Value="90" Y="-265"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
				<Value>(L:ClimbAngle, radians) abs cos (L:TrackDiff, radians) * </Value>
					<Nonlinearity>
						<Item Value="-1.570795" X="-2060"/>
						 <Item Value="1.570795" X="2060"/>
					</Nonlinearity>
			</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
		</Element>
	//--bottom 50 degrees
		<Element>
		   <Visible>(L:Ladder Switch, enum) 0 ==</Visible>
    	  		<Position X="0" Y="0"/>
	      		<MaskImage Name="LDRMSK.bmp" Bright="Yes" ImageSizes="333,421">
		  		<Axis X="167" Y="118"/>
		  	</MaskImage>
			<Image Name="LadderB.bmp" Bright="Yes" ImageSizes="291,511">
				<Axis X="146" Y="0"/> (*--264 px down bmp is zenith--*) 
		    	</Image>
			 <Shift>
        			<Value Maximum="90" Minimum="-90">(A:PLANE PITCH DEGREES,degrees) /-/</Value>
		        	<Nonlinearity>
						<Item Value="-90" Y="-1066"/>
						<Item Value="90" Y="3054"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
				<Value>(L:ClimbAngle, radians) abs cos (L:TrackDiff, radians) * </Value>
					<Nonlinearity>
						<Item Value="-1.570795" X="-2060"/>
						 <Item Value="1.570795" X="2060"/>
					</Nonlinearity>
			</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
		</Element>

//---- vector experiment ******************************************
<comment>
		
		vert component  	<Value>(A:INCIDENCE ALPHA, radians)  (A:Plane bank degrees,radians) sin *</Value>
			or (old)    <Value>(A:VELOCITY WORLD Y, m/s) (A:GROUND VELOCITY, m/s) atg2 /-/ (A:PLANE PITCH DEGREES, radians) - </Value>
		
		horiz/ component	<Value>(L:ClimbAngle, radians) abs cos (L:TrackDiffVVect, radians) *</Value>


					


<Element>		
	<Position X="140" Y="98"/>
	<Image Name="VVCTRRED.bmp" Bright="Yes" ImageSizes="52,37">
	</Image>
	<Shift>
        		 <Value>(A:INCIDENCE ALPHA, radians)  (A:Plane bank degrees,radians) sin *</Value>
		        	<Nonlinearity>
				<Item Value="-1.570795" X="140" Y="-1962"/>
				<Item Value="1.570795" X="140" Y="2158"/>
			</Nonlinearity>
	</Shift>
	<Shift>
		<Value>(L:ClimbAngle, radians) abs cos (L:TrackDiffVVect, radians) * </Value>
			<Nonlinearity>
				<Item Value="-1.570795" X="-1919" Y="98"/>
				<Item Value="1.570795" X="2201" Y="98"/>
			</Nonlinearity>
	</Shift>			    
</Element>


</comment>





//----HUD Velocity Vector and components************************ 
		<Element>
			<Visible>(L:Vector Switch, bool) !</Visible>
			<Element>		
				<Position X="140" Y="98"/>
					<Image Name="Vblnk.bmp" Bright="Yes" ImageSizes="52,37">
		    			</Image>
					<Shift>
        		   		 	          <Value>(A:VELOCITY WORLD Y, m/s) (A:GROUND VELOCITY, m/s) atg2 /-/ (A:PLANE PITCH DEGREES, radians) - </Value>
		        				<Nonlinearity>
						  	<Item Value="-1.570795" X="141" Y="-1962"/>
							<Item Value="1.570795" X="141" Y="2158"/>
						</Nonlinearity>
		    			</Shift>
					<Shift>
					   <Value>(L:ClimbAngle, radians) abs cos (L:TrackDiffVVect, radians) * </Value>
						<Nonlinearity>
						   <Item Value="-1.570795" X="-1919" Y="98"/>
						   <Item Value="1.570795" X="2201" Y="98"/>
						</Nonlinearity>
		    			</Shift>
					<Rotate>
    	    					<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   			</Rotate>
				     //----ghost vector / sideslip
				        <Element>
						<Position X="0" Y="0"/>
						<Clip Top="10" Left="10" Right="322" Bottom="410"/>
						<Image Name="Vvctr.bmp" Bright="Yes" ImageSizes="52,37">
		    				</Image>
					    	<Element>
							<Position X="0" Y="0"/>
							<Clip Top="10" Left="10" Right="322" Bottom="410"/>
							<Image Name="VYAW.bmp" Bright="Yes" ImageSizes="52,37">
							</Image>
							<Visible>(A:INCIDENCE BETA,radians) abs 0.027 &gt;</Visible>
							<Shift>
					   			<Value>(A:PLANE BANK DEGREES, radians) dnor cos (A:INCIDENCE BETA, radians) *(*----(L:TrackDiffVVect, radians) * redundant----*)</Value>
									<Nonlinearity>
						   				<Item Value="-1.570795" X="-2060" Y="0"/>
						   				<Item Value="1.570795" X="2060" Y="0"/>
									</Nonlinearity>
		    					</Shift>
							<Shift>
					   			<Value>(A:PLANE BANK DEGREES, radians) dnor sin (A:INCIDENCE BETA, radians) *</Value>
									<Nonlinearity>
						   				<Item Value="-1.570795" X="0" Y="-2060"/>
						   				<Item Value="1.570795" X="0" Y="2060"/>
									</Nonlinearity>
		    					</Shift>
					     	</Element>
					</Element>
				     //----AoA bracket
					<Element>
						<Position X="-9" Y="-5"/>
						<Clip Top="10" Left="10" Right="322" Bottom="410"/>	
						<Image Name="AOABRKT.bmp" Bright="Yes" ImageSizes="12,47">
		    				</Image>
						<Visible>(A:GEAR HANDLE POSITION,percent) 0 &gt; (L:AoABracket Switch, bool) ! &amp;&amp;</Visible>									
						<Shift>
							<Value Minimum="2.1" Maximum="14.1">(A:INCIDENCE ALPHA,Degrees)</Value>
								<Nonlinearity>
									<Item Value="-1.9" X="-9" Y="-243"/>
									<Item Value="18.1" X="-9" Y="233"/>
								</Nonlinearity>
						</Shift>			
					</Element>
				     //----HUD ILS LOC DISPLAY
					<Element>
						<Position X="73" Y="-26"/>
						<Clip Top="10" Left="10" Right="322" Bottom="410"/>
						<Visible>(A:HSI has localizer, bool) (L:ILS Switch, bool) ! &amp;&amp;</Visible>
							<Image Name="LCLNDL.bmp" Bright="Yes" ImageSizes="2,85">
							</Image>(*--was y=-26--*)
							<Shift>
               							<Value Minimum="-1" Maximum="1">(A:HSI CDI needle, number) 127 /</Value>
								<Nonlinearity>
									<Item Value="-1" X="-21" Y="-26"/>
									<Item Value="0" X="26" Y="-26"/>
									<Item Value="1" X="73" Y="-26"/>
								</Nonlinearity>
							</Shift>					
					</Element>
				     //----HUD ILS GS DISPLAY
					<Element>
						<Position X="-17" Y="65"/>
						<Clip Top="10" Left="10" Right="322" Bottom="410"/>
						<Visible>(A:HSI GSI needle valid, bool) (L:ILS Switch, bool) ! &amp;&amp;</Visible>
							<Image Name="GSNDL.bmp" Bright="Yes" ImageSizes="85,2">
							</Image>
							<Shift>
               							<Value Minimum="-1" Maximum="1">(A:HSI GSI needle, number) 120 /</Value>
								<Nonlinearity>
									<Item Value="-1" X="-17" Y="-31"/> (*--was x=-17--*)
									<Item Value="0" X="-17" Y="17"/>
									<Item Value="1" X="-17" Y="65"/>
								</Nonlinearity>
							</Shift>
					</Element>
				     //----HUD ACLS Tadpole - original max/min values +-0.6, with same (all) visible
					<Element>
						<Position X="-124" Y="1"/>
						<Clip Top="10" Left="10" Right="322" Bottom="410"/>
						<Visible>(A:HSI GSI needle valid, bool) (L:ILS Switch, bool) &amp;&amp; (L:ACLS Switch, bool) ! &amp;&amp; (A:HSI has localizer, bool) &amp;&amp;</Visible>
							<Image Name="tadpole.bmp" Bright="Yes" ImageSizes="85,2">
							</Image>
							<Shift>
               							<Value Minimum="-1.0" Maximum="1.0">(A:HSI GSI needle, number) 120 /</Value>
								<Nonlinearity>
									<Item Value="-2.0" X="-124" Y="-132"/>
									<Item Value="0" X="-124" Y="1"/>
									<Item Value="2.0" X="-124" Y="142"/>
								</Nonlinearity>
							</Shift>
							<Shift>
               							<Value Minimum="-.4" Maximum=".4">(A:HSI CDI needle, number) 127 /</Value>
								<Nonlinearity>
									<Item Value="-.7" X="-124" y="-132"/>
									<Item Value="0" X="16" y="-132"/>
									<Item Value=".7" X="153" y="-132"/>
								</Nonlinearity>
							</Shift>	
					</Element>
				    //----HUD Speed Trend vector/energy carat
				      <Element>
					   <Visible>(A:GEAR HANDLE POSITION,percent) 0 &gt;</Visible>
						<Element>
							<Select>
								<Value>(P:Local Time, seconds) 0.1 % 40 * int 2 == if{ (A:Airspeed indicated, knot) (>G:Var1) }
								</Value>
							</Select>
						</Element>
						<Element>
							<Select>
								<Value>(P:Local Time, seconds) 0.1 % 40 * int 0 &lt;= if{ (A:Airspeed indicated, knot) s1 (G:Var1) - 0.1 / 10 * l1 + (>G:Var3) }
								</Value>
							</Select>
						</Element>
						<Element>
							<Position X="53" Y="0"/>
							<Clip Top="10" Left="10" Right="322" Bottom="410"/>
							<Image Name="PwrCrt.bmp" Bright="Yes" ImageSizes="26,37">	
							</Image>
						   <!--comment <Delay PixelsPerSecond="35"/>    -->
							<Shift>
								<Delay PixelsPerSecond="22"/> 
								<Value Minimum="-78" Maximum="78">(G:Var3) (A:Airspeed indicated, knot) - </Value>
								   <Nonlinearity>
									<Item Value="-78" X="53" Y="90"/>
									<Item Value="0" X="53" Y="0"/>
									<Item Value="78" X="53" Y="-90"/>
							   	</Nonlinearity>
							</Shift>
						</Element>
				     </Element>
				
				
			</Element>
		</Element>

//----HUD Heading tape and pointer********************************
	<Element>
	<Visible>(L:Declutter Switch, enum) 3 &lt; (L:Preset Switch, enum) 0 == &amp;&amp;</Visible> 
		<Element>
			<Position X="103" Y="18"/>		
			<Clip Left="50" Right="283"/>
			<Image Name="HDGTPG1T.bmp" Bright="Yes" ImageSizes="1856,22">
		    	</Image>
			<Shift>
				<Value>(A:Plane heading degrees gyro, degrees) dnor</Value>
				   <Nonlinearity>
            				<Item Value="120" X="103" Y="18"/>
					<Item Value="210" X="-713" Y="18"/>
					<Item Value="300" X="-1529" Y="18"/>
					<Item Value="030" X="-2345" Y="18"/>
        			   </Nonlinearity>
			</Shift>	
		</Element>
		<Element>
			<Visible>(A:Plane heading degrees gyro, degrees) dnor 150 &lt; (A:Plane heading degrees gyro, degrees) dnor 180 &gt; ||</Visible>
			<Clip Left="50" Right="283"/>
			<Image Name="HDGTPG2T.bmp" Bright="Yes" ImageSizes="1856,22">
		    	</Image>
			<Shift>
				<Value>(A:Plane heading degrees gyro, degrees)</Value>
				(*---  fix this - compass scrolls backward near bitmap's 180 point; values for 0,360 only, and other combos no workie.... ---*)
				   <Nonlinearity> (*---816pix = 90 deg, 272/30, 544/60---*)
					<Item Value="030" X="-713" Y="18"/>
					<Item Value="120" X="-1529" Y="18"/>
					<Item Value="150" X="-1801" Y="18"/>
					<Item Value="180" X="1191" Y="18"/>
					<Item Value="210" X="919" Y="18"/>
					<Item Value="300" X="103" Y="18"/>
        			   </Nonlinearity>
			</Shift>	
		</Element>
		<Element>	
    	    		<Position X="154" Y="57"/>		  
			<Image Name="HDGPtr.bmp" Bright="Yes" ImageSizes="29,17">
			</Image>
		</Element>
	</Element>
//----HUD Flaps, Hook and Spoiler Display
<Element>
   <Visible>(L:Declutter Switch, enum) 0 ==</Visible>
     <Element>
	<Visible>(A:FLAPS HANDLE PERCENT,percent) 0 &gt;</Visible>
	<Element>
		<Position X="218" Y="410"/>
		<Text X="100" Y="8" Bright="Yes" Length="8" Font="arial" Color="#003300" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                	<String>FLP%((A:TRAILING EDGE FLAPS0 LEFT ANGLE, degrees))%!3d!%</String>
             	</Text>
	</Element>
     </Element>
     <Element>
	<Visible>(A:TAILHOOK POSITION,percent) 0 &gt;</Visible>
	<Element>
		<Position X="250" Y="410"/>
		<Text X="20" Y="8" Bright="Yes" Length="6" Font="arial" Color="#003300" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                	<String>  HK  </String>
             	</Text>
	</Element>
     </Element>
      <Element>
	<Visible>(A:SPOILERS HANDLE POSITION,percent) 0 &gt;</Visible>
	<Element>
		<Position X="272" Y="410"/>
		<Text X="40" Y="8" Bright="Yes" Length="6" Font="arial" Color="#003300" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                	<String>SP%((A:SPOILERS HANDLE POSITION,percent))%!3d!%</String>
             	</Text>
	</Element>
     </Element>
</Element>
//----HUD clock
  	<Element>
  	        <Visible>(L:Declutter Switch, enum) 2 &lt;</Visible>
     		<Element>
			<Position X="15" Y="321"/>
	  		<Text X="90" Y="15" Bright="Yes" Length="15" Font="arial" Color="#003300" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
               			<String>%((P:Local time,hours) flr 23 + 24 % 1 +)%!2d!:%((P:Local time,minutes) flr 60 %)%!02d!:%((P:Local time,seconds) flr 60 %)%!02d!</String>
          			</Text>
     		</Element>
  	</Element>
//----HUD Compass Bugs - VOR1, CRS/OBS, VOR2
<Element>
	<Element>
		<Visible>(A:NAV1 HAS NAV, bool) (A:NAV1 HAS LOCALIZER, bool) ! &amp;&amp; (A:GPS drives nav1,bool) ! &amp;&amp;</Visible>
		<Position X="161" Y="57"/>
			<Clip Left="50" Right="283"/>	
			<Image Name="VOR1bug.bmp" Bright="Yes" ImageSizes="14,21">
		    	</Image>
			<Shift>
    	    			<Value>(A:NAV1 Radial, degrees) dnor 180 + 360 % (A:Plane heading degrees gyro, degrees) - abs 25 &lt; if{ (A:NAV1 Radial, degrees) dnor 180 + 360 % (A:Plane heading degrees gyro, degrees) - } els{ (A:NAV1 Radial, degrees) dnor 180 + 360 % (A:Plane heading degrees gyro, degrees) &lt; if{ (A:NAV1 Radial, degrees) dnor 180 + 360 % 360 + (A:Plane heading degrees gyro, degrees) - } els{ (A:NAV1 Radial, degrees) dnor 180 + 360 % (A:Plane heading degrees gyro, degrees) 360 + - } }</Value>
				
				<Nonlinearity>
					<Item Value="-180" X="-1471" Y="57"/>
            				<Item Value="0" X="161" Y="57"/>
					<Item Value="180" X="1793" Y="57"/>
        			</Nonlinearity>
			</Shift>
	</Element>
	<Element>
		<Visible>(A:GPS drives nav1,bool)</Visible>
		<Position X="161" Y="57"/>
			<Clip Left="50" Right="283"/>	
			<Image Name="VOR1bug.bmp" Bright="Yes" ImageSizes="14,21">
		    </Image>
			<Shift>
    	    			<Value>(A:GPS WP TRUE BEARING, degrees) d360 345 &gt; (A:GPS GROUND TRUE HEADING, degrees) 15 &lt; &amp;&amp; if{ (A:GPS WP TRUE BEARING, degrees) d360 (A:GPS GROUND TRUE HEADING, degrees) 360 + - } els{ (A:GPS WP TRUE BEARING, degrees) 15 &lt; (A:GPS GROUND TRUE HEADING, degrees) 345 &gt; &amp;&amp; if{ (A:GPS WP TRUE BEARING, degrees) d360 360 + (A:GPS GROUND TRUE HEADING, degrees) - } els{ (A:GPS WP TRUE BEARING, degrees) d360 (A:GPS GROUND TRUE HEADING, degrees) - } }</Value>
				<Nonlinearity>
					<Item Value="-180" X="-1471" Y="57"/>
            				<Item Value="0" X="161" Y="57"/>
					<Item Value="180" X="1793" Y="57"/>
        			</Nonlinearity>
			</Shift>
	</Element>
	<Element>
		<Visible>(A:NAV2 HAS NAV, bool) (A:NAV2 HAS LOCALIZER, bool) ! &amp;&amp;</Visible>
		<Position X="161" Y="57"/>
			<Clip Left="50" Right="283"/>
			<Image Name="VOR2bug.bmp" Bright="Yes" ImageSizes="14,21">
		    </Image>
			<Shift>
    	    			<Value>(A:NAV2 Radial, degrees) dnor 180 + 360 % (A:Plane heading degrees gyro, degrees) - abs 25 &lt; if{ (A:NAV2 Radial, degrees) dnor 180 + 360 % (A:Plane heading degrees gyro, degrees) - } els{ (A:NAV2 Radial, degrees) dnor 180 + 360 % (A:Plane heading degrees gyro, degrees) &lt; if{ (A:NAV2 Radial, degrees) dnor 180 + 360 % 360 + (A:Plane heading degrees gyro, degrees) - } els{ (A:NAV2 Radial, degrees) dnor 180 + 360 % (A:Plane heading degrees gyro, degrees) 360 + - } }</Value>
				<Nonlinearity>
					<Item Value="-180" X="-1471" Y="57"/>
            				<Item Value="0" X="161" Y="57"/>
					<Item Value="180" X="1793" Y="57"/>
        			</Nonlinearity>
			</Shift>
	</Element>
	<Element>
		<Visible>(A:GPS drives nav1, bool) !</Visible>
		<Position X="161" Y="46"/>
			<Clip Left="50" Right="283"/>
			<Image Name="CRSbug.bmp" Bright="Yes" ImageSizes="14,21">
		    </Image>
			<Shift>
    	    			<Value>(A:NAV1 OBS,degrees) 345 &gt; (A:Plane heading degrees gyro, degrees) 15 &lt; &amp;&amp; if{ (A:NAV1 OBS,degrees) (A:Plane heading degrees gyro, degrees) 360 + - } els{ (A:NAV1 OBS,degrees) 15 &lt; (A:Plane heading degrees gyro, degrees) 345 &gt; &amp;&amp; if{ (A:NAV1 OBS,degrees) 360 + (A:Plane heading degrees gyro, degrees) - } els{ (A:NAV1 OBS,degrees) (A:Plane heading degrees gyro, degrees) - } }</Value>
				<Nonlinearity>
					<Item Value="-180" X="-1471" Y="46"/>
            				<Item Value="0" X="161" Y="46"/>
					<Item Value="180" X="1793" Y="46"/>
        			</Nonlinearity>
			</Shift>
	</Element>
	<Element>
		<Visible>(A:GPS drives nav1,bool)</Visible>
		<Position X="161" Y="46"/>
			<Clip Left="50" Right="283"/>
			<Image Name="CRSbug.bmp" Bright="Yes" ImageSizes="14,21">
		    </Image>
			<Shift>     
    	    			<Value>(A:GPS WP DESIRED TRACK, degrees) 345 &gt; (A:Plane heading degrees gyro, degrees) 15 &lt; &amp;&amp; if{ (A:GPS WP DESIRED TRACK, degrees) (A:Plane heading degrees gyro, degrees) 360 + - } els{ (A:GPS WP DESIRED TRACK, degrees) 15 &lt; (A:Plane heading degrees gyro, degrees) 345 &gt; &amp;&amp; if{ (A:GPS WP DESIRED TRACK, degrees) 360 + (A:Plane heading degrees gyro, degrees) - } els{ (A:GPS WP DESIRED TRACK, degrees) (A:Plane heading degrees gyro, degrees) - } }</Value>
				<Nonlinearity>
					<Item Value="-180" X="-1471" Y="46"/>
            				<Item Value="0" X="161" Y="46"/>
					<Item Value="180" X="1793" Y="46"/>
        			</Nonlinearity>
			</Shift>
	</Element>
	
</Element>			
//----HUD Bank arrow and scale
     <Element>
        <Visible>(L:Declutter Switch, enum) 3 &lt; (L:Preset Switch, enum) 0 == &amp;&amp;</Visible>	
	<Element>
	        <Visible>(A:PLANE BANK DEGREES,degrees) dnor 55 &lt; (A:PLANE BANK DEGREES,degrees) dnor 305 &gt; ||</Visible>	
    	    	<Position X="165" Y="157"/>		  
		<Image Name="BNKARRW.bmp" Bright="Yes" ImageSizes="34,224">
			  <Axis X="15.5" Y="14"/>
		</Image>
		<Rotate>
    	    		<Value>(A:PLANE BANK DEGREES,radians)</Value>
		</Rotate>
	</Element>
	<Element>
    	    	<Position X="0" Y="300"/>		  
		<Image Name="BNKSCL.bmp" Bright="Yes" ImageSizes="333,100">
		</Image>
	</Element>
     </Element>
//----HUD Indicated Airspeed
<Element>
<Visible>(L:Preset Switch, enum) 0 ==</Visible>
        <Element>
           		<Position X="28" Y="116"/>
             		<Text X="46" Y="19" Bright="Yes" Length="4" Font="arial" Color="#003300" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 		<String>%((A:Airspeed indicated, knots) 48 &gt;=)%{if}%((A:Airspeed indicated, knots))%!3d!%{else}48%</String>
            		</Text>
        </Element>
	 <Element>
           		<Position X="27" Y="116"/>
            	 <Image Name="HAspBox.bmp" Bright="Yes" ImageSizes="48,19">
	 </Image>
     	</Element>
</Element>
//----HUD VSI       	<Comment>		<Visible>(L:Declutter Switch, enum) 3 &lt;</Visible>		</Comment>
<Element>
        <Element>
	
           <Position X="265" Y="95"/>
             <Text X="48" Y="17" Bright="Yes" Length="6" Font="arial" Color="#003300" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%((A:Vertical speed,feet per minute) 10 % (A:Vertical speed,feet per minute) - /-/)%!5d!</String>
             </Text>
        </Element>
</Element>				
//----HUD Altitude (radalt set at 1000ft)
<Element>
<Visible>(L:Preset Switch, enum) 0 ==</Visible>
	<Element>
           		<Position X="252" Y="116"/>
             		<Image Name="HAltBox.bmp" Bright="Yes" ImageSizes="61,19">
		 </Image>
     	</Element>
        <Element>
	  <Visible>(A:Radio height, feet) 1000 &gt;=</Visible>
	<Element>
          		 <Position X="248" Y="116"/>
          		  <Text X="30" Y="19" Bright="Yes" Luminous="Yes" Length="2" Font="arial" Color="#003300" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No">
               		  <String>%((A:Indicated Altitude, feet) 1000 / int)%!2d!</String>
            		 </Text>
	</Element>
	<Element>
		  <Position X="281" Y="118"/>
             		<Text X="30" Y="16" Bright="Yes" Luminous="Yes" Length="3" Font="arial" Color="#003300" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
               		  <String>%((A:Indicated Altitude, feet) 10 % (A:Indicated Altitude, feet) - /-/ 1000 %)%!03d!</String>
             		</Text>
	</Element>
        </Element>
        <Element>
	  <Visible>(A:Radio height, feet) 1000 &lt;</Visible>
           <Position X="265" Y="116"/>
             <Text X="64" Y="19" Bright="Yes" Length="9" Font="arial" Color="#003300" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%((A:Radio height, feet) 10 / 10 *)%!5d!%  R%</String>
             </Text>
        </Element>
        <Element>
	  <Visible>(L:Declutter Switch, enum) 1 &lt; (A:Radio height, feet) 1000 &lt; &amp;&amp;</Visible>
	<Element>
           		<Position X="248" Y="156"/>
             		<Text X="30" Y="18" Bright="Yes" Length="2" Font="arial" Color="#003300" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 		<String>%((A:Indicated Altitude, feet) 1000 / int 1 &gt;=)%{if}%((A:Indicated Altitude, feet) 1000 / int)%!2d!%{else} %</String>
             		</Text>
	</Element>
	<Element>
		<Position X="281" Y="156"/>
             		<Text X="60" Y="15" Bright="Yes" Length="9" Font="arial" Color="#003300" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 		<String>%((A:Indicated Altitude, feet) 10 % (A:Indicated Altitude, feet) - /-/ 1000 %)%!03d!%   B</String>
             		</Text>
	</Element>
        </Element>	
     </Element>

								
//----HUD NAV block displays/GPS
 <Element>
   <Visible>(L:Declutter Switch, enum) 2 &lt;</Visible>
   <Element>
     <Visible>(A:NAV1 HAS NAV, bool) (A:NAV1 HAS DME, bool) || (A:GPS drives nav1,bool) ! &amp;&amp;</Visible>
        <Element>
           <Position X="238" Y="269"/>
             <Text X="65" Y="12" Bright="Yes" Length="14" Font="arial" Color="#003300" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%((A:NAV1 DME, nmiles) s1 0 &gt;=)%{if}%(l1 100 &gt;=)%{if}%(l1)%!d!%{else}%(l1)%!0.1f!%{end}% %{else}--- %{end}%((A:Nav1 ident, string))%!s!% %{end}%</String>
             </Text>
        </Element>
   </Element>
   <Element>
     <Visible>(A:GPS drives nav1,bool)</Visible>
        <Element>
           <Position X="200" Y="269"/>
             <Text X="128" Y="12" Bright="Yes" Length="18" Font="arial" Color="#003300" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%((A:GPS WP DISTANCE, nmiles))%!4.1f!% W:%((A:GPS WP NEXT ID, string))%!s!% %((A:GPS WP BEARING, degrees) d360)%!03d!%</String>
             (*--%((A:GPS WP NEXT ID, string))%!s! or ((A:GPS FLIGHT PLAN WP INDEX, number))%!02d! ((>@c:FlightPlanWaypointIndex))%!03d!%???--*)
		</Text>
        </Element>
   </Element>
   <Element>
	<Visible>(A:NAV1 HAS NAV, bool) ! (A:NAV1 HAS DME, bool) ! &amp;&amp; (A:GPS drives nav1, bool) ! &amp;&amp; (A:NAV1 HAS LOCALIZER, bool) ! &amp;&amp;</Visible>
           <Position X="257" Y="269"/>
             <Text X="122" Y="12" Bright="Yes" Length="17" Font="arial" Color="#003300" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%---  XXXX  ---%</String>
             </Text>
    </Element>
   <Element>
	<Visible>(A:NAV1 HAS NAV, bool) (A:NAV1 HAS LOCALIZER, bool) ! &amp;&amp; (A:GPS drives nav1,bool) ! &amp;&amp;</Visible>
           <Position X="304" Y="269"/>
             <Text X="30" Y="12" Bright="Yes" Length="6" Font="arial" Color="#003300" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%((A:NAV1 Radial, degrees) dnor 180 + 360 % )%!03.0f!</String>
             </Text>
    </Element>
<Comment>******
    <Element>
       <Visible>(L:Declutter Switch, enum) 0 == (A:NAV1 HAS LOCALIZER, bool) ! &amp;&amp; (A:GPS drives nav1, bool) ! &amp;&amp; (A:GPS drives nav1,bool) ! &amp;&amp;</Visible>
        <Element>
           <Position X="267" Y="282"/>
             	<Text X="90" Y="12" Bright="Yes" Length="8" Font="arial" Color="#003300" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                	<String>%CRS%  %((A:NAV1 OBS,degrees))%!03d!</String>
             	</Text>
        </Element>
   </Element>
    <Element>
       <Visible>(L:Declutter Switch, enum) 0 == (A:NAV1 HAS LOCALIZER, bool) &amp;&amp; (A:GPS drives nav1, bool) ! &amp;&amp; (A:GPS drives nav1,bool) ! &amp;&amp;</Visible>
        <Element>
           <Position X="267" Y="282"/>
             	<Text X="90" Y="12" Bright="Yes" Length="14" Font="arial" Color="#003300" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                	<String>%ILS%  %((A:NAV1 OBS,degrees))%!03d!</String>
             	</Text>
        </Element>
   </Element>
******</Comment>
  
<Element>
<Visible>(L:Declutter Switch, enum) 0 ==</Visible>
   <Element>
     <Visible>(A:NAV2 HAS NAV, bool) (A:NAV2 HAS DME, bool) ||</Visible>
        <Element>
           <Position X="238" Y="355"/>
             <Text X="65" Y="12" Bright="Yes" Length="14" Font="arial" Color="#003300" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%((A:NAV2 DME, nmiles) s1 0 &gt;=)%{if}%(l1 100 &gt;=)%{if}%(l1)%!d!%{else}%(l1)%!0.1f!%{end}% %{else}--- %{end}%((A:Nav2 ident, string))%!s!% %{end}%</String>
             </Text>
        </Element>
   </Element>
   <Element>
	<Visible>(A:NAV2 HAS NAV, bool) ! (A:NAV2 HAS DME, bool) ! &amp;&amp; (A:NAV1 HAS LOCALIZER, bool) ! &amp;&amp;</Visible>
           <Position X="257" Y="355"/>
             <Text X="122" Y="12" Bright="Yes" Length="17" Font="arial" Color="#003300" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%---  XXXX  ---%</String>
             </Text>
    </Element>
   <Element>
	<Visible>(A:NAV2 HAS NAV, bool) (A:NAV2 HAS LOCALIZER, bool) ! &amp;&amp;</Visible>
           <Position X="304" Y="355"/>
             <Text X="30" Y="12" Bright="Yes" Length="6" Font="arial" Color="#003300" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%((A:NAV2 Radial, degrees) dnor 180 + 360 % )%!03.0f!</String>
             </Text>
    </Element>
<Comment>******
    <Element>
       <Visible>(L:Declutter Switch, enum) 0 == (A:NAV2 HAS LOCALIZER, bool) ! &amp;&amp;</Visible>
        <Element>
           <Position X="267" Y="368"/>
             	<Text X="90" Y="12" Bright="Yes" Length="8" Font="arial" Color="#003300" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                	<String>%CRS%  %((A:NAV2 OBS,degrees))%!03d!</String>
             	</Text>
        </Element>
   </Element>
******</Comment>
  </Element>
</Element>
//----HUD STALL Warning Display
        <Element>
           <Position X="110" Y="120"/>
			 <Visible>(A:STALL Warning, bool)</Visible>		   
             <Text X="125" Y="30" Bright="Yes" Length="5" Font="arialnarrow" Color="#003300" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>STALL</String>
             </Text>
        </Element>				
//----Waterline AoA bracket
	//--- alternate ILS/AoA bracket centered on pixel 167,116 from main background
		<Element>
			<Position X="133" Y="92"/>
			<Clip Top="10" Left="10" Right="322" Bottom="410"/>	
			<Image Name="AOABRKT.bmp" Bright="Yes" ImageSizes="12,47">
		    	</Image>
			<Visible>(A:GEAR HANDLE POSITION,percent) 0 &gt; (L:Vector Switch, bool) &amp;&amp; (L:AoABracket Switch, bool) ! &amp;&amp;</Visible>									
			<Shift>
				<Value Minimum="2.1" Maximum="14.1">(A:INCIDENCE ALPHA,Degrees)</Value>
					<Nonlinearity>    (*--from origin, +-10 deg, 238 pix--*)
						<Item Value="-1.9" X="133" Y="-146"/>
						<Item Value="18.1" X="133" Y="330"/>
					</Nonlinearity>
			</Shift>			
		</Element>
//----Waterline ILS
		<Element>
						<Visible>(A:HSI has localizer, bool) (L:ILS Switch, bool) ! &amp;&amp; (L:Vector Switch, bool) &amp;&amp;</Visible>
						<Position X="167" Y="72"/>
						<Clip Top="10" Left="10" Right="322" Bottom="410"/>
						<Image Name="LCLNDL.bmp" Bright="Yes" ImageSizes="2,85">
							</Image>
							<Shift>
               							<Value Minimum="-1" Maximum="1">(A:HSI CDI needle, number) 127 /</Value>
								<Nonlinearity>
									<Item Value="1" X="215" Y="72"/>
									<Item Value="0" X="167" Y="72"/>
									<Item Value="-1" X="119" Y="72"/>
								</Nonlinearity>
							</Shift>					
		</Element>
		<Element>
						<Visible>(A:HSI GSI needle valid, bool) (L:ILS Switch, bool) ! &amp;&amp; (L:Vector Switch, bool) &amp;&amp;</Visible>
						<Position X="124" Y="72"/>
						<Clip Top="10" Left="10" Right="322" Bottom="410"/>
							<Image Name="GSNDL.bmp" Bright="Yes" ImageSizes="85,2">
							</Image>
							<Shift>
               							<Value Minimum="-1" Maximum="1">(A:HSI GSI needle, number) 120 /</Value>
								<Nonlinearity>
									<Item Value="-1" X="124" Y="72"/>
									<Item Value="0" X="124" Y="120"/>
									<Item Value="1" X="124" Y="168"/>
								</Nonlinearity>
							</Shift>
		</Element>
//---HUD AoA text
	<Element>
		<Visible>(L:Declutter Switch, enum) 2 &lt;</Visible>
		<Element>
               		<Position X="45" Y="196"/>
               		<Text Bright="Yes" X="36" Y="17" Length="4" Font="arial" Color="#003300" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                  		<String>%((A:INCIDENCE ALPHA,degrees) -10 max 22min)%!3.1f!</String>
               		</Text>
		</Element>
		<Element>
    	  		<Position X="15" Y="190"/>
			<Image Name="alpha.bmp" Bright="Yes" ImageSizes="28,28">
		    	</Image>	
		</Element>
	</Element>
//---HUD MACH number
		<Element>
			<Visible>(A:GEAR HANDLE POSITION,percent) 0 == (L:Declutter Switch, enum) 2 &lt; &amp;&amp;</Visible>
               		<Position X="28" Y="222"/>
               		<Text Bright="Yes" X="59" Y="17" Length="8" Font="arial" Color="#003300" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                  		<String>%M  %((A:Airspeed mach, machs) 0 max 9.99 min)%!3.2f!</String>
               		</Text>
		</Element>
//---HUD G meter
		<Element>
			<Visible>(A:GEAR HANDLE POSITION,percent) 0 == (L:Declutter Switch, enum) 2 &lt; &amp;&amp;</Visible>
               		<Position X="30" Y="248"/>
               		<Text Bright="Yes" X="59" Y="17" Length="8" Font="arial" Color="#003300" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                  		<String>%G  %((A:G Force,G Force) -9.9 max 9.9 min)%!3.1f!</String>
               		</Text>
		</Element>
//---HUD Digital Heading
	<Element>
	    <Visible>(L:Declutter Switch, enum) 3 == (L:Preset Switch, enum) 1 == ||</Visible> 
		<Element>
               		<Position X="146" Y="28"/>
               		<Text Bright="Yes" X="44" Y="19" Length="3" Font="arial" Color="#003300" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                  		<String>%((A:Plane heading degrees gyro, degrees))%!03d!</String>
               		</Text>
		</Element>
		<Element>
    	  		<Position X="144" Y="27"/>
			<Image Name="HDGBox.bmp" Bright="Yes" ImageSizes="54,22">
		    	</Image>	
		</Element>
	</Element>
//---HUD NWS text, groundspeed when on ground
	<Element>
	   <Visible>(A:Sim On Ground, bool) (A:GEAR HANDLE POSITION,percent) 0 &gt; &amp;&amp; (A:GROUND VELOCITY, knots) 100 &lt; &amp;&amp; (L:Declutter Switch, enum) 1 &lt; &amp;&amp;</Visible>
		<Element>
               			<Position X="267" Y="242"/>
               			<Text Bright="Yes" X="36" Y="12" Length="3" Font="arial" Color="#003300" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                  			<String>NWS</String>
               			</Text>
		</Element>
		<Element>
               			 <Position X="28" Y="137"/>
             			<Text X="46" Y="17" Bright="Yes" Length="5" Font="arial" Color="#003300" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                			 <String>%((A:GROUND VELOCITY, knots))%!3d!%</String>
             			</Text>
		</Element>
        	
</Element>
//---HUD BINGO text **************************************
	<Element>
	   <Visible>(A:FUEL TOTAL QUANTITY WEIGHT, pounds) (L:BINGOFuelPounds, enum) &lt; (L:BINGOReset; bool) ! &amp;&amp; (P:Local time,seconds) 1.5 % int 1 == &amp;&amp;</Visible>
		<Element>
			<Position X="110" Y="67"/>
               		<Text X="125" Y="30" Bright="Yes" Length="5" Font="arialnarrow" Color="#003300" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
				<String>BINGO</String>
			</Text>
		</Element>
		<Element>
			<Position X="110" Y="100"/>
               		<Text X="125" Y="16" Bright="Yes" Length="9" Font="arial" Color="#003300" Adjust="Center" VerticalAdjust="Top" Multiline="No" Fixed="No">
				<String>%((A:FUEL TOTAL QUANTITY WEIGHT, pounds))%!4d!% lbs%</String>
			</Text>
		</Element>
		
	</Element>
//------******************************************************************************************************************
//------******************************************************************************************************************
//------******************************************************************************************************************
//------******************************************************************************************************************
//------******************************************************************************************************************			
</Element>
<Element>
    <Visible>(A:ELECTRICAL MASTER BATTERY, bool) (L:HUD Bright Switch, bool) ! &amp;&amp; (L:HUD Power, bool) ! &amp;&amp;</Visible>
	<Image Name="HUDX_G2.bmp" Bright="Yes" ImageSizes="475,600"/>

//--- insert L Vars, (L:TrackDiff,radians), (L:ClimbAngle,radians), (L:TrackDiffVVect,radians)
//--- 
	<Element>
		<Select>
			<Value>(L:Cage switch,bool) if{ 0 (>L:TrackDiff, radians) } els{ (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor (A:PLANE HEADING DEGREES TRUE, radians) rnor - abs 0.5 &lt; if{ (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor (A:PLANE HEADING DEGREES TRUE, radians) rnor - (>L:TrackDiff, radians) } els{ (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor (A:PLANE HEADING DEGREES TRUE, radians) rnor &lt; if{ (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor 3.14159 + (A:PLANE HEADING DEGREES TRUE, radians) rnor - (>L:TrackDiff, radians) ) } els{ (A:PLANE HEADING DEGREES TRUE, radians) rnor 3.14159 + (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor - /-/ (>L:TrackDiff, radians) ) } } }</Value>
		</Select>
	</Element>
	<Element>
		<Select>
			<Value>(A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor (A:PLANE HEADING DEGREES TRUE, radians) rnor - abs 0.5 &lt; if{ (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor (A:PLANE HEADING DEGREES TRUE, radians) rnor - (>L:TrackDiffVVect, radians) } els{ (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor (A:PLANE HEADING DEGREES TRUE, radians) rnor &lt; if{ (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor 3.14159 + (A:PLANE HEADING DEGREES TRUE, radians) rnor - (>L:TrackDiffVVect, radians) ) } els{ (A:PLANE HEADING DEGREES TRUE, radians) rnor 3.14159 + (A:VELOCITY WORLD X, m/s) (A:VELOCITY WORLD Z, m/s) atg2 rnor - /-/ (>L:TrackDiffVVect, radians) ) } }</Value>
		</Select>
	</Element>
	<Element>
		<Select>
			<Value>(A:VELOCITY WORLD Y, m/s) (A:GROUND VELOCITY, m/s) atg2 /-/ (>L:ClimbAngle, radians)</Value>
		</Select>
	</Element>
	
//----HUD waterline************************************************************
		<Element>
		   <Visible>(A:GEAR HANDLE POSITION,percent) 0 &gt;</Visible>
    	  		<Position X="140" Y="110"/>
			<Image Name="wtrln2.bmp" Bright="Yes" ImageSizes="54,22">
		    	</Image>
				
		</Element>
//---HUD Steering at waterline****************************************************
(*--CDI value "1" = 2.5 deg if LOC, 10 degrees if VOR--*)
	<Element>
	     
	        <Element>
		<Visible>(L:Vector Switch, bool) (L:Steering Switch, enum) 0 &gt; &amp;&amp; (L:Steering Switch, enum) 2 == if{ (A:NAV2 HAS LOCALIZER, bool) ! } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 HAS LOCALIZER, bool) ! } } &amp;&amp;</Visible>
		    <Element>
		        <Visible>(L:Steering Switch, enum) 2 == if{ (A:NAV2 CDI, number) 127 / -0.005 &lt; } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 CDI, number) 127 / -0.005 &lt; } }</Visible>
			<Position X="167" Y="117"/> 
			<Image Name="VNvBkWL2.bmp" Bright="Yes" ImageSizes="123,46">
				<Axis X="62" Y="23"/>
		    	</Image>
			<Rotate>
                  			<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 OBS, radians) (A:Plane heading degrees gyro, radians) - } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 OBS, radians) (A:Plane heading degrees gyro, radians) -  } }</Value>
              		</Rotate>
		    </Element>
		    <Element>
		         <Visible>(L:Steering Switch, enum) 2 == if{ (A:NAV2 CDI, number) 127 / 0.005 &gt; } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 CDI, number) 127 / 0.005 &gt; } }</Visible>
			<Position X="167" Y="117"/> 
			<Image Name="VNvBkWR2.bmp" Bright="Yes" ImageSizes="123,46">
				<Axis X="62" Y="23"/>
		    	</Image>
			<Rotate>
                  			<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 OBS, radians) (A:Plane heading degrees gyro, radians) - } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 OBS, radians) (A:Plane heading degrees gyro, radians) -  } }</Value>
              		</Rotate>
		    </Element>
		    <Element>  (*--at 52, -4 with needle centered--*)
			<Position X="167" Y="117"/> 
			<Image Name="VNvArw2.bmp" Bright="Yes" ImageSizes="19,52">
				<Axis X="10" Y="26"/>
		    	</Image>
			<Shift>   (*--104,158,212/91; r1/3 1dot, down 2/3 arrow--*)
				<Value Minimum="-1" Maximum="1">(L:Steering Switch, enum) 2 == if{ (A:NAV2 CDI, number) 127 / } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 CDI, number) 127 /  } }</Value>
				<Nonlinearity>
					<Item Value="-.8" X="113" Y="118"/>
					<Item Value="0" X="167" Y="118"/>
					<Item Value=".8" X="221" Y="118"/>
				</Nonlinearity>
			</Shift>
			<Rotate>
                  			<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 OBS, radians) (A:Plane heading degrees gyro, radians) - } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 OBS, radians) (A:Plane heading degrees gyro, radians) -  } }</Value>
              		</Rotate>
		    </Element>
		    <Element>
		       <Visible>(L:Steering Switch, enum) 2 == if{ (A:NAV2 HAS NAV, bool) } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 HAS NAV, bool) } }</Visible>
			<Position X="167" Y="117"/>  
			<Clip Top="10" Left="10" Right="322" Bottom="410"/>
			<Image Name="VNvPtR2.bmp" Bright="Yes" ImageSizes="123,46">
				<Axis X="62" Y="23"/>
		    	</Image>
			<Rotate>
				<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 RADIAL,radians) (A:PLANE HEADING DEGREES GYRO,radians) - pi  + } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 RADIAL,radians) (A:PLANE HEADING DEGREES GYRO,radians) - pi  +  } }</Value>
              		</Rotate>
		    </Element>
	            </Element>
	            <Element>  
		     <Visible>(L:Vector Switch, bool) (L:Steering Switch, enum) 0 &gt; &amp;&amp; (L:Steering Switch, enum) 2 == if{ (A:NAV2 HAS LOCALIZER, bool) } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 HAS LOCALIZER, bool) } } &amp;&amp;</Visible>
			<Element>
				<Position X="167" Y="117"/> 
				<Image Name="VNvArw2.bmp" Bright="Yes" ImageSizes="19,52">
					<Axis X="10" Y="26"/>
		    		</Image>
				<Rotate>
                  				<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 OBS, radians) (A:Plane heading degrees gyro, radians) - } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 OBS, radians) (A:Plane heading degrees gyro, radians) -  } }</Value>
              			</Rotate>
		 	</Element>
		</Element>	
	</Element>
//---HUD Steering at velocity vector****************************************************
	<Element>
	     
	        <Element>
		<Visible>(L:Vector Switch, bool) ! (L:Steering Switch, enum) 0 &gt; &amp;&amp; (L:Steering Switch, enum) 2 == if{ (A:NAV2 HAS LOCALIZER, bool) ! } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 HAS LOCALIZER, bool) ! } } &amp;&amp;</Visible>
		    <Element>
		         <Visible>(L:Steering Switch, enum) 2 == if{ (A:NAV2 CDI, number) 127 / -0.005 &lt; } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 CDI, number) 127 / -0.005 &lt; } }</Visible>
			<Position X="165" Y="120"/> 
			<Clip Top="10" Left="10" Right="322" Bottom="410"/>
			<Image Name="VNvBkL2.bmp" Bright="Yes" ImageSizes="123,46">
				<Axis X="62" Y="23"/>
		    	</Image>
			<Rotate>
                  				<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 OBS, radians) (A:Plane heading degrees gyro, radians) - } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 OBS, radians) (A:Plane heading degrees gyro, radians) -  } }</Value>
              		</Rotate>
			<Rotate>
				<Value>(A:PLANE BANK DEGREES,radians) /-/</Value>
			</Rotate>
			<Shift>
        		   	      <Value>(A:VELOCITY WORLD Y, m/s) (A:GROUND VELOCITY, m/s) atg2 /-/ (A:PLANE PITCH DEGREES, radians) - </Value>
		        		<Nonlinearity>
				 		<Item Value="-1.570795" X="167" Y="-1942"/>
						<Item Value="1.570795" X="167" Y="2178"/>
					</Nonlinearity>
		    	</Shift>
			<Shift>
			     <Value>(A:PLANE PITCH DEGREES,radians) abs cos (L:TrackDiffVVect, radians) * </Value>
			       <Nonlinearity>
					 <Item Value="-1.570795" X="-1893" Y="118"/>
					 <Item Value="1.570795" X="2227" Y="118"/>
			       </Nonlinearity>
		    	</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
		    </Element>
		     <Element> 		<comment>p165,120; a62,23 close </comment>
		         <Visible>(L:Steering Switch, enum) 2 == if{ (A:NAV2 CDI, number) 127 / 0.005 &gt; } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 CDI, number) 127 / 0.005 &gt; } }</Visible>
			<Position X="165" Y="120"/> 
			<Clip Top="10" Left="10" Right="322" Bottom="410"/>
			<Image Name="VNvBkR2.bmp" Bright="Yes" ImageSizes="123,46">
				<Axis X="62" Y="23"/>
		    	</Image>
			<Rotate>
					<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 OBS, radians) (A:Plane heading degrees gyro, radians) - } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 OBS, radians) (A:Plane heading degrees gyro, radians) -  } }</Value>
              		</Rotate>
			<Rotate>
				<Value>(A:PLANE BANK DEGREES,radians) /-/</Value>
			</Rotate>
			<Shift>
        		   	      <Value>(A:VELOCITY WORLD Y, m/s) (A:GROUND VELOCITY, m/s) atg2 /-/ (A:PLANE PITCH DEGREES, radians) - </Value>
		        		<Nonlinearity>
				 	<Item Value="-1.570795" X="167" Y="-1942"/>
					<Item Value="1.570795" X="167" Y="2178"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
			     <Value>(A:PLANE PITCH DEGREES,radians) abs cos (L:TrackDiffVVect, radians) * </Value>
			       <Nonlinearity>
				 <Item Value="-1.570795" X="-1893" Y="118"/>
				 <Item Value="1.570795" X="2227" Y="118"/>
			       </Nonlinearity>
		    	</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
		    </Element>

		    <Element>  (*--p165,120;a10,26 with needle centered--*)
			<Position X="165" Y="120"/> 
			<Clip Top="10" Left="10" Right="322" Bottom="410"/>
			<Image Name="VNVARW2.bmp" Bright="Yes" ImageSizes="19,52">
				<Axis X="10" Y="26"/>
		    	</Image>
			<Shift>   (*--104,158,212/91; r1/3 1dot, down 2/3 arrow--*)
               				<Value Minimum="-1" Maximum="1">(L:Steering Switch, enum) 2 == if{ (A:NAV2 CDI, number) 127 / } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 CDI, number) 127 /  } }</Value>
				<Nonlinearity>
					<Item Value="-.8" X="111" Y="120"/>
					<Item Value="0" X="165" Y="120"/>
					<Item Value=".8" X="219" Y="120"/>
				</Nonlinearity>
			</Shift>
			<Rotate>
                  			<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 OBS, radians) (A:Plane heading degrees gyro, radians) - } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 OBS, radians) (A:Plane heading degrees gyro, radians) -  } }</Value>
              		</Rotate>
			<Rotate>
				<Value>(A:PLANE BANK DEGREES,radians) /-/</Value>
			</Rotate>
			<Shift>
        		   	      <Value>(A:VELOCITY WORLD Y, m/s) (A:GROUND VELOCITY, m/s) atg2 /-/ (A:PLANE PITCH DEGREES, radians) - </Value>
		        		<Nonlinearity>
				 	<Item Value="-1.570795" X="167" Y="-1942"/>
					<Item Value="1.570795" X="167" Y="2178"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
			     <Value>(A:PLANE PITCH DEGREES,radians) abs cos (L:TrackDiffVVect, radians) * </Value>
			       <Nonlinearity>
				 <Item Value="-1.570795" X="-1893" Y="118"/>
				 <Item Value="1.570795" X="2227" Y="118"/>
			       </Nonlinearity>
		    	</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
		    </Element>
		     <Element>
		         <Visible>(L:Steering Switch, enum) 2 == if{ (A:NAV2 HAS NAV, bool) } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 HAS NAV, bool) } }</Visible>
			<Position X="165" Y="120"/>  
			<Clip Top="10" Left="10" Right="322" Bottom="410"/>
			<Image Name="VNvPtR2.bmp" Bright="Yes" ImageSizes="123,46">
				<Axis X="62" Y="23"/>
		    	</Image>
			<Rotate>
					<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 RADIAL,radians) (A:PLANE HEADING DEGREES GYRO,radians) - pi  + } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 RADIAL,radians) (A:PLANE HEADING DEGREES GYRO,radians) - pi  +  } }</Value>
                  		</Rotate>
			<Rotate>
				<Value>(A:PLANE BANK DEGREES,radians) /-/</Value>
			</Rotate>
			<Shift>
        		   	      <Value>(A:VELOCITY WORLD Y, m/s) (A:GROUND VELOCITY, m/s) atg2 /-/ (A:PLANE PITCH DEGREES, radians) - </Value>
		        		<Nonlinearity>
				 	<Item Value="-1.570795" X="167" Y="-1942"/>
					<Item Value="1.570795" X="167" Y="2178"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
			     <Value>(A:PLANE PITCH DEGREES,radians) abs cos (L:TrackDiffVVect, radians) * </Value>
			       <Nonlinearity>
				 <Item Value="-1.570795" X="-1893" Y="118"/>
				 <Item Value="1.570795" X="2227" Y="118"/>
			       </Nonlinearity>
		    	</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
		    </Element>
	            </Element>
		<Element>  
		     <Visible>(L:Vector Switch, bool) ! (L:Steering Switch, enum) 0 &gt; &amp;&amp; (L:Steering Switch, enum) 2 == if{ (A:NAV2 HAS LOCALIZER, bool) } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 HAS LOCALIZER, bool) } } &amp;&amp;</Visible>
			<Element>
				<Position X="165" Y="120"/>
				<Clip Top="10" Left="10" Right="322" Bottom="410"/> 
				<Image Name="VNvArw2.bmp" Bright="Yes" ImageSizes="19,52">
					<Axis X="10" Y="26"/>
		    		</Image>
				<Rotate>
                  				<Value>(L:Steering Switch, enum) 2 == if{ (A:NAV2 OBS, radians) (A:Plane heading degrees gyro, radians) - } els{ (L:Steering Switch, enum) 1 == if{ (A:NAV1 OBS, radians) (A:Plane heading degrees gyro, radians) -  } }</Value>
              			</Rotate>
				<Rotate>
					<Value>(A:PLANE BANK DEGREES,radians) /-/</Value>
				</Rotate>
				<Shift>
        		   	   	   <Value>(A:VELOCITY WORLD Y, m/s) (A:GROUND VELOCITY, m/s) atg2 /-/ (A:PLANE PITCH DEGREES, radians) - </Value>
		        			<Nonlinearity>
				 		<Item Value="-1.570795" X="167" Y="-1942"/>
						<Item Value="1.570795" X="167" Y="2178"/>
					</Nonlinearity>
		    		</Shift>
				<Shift>
				     <Value>(A:PLANE PITCH DEGREES,radians) abs cos (L:TrackDiffVVect, radians) * </Value>
				       <Nonlinearity>
					 <Item Value="-1.570795" X="-1893" Y="118"/>
					 <Item Value="1.570795" X="2227" Y="118"/>
				       </Nonlinearity>
		    		</Shift>
				<Rotate>
    	    				<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   		</Rotate>
		 	</Element>
		</Element>	
	</Element>
//----HUD steering text block
  <Element>
   <Visible>(L:Declutter Switch, enum) 1 &lt; (L:Steering Switch, enum) 0 &gt; &amp;&amp;</Visible>
     	<Element>
		<Position X="15" Y="394"/>
	  	<Text X="60" Y="12" Bright="Yes" Length="15" Font="arial" Color="#00ff00" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
			<String>%((L:Steering Switch, enum) 1 ==)%{if}%STR 1%{else}STR 2%</String>
          		</Text>
     	</Element>
	<Element>
	        <Visible>(L:Steering Switch, enum) 2 == if{ (A:NAV2 HAS LOCALIZER, bool) (A:NAV2 HAS NAV, bool) ! || } els{ (L:Steering Switch, enum) 1 == if{  (A:NAV1 HAS LOCALIZER, bool) (A:NAV1 HAS NAV, bool) ! || } }</Visible>
		<Position X="15" Y="392"/>  
		<Image Name="X602.bmp" Bright="Yes" ImageSizes="90,16">
		</Image>
	</Element>
  </Element>

//----HUD Ladder************************************************************
		<Element>
		   <Visible>(L:Ladder Switch, enum) 0 ==</Visible> (*-- 0=full ladder, 1=horizon, 2=all off--*)
    	  		<Position X="0" Y="0"/>
	      		<MaskImage Name="LDRMSK.bmp" Bright="Yes" ImageSizes="333,421">
		  		<Axis X="167" Y="118"/>
		  	</MaskImage>
			<Image Name="LadderL2.bmp" Bright="Yes" ImageSizes="291,511">
				<Axis X="146" Y="996"/>  (*--y is 272 for alternate ladder0.bmp--*)
		    	</Image>
			(*--Horizon should be at y=270 on ladder0--*)
			 <Shift>
        			<Value Maximum="90" Minimum="-90">(A:PLANE PITCH DEGREES,degrees) /-/</Value>
		        	<Nonlinearity>
						<Item Value="-90" Y="-2060"/>
						<Item Value="90" Y="2060"/>
				</Nonlinearity>
		    	</Shift>

			<Shift>
				<Value>(L:ClimbAngle, radians) abs cos (L:TrackDiff, radians) * </Value>
					<Nonlinearity>
						<Item Value="-1.570795" X="-2060"/>
						 <Item Value="1.570795" X="2060"/>
					</Nonlinearity>
			</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>	
		</Element>
		<Element>
		   <Visible>(L:Ladder Switch, enum) 0 == (A:GEAR HANDLE POSITION,percent) 0 == &amp;&amp;</Visible>
    	  		<Position X="0" Y="0"/>
	      		<MaskImage Name="LDRMSK.bmp" Bright="Yes" ImageSizes="333,421">
		  		<Axis X="167" Y="118"/>
		  	</MaskImage>
			<Image Name="HrznNrw2.bmp" Bright="Yes" ImageSizes="281,42">
				<Axis X="146" Y="15"/> (*--axis must match ladder's; currently 1 pixel below 2 pixel high horizon at y=270 on ladder0--*)
		    	</Image>
			 <Shift>
        			<Value Maximum="90" Minimum="-90">(A:PLANE PITCH DEGREES,degrees) /-/</Value>
		        	<Nonlinearity>
						<Item Value="-90" Y="-2060"/>
						<Item Value="90" Y="2060"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
				<Value>(L:ClimbAngle, radians) abs cos (L:TrackDiff, radians) * </Value>
					<Nonlinearity>
						<Item Value="-1.570795" X="-2060"/>
						 <Item Value="1.570795" X="2060"/>
					</Nonlinearity>
			</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
		</Element>
		<Element>
		   <Visible>(L:Ladder Switch, enum) 0 == (A:GEAR HANDLE POSITION,percent) 0 &gt; &amp;&amp; (L:Ladder Switch, enum) 1 == ||</Visible>
    	  		<Position X="0" Y="0"/>
	      		<MaskImage Name="LDRMSK.bmp" Bright="Yes" ImageSizes="333,421">
		  		<Axis X="167" Y="118"/>
		  	</MaskImage>
			<Image Name="HrznWd2.bmp" Bright="Yes" ImageSizes="361,42">
				<Axis X="181" Y="15"/> (*--axis must match ladder's; currently 1 pixel below 2 pixel high horizon at y=270 on ladder0--*)
		    	</Image>
			 <Shift>
        			<Value Maximum="90" Minimum="-90">(A:PLANE PITCH DEGREES,degrees) /-/</Value>
		        	<Nonlinearity>
						<Item Value="-90" Y="-2060"/>
						<Item Value="90" Y="2060"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
				<Value>(L:ClimbAngle, radians) abs cos (L:TrackDiff, radians) * </Value>
					<Nonlinearity>
						<Item Value="-1.570795" X="-2060"/>
						 <Item Value="1.570795" X="2060"/>
					</Nonlinearity>
			</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
			
		</Element>
	//3 and 4 degree glideslope mark
		<Element>
		   <Visible>(L:Slope Switch, enum) 1 ==</Visible>
    	  		<Position X="0" Y="0"/>
	      		<MaskImage Name="LDRMSK.bmp" Bright="Yes" ImageSizes="333,421">
		  		<Axis X="167" Y="118"/>
		  	</MaskImage>
			<Image Name="slope2.bmp" Bright="Yes" ImageSizes="291,123">
				<Axis X="146" Y="5"/> 
		    	</Image>
			 <Shift>
        			<Value Maximum="90" Minimum="-90">(A:PLANE PITCH DEGREES,degrees) /-/</Value>
		        	<Nonlinearity>
						<Item Value="-90" Y="-2060"/>
						<Item Value="90" Y="2060"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
				<Value>(L:ClimbAngle, radians) abs cos (L:TrackDiff, radians) * </Value>
					<Nonlinearity>
						<Item Value="-1.570795" X="-2060"/>
						 <Item Value="1.570795" X="2060"/>
					</Nonlinearity>
			</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
		</Element>
	//--top 50 degrees
		<Element>
		   <Visible>(L:Ladder Switch, enum) 0 ==</Visible>
    	  		<Position X="0" Y="0"/>
	      		<MaskImage Name="LDRMSK.bmp" Bright="Yes" ImageSizes="333,421">
		  		<Axis X="167" Y="118"/>
		  	</MaskImage>
			<Image Name="LadderT2.bmp" Bright="Yes" ImageSizes="291,511">
				<Axis X="146" Y="0"/> (*--264 px down bmp is zenith--*) 
		    	</Image>
			 <Shift>
        			<Value Maximum="90" Minimum="-90">(A:PLANE PITCH DEGREES,degrees) /-/</Value>
		        	<Nonlinearity>
						<Item Value="-90" Y="-4385"/>
						<Item Value="90" Y="-265"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
				<Value>(L:ClimbAngle, radians) abs cos (L:TrackDiff, radians) * </Value>
					<Nonlinearity>
						<Item Value="-1.570795" X="-2060"/>
						 <Item Value="1.570795" X="2060"/>
					</Nonlinearity>
			</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
		</Element>
	//--bottom 50 degrees
		<Element>
		   <Visible>(L:Ladder Switch, enum) 0 ==</Visible>
    	  		<Position X="0" Y="0"/>
	      		<MaskImage Name="LDRMSK.bmp" Bright="Yes" ImageSizes="333,421">
		  		<Axis X="167" Y="118"/>
		  	</MaskImage>
			<Image Name="LadderB2.bmp" Bright="Yes" ImageSizes="291,511">
				<Axis X="146" Y="0"/> (*--264 px down bmp is zenith--*) 
		    	</Image>
			 <Shift>
        			<Value Maximum="90" Minimum="-90">(A:PLANE PITCH DEGREES,degrees) /-/</Value>
		        	<Nonlinearity>
						<Item Value="-90" Y="-1066"/>
						<Item Value="90" Y="3054"/>
				</Nonlinearity>
		    	</Shift>
			<Shift>
				<Value>(L:ClimbAngle, radians) abs cos (L:TrackDiff, radians) * </Value>
					<Nonlinearity>
						<Item Value="-1.570795" X="-2060"/>
						 <Item Value="1.570795" X="2060"/>
					</Nonlinearity>
			</Shift>
			<Rotate>
    	    			<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   	</Rotate>
		</Element>

//----HUD Velocity Vector and components************************ 
		<Element>
			<Visible>(L:Vector Switch, bool) !</Visible>
			<Element>		
				<Position X="140" Y="98"/>
					<Image Name="Vblnk.bmp" Bright="Yes" ImageSizes="52,37">
		    			</Image>
					<Shift>
        		   		 	     <Value>(A:VELOCITY WORLD Y, m/s) (A:GROUND VELOCITY, m/s) atg2 /-/ (A:PLANE PITCH DEGREES, radians) - </Value>
		        				<Nonlinearity>
						  	<Item Value="-1.570795" X="141" Y="-1962"/>
							<Item Value="1.570795" X="141" Y="2158"/>
						</Nonlinearity>
		    			</Shift>
					<Shift>
					   <Value>(L:ClimbAngle, radians) abs cos (L:TrackDiffVVect, radians) * </Value>
						<Nonlinearity>
						   <Item Value="-1.570795" X="-1919" Y="98"/>
						   <Item Value="1.570795" X="2201" Y="98"/>
						</Nonlinearity>
		    			</Shift>
					<Rotate>
    	    					<Value>(A:PLANE BANK DEGREES,radians)</Value>
		   			</Rotate>
			//----ghost vector / sideslip
				        <Element>
						<Position X="0" Y="0"/>
						<Clip Top="10" Left="10" Right="322" Bottom="410"/>
						<Image Name="Vvctr2.bmp" Bright="Yes" ImageSizes="52,37">
		    				</Image>
					    	<Element>
							<Position X="0" Y="0"/>
							<Clip Top="10" Left="10" Right="322" Bottom="410"/>
							<Image Name="VYAW2.bmp" Bright="Yes" ImageSizes="52,37">
							</Image>
							<Visible>(A:INCIDENCE BETA,radians) abs 0.027 &gt;</Visible>
							<Shift>
					   			<Value>(A:PLANE BANK DEGREES, radians) dnor cos (A:INCIDENCE BETA, radians) *</Value>
									<Nonlinearity>
						   				<Item Value="-1.570795" X="-2060" Y="0"/>
						   				<Item Value="1.570795" X="2060" Y="0"/>
									</Nonlinearity>
		    					</Shift>
							<Shift>
					   			<Value>(A:PLANE BANK DEGREES, radians) dnor sin (A:INCIDENCE BETA, radians) *</Value>
									<Nonlinearity>
						   				<Item Value="-1.570795" X="0" Y="-2060"/>
						   				<Item Value="1.570795" X="0" Y="2060"/>
									</Nonlinearity>
		    					</Shift>
					     	</Element>
					</Element>
			//----AoA bracket
					<Element>
						<Position X="-9" Y="-5"/>
						<Clip Top="10" Left="10" Right="322" Bottom="410"/>	
						<Image Name="AOABRK2.bmp" Bright="Yes" ImageSizes="12,47">
		    				</Image>
						<Visible>(A:GEAR HANDLE POSITION,percent) 0 &gt; (L:AoABracket Switch, bool) ! &amp;&amp;</Visible>									
						<Shift>
							<Value Minimum="2.1" Maximum="14.1">(A:INCIDENCE ALPHA,Degrees)</Value>
								<Nonlinearity>
									<Item Value="-1.9" X="-9" Y="-243"/>
									<Item Value="18.1" X="-9" Y="233"/>
								</Nonlinearity>
						</Shift>			
					</Element>
			//----HUD ILS LOC DISPLAY
					<Element>
						<Position X="73" Y="-26"/>
						<Clip Top="10" Left="10" Right="322" Bottom="410"/>
						<Visible>(A:NAV1 has localizer, bool) (L:ILS Switch, bool) ! &amp;&amp;</Visible>
							<Image Name="LCLNDL2.bmp" Bright="Yes" ImageSizes="2,85">
							</Image>(*--was y=-26--*)
							<Shift>
               							<Value Minimum="-1" Maximum="1">(A:NAV1 CDI, number) 127 /</Value>
								<Nonlinearity>
									<Item Value="-1" X="-21" Y="-26"/>
									<Item Value="0" X="26" Y="-26"/>
									<Item Value="1" X="73" Y="-26"/>
								</Nonlinearity>
							</Shift>					
					</Element>
			//----HUD ILS GS DISPLAY
					<Element>
						<Position X="-17" Y="65"/>
						<Clip Top="10" Left="10" Right="322" Bottom="410"/>
						<Visible>(A:HSI GSI needle valid, bool) (L:ILS Switch, bool) ! &amp;&amp;</Visible>
							<Image Name="GSNDL2.bmp" Bright="Yes" ImageSizes="85,2">
							</Image>
							<Shift>
               							<Value Minimum="-1" Maximum="1">(A:NAV1 GSI, number) 120 /</Value>
								<Nonlinearity>
									<Item Value="-1" X="-17" Y="-31"/> (*--was x=-17--*)
									<Item Value="0" X="-17" Y="17"/>
									<Item Value="1" X="-17" Y="65"/>
								</Nonlinearity>
							</Shift>
					</Element>
			//----HUD ACLS Tadpole - original max/min values +-0.6, with same (all) visible
					<Element>
						<Position X="-124" Y="1"/>
						<Clip Top="10" Left="10" Right="322" Bottom="410"/>
						<Visible>(A:HSI GSI needle valid, bool) (L:ILS Switch, bool) &amp;&amp; (L:ACLS Switch, bool) ! &amp;&amp; (A:NAV1 has localizer, bool) &amp;&amp;</Visible>
							<Image Name="tadpole2.bmp" Bright="Yes" ImageSizes="85,2">
							</Image>
							<Shift>
               							<Value Minimum="-1.0" Maximum="1.0">(A:NAV1 GSI, number) 120 /</Value>
								<Nonlinearity>
									<Item Value="-2.0" X="-124" Y="-132"/>
									<Item Value="0" X="-124" Y="1"/>
									<Item Value="2.0" X="-124" Y="142"/>
								</Nonlinearity>
							</Shift>
							<Shift>
               							<Value Minimum="-.4" Maximum=".4">(A:NAV1 CDI, number) 127 /</Value>
								<Nonlinearity>
									<Item Value="-.7" X="-124" y="-132"/>
									<Item Value="0" X="16" y="-132"/>
									<Item Value=".7" X="153" y="-132"/>
								</Nonlinearity>
							</Shift>	
					</Element>
			    //----HUD Speed Trend vector/energy carat
				      <Element>
					   <Visible>(A:GEAR HANDLE POSITION,percent) 0 &gt;</Visible>
						<Element>
							<Select>
								<Value>(P:Local Time, seconds) 0.1 % 40 * int 2 == if{ (A:Airspeed indicated, knot) (>G:Var1) }
								</Value>
							</Select>
						</Element>
						<Element>
							<Select>
								<Value>(P:Local Time, seconds) 0.1 % 40 * int 0 &lt;= if{ (A:Airspeed indicated, knot) s1 (G:Var1) - 0.1 / 10 * l1 + (>G:Var3) }
								</Value>
							</Select>
						</Element>
						<Element>
							<Position X="53" Y="0"/>
							<Clip Top="10" Left="10" Right="322" Bottom="410"/>
							<Image Name="PwrCrt2.bmp" Bright="Yes" ImageSizes="26,37">	
							</Image>
						   <!--comment <Delay PixelsPerSecond="35"/>    -->
							<Shift>
								<Delay PixelsPerSecond="22"/> 
								<Value Minimum="-78" Maximum="78">(G:Var3) (A:Airspeed indicated, knot) - </Value>
								   <Nonlinearity>
									<Item Value="-78" X="53" Y="90"/>
									<Item Value="0" X="53" Y="0"/>
									<Item Value="78" X="53" Y="-90"/>
							   	</Nonlinearity>
							</Shift>
						</Element>
				     </Element>
			
			</Element>
		</Element>

//----HUD Heading tape********************************
	<Element>
	<Visible>(L:Declutter Switch, enum) 3 &lt; (L:Preset Switch, enum) 0 == &amp;&amp;</Visible> 
		<Element>
			<Position X="103" Y="18"/>		
			<Clip Left="50" Right="283"/>
			<Image Name="HDGTPG12.bmp" Bright="Yes" ImageSizes="1856,22">
		    	</Image>
			<Shift>
				<Value>(A:Plane heading degrees gyro, degrees) dnor</Value>
				   <Nonlinearity>
            				<Item Value="120" X="103" Y="18"/>
					<Item Value="210" X="-713" Y="18"/>
					<Item Value="300" X="-1529" Y="18"/>
					<Item Value="030" X="-2345" Y="18"/>
        			   </Nonlinearity>
			</Shift>	
		</Element>
		<Element>
			<Visible>(A:Plane heading degrees gyro, degrees) dnor 150 &lt; (A:Plane heading degrees gyro, degrees) dnor 180 &gt; ||</Visible>
			<Clip Left="50" Right="283"/>
			<Image Name="HDGTPG22.bmp" Bright="Yes" ImageSizes="1856,22">
		    	</Image>
			<Shift>
				<Value>(A:Plane heading degrees gyro, degrees)</Value>
				(*--- WTF - fix this - compass scrolls backward near bitmap's 180 point; values for 0,360 only, and other combos no workie.... ---*)
				   <Nonlinearity> (*---816pix = 90 deg, 272/30, 544/60---*)
					<Item Value="030" X="-713" Y="18"/>
					<Item Value="120" X="-1529" Y="18"/>
					<Item Value="150" X="-1801" Y="18"/>
					<Item Value="180" X="1191" Y="18"/>
					<Item Value="210" X="919" Y="18"/>
					<Item Value="300" X="103" Y="18"/>
        			   </Nonlinearity>
			</Shift>	
		</Element>
		<Element>	
    	    		<Position X="154" Y="57"/>		  
			<Image Name="HDGPtr2.bmp" Bright="Yes" ImageSizes="29,17">
			</Image>
		</Element>
	</Element>
//----HUD Flaps, Hook and Spoiler Display
<Element>
   <Visible>(L:Declutter Switch, enum) 0 ==</Visible>
     <Element>
	<Visible>(A:FLAPS HANDLE PERCENT,percent) 0 &gt;</Visible>
	<Element>
		<Position X="218" Y="410"/>
		<Text X="100" Y="8" Bright="Yes" Length="8" Font="arial" Color="#00ff00" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                	<String>FLP%((A:TRAILING EDGE FLAPS0 LEFT ANGLE, degrees))%!3d!%</String>
             		</Text>
	</Element>
     </Element>
     <Element>
	<Visible>(A:TAILHOOK POSITION,percent) 0 &gt;</Visible>
	<Element>
		<Position X="250" Y="410"/>
		<Text X="20" Y="8" Bright="Yes" Length="6" Font="arial" Color="#00ff00" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                	<String>  HK  </String>
             	</Text>
	</Element>
     </Element>
      <Element>
	<Visible>(A:SPOILERS HANDLE POSITION,percent) 0 &gt;</Visible>
	<Element>
		<Position X="272" Y="410"/>
		<Text X="40" Y="8" Bright="Yes" Length="6" Font="arial" Color="#00ff00" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                	<String>SP%((A:SPOILERS HANDLE POSITION,percent))%!3d!%</String>
             	</Text>
	</Element>
     </Element>
</Element>
//----HUD clock
  <Element>
   	<Visible>(L:Declutter Switch, enum) 2 &lt;</Visible>
     	<Element>
		<Position X="15" Y="321"/>
	  	<Text X="90" Y="15" Bright="Yes" Length="15" Font="arial" Color="#00ff00" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
               		<String>%((P:Local time,hours) flr 23 + 24 % 1 +)%!2d!:%((P:Local time,minutes) flr 60 %)%!02d!:%((P:Local time,seconds) flr 60 %)%!02d!</String>
          		</Text>
     	</Element>
  </Element>
//----HUD Compass Bugs - VOR1, CRS/OBS, VOR2
<Element>
	<Element>
		<Visible>(A:NAV1 HAS NAV, bool) (A:NAV1 HAS LOCALIZER, bool) ! &amp;&amp; (A:GPS drives nav1,bool) ! &amp;&amp;</Visible>
		<Position X="161" Y="57"/>
			<Clip Left="50" Right="283"/>	
			<Image Name="VOR1bug2.bmp" Bright="Yes" ImageSizes="14,21">
		    	</Image>
			<Shift>
    	    			<Value>(A:NAV1 Radial, degrees) dnor 180 + 360 % (A:Plane heading degrees gyro, degrees) - abs 25 &lt; if{ (A:NAV1 Radial, degrees) dnor 180 + 360 % (A:Plane heading degrees gyro, degrees) - } els{ (A:NAV1 Radial, degrees) dnor 180 + 360 % (A:Plane heading degrees gyro, degrees) &lt; if{ (A:NAV1 Radial, degrees) dnor 180 + 360 % 360 + (A:Plane heading degrees gyro, degrees) - } els{ (A:NAV1 Radial, degrees) dnor 180 + 360 % (A:Plane heading degrees gyro, degrees) 360 + - } }</Value>
				
				<Nonlinearity>
					<Item Value="-180" X="-1471" Y="57"/>
            				<Item Value="0" X="161" Y="57"/>
					<Item Value="180" X="1793" Y="57"/>
        			</Nonlinearity>
			</Shift>
	</Element>
	<Element>
		<Visible>(A:GPS drives nav1,bool)</Visible>
		<Position X="161" Y="57"/>
			<Clip Left="50" Right="283"/>	
			<Image Name="VOR1bug2.bmp" Bright="Yes" ImageSizes="14,21">
		    </Image>
			<Shift>
    	    			<Value>(A:GPS WP TRUE BEARING, degrees) d360 345 &gt; (A:GPS GROUND TRUE HEADING, degrees) 15 &lt; &amp;&amp; if{ (A:GPS WP TRUE BEARING, degrees) d360 (A:GPS GROUND TRUE HEADING, degrees) 360 + - } els{ (A:GPS WP TRUE BEARING, degrees) 15 &lt; (A:GPS GROUND TRUE HEADING, degrees) 345 &gt; &amp;&amp; if{ (A:GPS WP TRUE BEARING, degrees) d360 360 + (A:GPS GROUND TRUE HEADING, degrees) - } els{ (A:GPS WP TRUE BEARING, degrees) d360 (A:GPS GROUND TRUE HEADING, degrees) - } }</Value>
				<Nonlinearity>
					<Item Value="-180" X="-1471" Y="57"/>
            				<Item Value="0" X="161" Y="57"/>
					<Item Value="180" X="1793" Y="57"/>
        			</Nonlinearity>
			</Shift>
	</Element>
	<Element>
		<Visible>(A:NAV2 HAS NAV, bool) (A:NAV2 HAS LOCALIZER, bool) ! &amp;&amp;</Visible>
		<Position X="161" Y="57"/>
			<Clip Left="50" Right="283"/>
			<Image Name="VOR2bug2.bmp" Bright="Yes" ImageSizes="14,21">
		    </Image>
			<Shift>
    	    			<Value>(A:NAV2 Radial, degrees) dnor 180 + 360 % (A:Plane heading degrees gyro, degrees) - abs 25 &lt; if{ (A:NAV2 Radial, degrees) dnor 180 + 360 % (A:Plane heading degrees gyro, degrees) - } els{ (A:NAV2 Radial, degrees) dnor 180 + 360 % (A:Plane heading degrees gyro, degrees) &lt; if{ (A:NAV2 Radial, degrees) dnor 180 + 360 % 360 + (A:Plane heading degrees gyro, degrees) - } els{ (A:NAV2 Radial, degrees) dnor 180 + 360 % (A:Plane heading degrees gyro, degrees) 360 + - } }</Value>
				<Nonlinearity>
					<Item Value="-180" X="-1471" Y="57"/>
            				<Item Value="0" X="161" Y="57"/>
					<Item Value="180" X="1793" Y="57"/>
        			</Nonlinearity>
			</Shift>
	</Element>
	<Element>
		<Visible>(A:GPS drives nav1, bool) !</Visible>
		<Position X="161" Y="46"/>
			<Clip Left="50" Right="283"/>
			<Image Name="CRSbug2.bmp" Bright="Yes" ImageSizes="14,21">
		    </Image>
			<Shift>
    	    			<Value>(A:NAV1 OBS,degrees) 345 &gt; (A:Plane heading degrees gyro, degrees) 15 &lt; &amp;&amp; if{ (A:NAV1 OBS,degrees) (A:Plane heading degrees gyro, degrees) 360 + - } els{ (A:NAV1 OBS,degrees) 15 &lt; (A:Plane heading degrees gyro, degrees) 345 &gt; &amp;&amp; if{ (A:NAV1 OBS,degrees) 360 + (A:Plane heading degrees gyro, degrees) - } els{ (A:NAV1 OBS,degrees) (A:Plane heading degrees gyro, degrees) - } }</Value>
				<Nonlinearity>
					<Item Value="-180" X="-1471" Y="46"/>
            				<Item Value="0" X="161" Y="46"/>
					<Item Value="180" X="1793" Y="46"/>
        			</Nonlinearity>
			</Shift>
	</Element>
	<Element>
		<Visible>(A:GPS drives nav1,bool)</Visible>
		<Position X="161" Y="46"/>
			<Clip Left="50" Right="283"/>
			<Image Name="CRSbug2.bmp" Bright="Yes" ImageSizes="14,21">
		    </Image>
			<Shift>     
    	    			<Value>(A:GPS WP DESIRED TRACK, degrees) 345 &gt; (A:Plane heading degrees gyro, degrees) 15 &lt; &amp;&amp; if{ (A:GPS WP DESIRED TRACK, degrees) (A:Plane heading degrees gyro, degrees) 360 + - } els{ (A:GPS WP DESIRED TRACK, degrees) 15 &lt; (A:Plane heading degrees gyro, degrees) 345 &gt; &amp;&amp; if{ (A:GPS WP DESIRED TRACK, degrees) 360 + (A:Plane heading degrees gyro, degrees) - } els{ (A:GPS WP DESIRED TRACK, degrees) (A:Plane heading degrees gyro, degrees) - } }</Value>
				<Nonlinearity>
					<Item Value="-180" X="-1471" Y="46"/>
            				<Item Value="0" X="161" Y="46"/>
					<Item Value="180" X="1793" Y="46"/>
        			</Nonlinearity>
			</Shift>
	</Element>
	
</Element>			
//----HUD Bank arrow and scale
     <Element>
        <Visible>(L:Declutter Switch, enum) 3 &lt; (L:Preset Switch, enum) 0 == &amp;&amp;</Visible>	
	<Element>
	        <Visible>(A:PLANE BANK DEGREES,degrees) dnor 55 &lt; (A:PLANE BANK DEGREES,degrees) dnor 305 &gt; ||</Visible>	
    	    	<Position X="165" Y="157"/>		  
		<Image Name="BNKARRW2.bmp" Bright="Yes" ImageSizes="34,224">
			  <Axis X="15.5" Y="14"/>
		</Image>
		<Rotate>
    	    		<Value>(A:PLANE BANK DEGREES,radians)</Value>
		</Rotate>
	</Element>
	<Element>
    	    	<Position X="0" Y="300"/>		  
		<Image Name="BNKSCL2.bmp" Bright="Yes" ImageSizes="333,100">
		</Image>
	</Element>
     </Element>
//----HUD Indicated Airspeed
<Element>
<Visible>(L:Preset Switch, enum) 0 ==</Visible>
     <Element>
           	<Position X="28" Y="116"/>
             <Text X="46" Y="19" Bright="Yes" Length="4" Font="arial" Color="#00ff00" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 	<String>%((A:Airspeed indicated, knots) 48 &gt;=)%{if}%((A:Airspeed indicated, knots))%!3d!%{else}48%</String>
             </Text>
     </Element>
     <Element>
           	<Position X="27" Y="116"/>
             <Image Name="HAspBox2.bmp" Bright="Yes" ImageSizes="48,19">
	 </Image>
     </Element>
</Element>

//----HUD VSI		<Comment>		<Visible>(L:Declutter Switch, enum) 3 &lt;</Visible>		</Comment>
<Element>
        <Element>
           <Position X="265" Y="95"/>
             <Text X="48" Y="17" Bright="Yes" Length="6" Font="arial" Color="#00ff00" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No">
                  <String>%((A:Vertical speed,feet per minute) 10 % (A:Vertical speed,feet per minute) - /-/)%!5d!</String>
             </Text>
        </Element>
</Element>				
//----HUD Altitude (radalt set at 1000ft)
<Element>
<Visible>(L:Preset Switch, enum) 0 ==</Visible>
     <Element>
           	<Position X="252" Y="116"/>
             <Image Name="HAltBox2.bmp" Bright="Yes" ImageSizes="61,19">
	 </Image>
     </Element>
        <Element>
	  <Visible>(A:Radio height, feet) 1000 &gt;=</Visible>
	<Element>
          		 <Position X="248" Y="116"/>
          		  <Text X="30" Y="19" Bright="Yes" Luminous="Yes" Length="2" Font="arial" Color="#00ff00" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No">
               		  <String>%((A:Indicated Altitude, feet) 1000 / int)%!2d!</String>
            		 </Text>
	</Element>
	<Element>
		  <Position X="281" Y="118"/>
             		<Text X="30" Y="16" Bright="Yes" Luminous="Yes" Length="3" Font="arial" Color="#00ff00" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
               		  <String>%((A:Indicated Altitude, feet) 10 % (A:Indicated Altitude, feet) - /-/ 1000 %)%!03d!</String>
             		</Text>
	</Element>
        </Element>
        <Element>
	  <Visible>(A:Radio height, feet) 1000 &lt;</Visible>
           <Position X="265" Y="116"/>
             <Text X="64" Y="19" Bright="Yes" Length="9" Font="arial" Color="#00ff00" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%((A:Radio height, feet) 10 / 10 *)%!5d!%  R%</String>
             </Text>
        </Element>
        <Element>
	   <Visible>(L:Declutter Switch, enum) 1 &lt; (A:Radio height, feet) 1000 &lt; &amp;&amp;</Visible>
	<Element>
           		<Position X="248" Y="156"/>
             		<Text X="30" Y="18" Bright="Yes" Length="2" Font="arial" Color="#00ff00" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 		<String>%((A:Indicated Altitude, feet) 1000 / int 1 &gt;=)%{if}%((A:Indicated Altitude, feet) 1000 / int)%!2d!%{else} %</String>
             		</Text>
	</Element>
	<Element>
		<Position X="281" Y="156"/>
             		<Text X="60" Y="15" Bright="Yes" Length="9" Font="arial" Color="#00ff00" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 		<String>%((A:Indicated Altitude, feet) 10 % (A:Indicated Altitude, feet) - /-/ 1000 %)%!03d!%   B</String>
             		</Text>
	</Element>
        </Element>	
</Element>									
//----HUD NAV block displays/GPS
 <Element>
   <Visible>(L:Declutter Switch, enum) 2 &lt;</Visible>
   <Element>
     <Visible>(A:NAV1 HAS NAV, bool) (A:NAV1 HAS DME, bool) || (A:GPS drives nav1,bool) ! &amp;&amp;</Visible>
        <Element>
           <Position X="238" Y="269"/>
             <Text X="65" Y="12" Bright="Yes" Length="14" Font="arial" Color="#00ff00" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%((A:NAV1 DME, nmiles) s1 0 &gt;=)%{if}%(l1 100 &gt;=)%{if}%(l1)%!d!%{else}%(l1)%!0.1f!%{end}% %{else}--- %{end}%((A:Nav1 ident, string))%!s!% %{end}%</String>
             </Text>
        </Element>
   </Element>
   <Element>
     <Visible>(A:GPS drives nav1,bool)</Visible>
        <Element>
           <Position X="200" Y="269"/>
             <Text X="128" Y="12" Bright="Yes" Length="18" Font="arial" Color="#00ff00" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%((A:GPS WP DISTANCE, nmiles))%!4.1f!% W:%((A:GPS WP NEXT ID, string))%!s!% %((A:GPS WP BEARING, degrees) d360)%!03d!%</String>
             (*--%((A:GPS WP NEXT ID, string))%!s! or ((A:GPS FLIGHT PLAN WP INDEX, number))%!02d! ((>@c:FlightPlanWaypointIndex))%!03d!%???--*)
		</Text>
        </Element>
   </Element>
   <Element>
	<Visible>(A:NAV1 HAS NAV, bool) ! (A:NAV1 HAS DME, bool) ! &amp;&amp; (A:GPS drives nav1, bool) ! &amp;&amp; (A:NAV1 HAS LOCALIZER, bool) ! &amp;&amp;</Visible>
           <Position X="257" Y="269"/>
             <Text X="122" Y="12" Bright="Yes" Length="17" Font="arial" Color="#00ff00" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%---  XXXX  ---%</String>
             </Text>
    </Element>
   <Element>
	<Visible>(A:NAV1 HAS NAV, bool) (A:NAV1 HAS LOCALIZER, bool) ! &amp;&amp; (A:GPS drives nav1,bool) ! &amp;&amp;</Visible>
           <Position X="304" Y="269"/>
             <Text X="30" Y="12" Bright="Yes" Length="6" Font="arial" Color="#00ff00" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%((A:NAV1 Radial, degrees) dnor 180 + 360 % )%!03.0f!</String>
             </Text>
    </Element>
<Comment>******
    <Element>
       <Visible>(L:Declutter Switch, enum) 0 == (A:NAV1 HAS LOCALIZER, bool) ! &amp;&amp; (A:GPS drives nav1, bool) ! &amp;&amp; (A:GPS drives nav1,bool) ! &amp;&amp;</Visible>
        <Element>
           <Position X="267" Y="282"/>
             	<Text X="90" Y="12" Bright="Yes" Length="8" Font="arial" Color="#00ff00" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                	<String>%CRS%  %((A:NAV1 OBS,degrees))%!03d!</String>
             	</Text>
        </Element>
   </Element>
    <Element>
       <Visible>(L:Declutter Switch, enum) 0 == (A:NAV1 HAS LOCALIZER, bool) &amp;&amp; (A:GPS drives nav1, bool) ! &amp;&amp; (A:GPS drives nav1,bool) ! &amp;&amp;</Visible>
        <Element>
           <Position X="267" Y="282"/>
             	<Text X="90" Y="12" Bright="Yes" Length="14" Font="arial" Color="#00ff00" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                	<String>%ILS%  %((A:NAV1 OBS,degrees))%!03d!</String>
             	</Text>
        </Element>
   </Element>
******</Comment>
<Element>
<Visible>(L:Declutter Switch, enum) 0 ==</Visible>
   <Element>
     <Visible>(A:NAV2 HAS NAV, bool) (A:NAV2 HAS DME, bool) ||</Visible>
        <Element>
           <Position X="238" Y="355"/>
             <Text X="65" Y="12" Bright="Yes" Length="14" Font="arial" Color="#00ff00" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%((A:NAV2 DME, nmiles) s1 0 &gt;=)%{if}%(l1 100 &gt;=)%{if}%(l1)%!d!%{else}%(l1)%!0.1f!%{end}% %{else}--- %{end}%((A:Nav2 ident, string))%!s!% %{end}%</String>
             </Text>
        </Element>
   </Element>
   <Element>
	<Visible>(A:NAV2 HAS NAV, bool) ! (A:NAV2 HAS DME, bool) ! &amp;&amp; (A:NAV1 HAS LOCALIZER, bool) ! &amp;&amp;</Visible>
           <Position X="257" Y="355"/>
             <Text X="122" Y="12" Bright="Yes" Length="17" Font="arial" Color="#00ff00" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%---  XXXX  ---%</String>
             </Text>
    </Element>
   <Element>
	<Visible>(A:NAV2 HAS NAV, bool) (A:NAV2 HAS LOCALIZER, bool) ! &amp;&amp;</Visible>
           <Position X="304" Y="355"/>
             <Text X="30" Y="12" Bright="Yes" Length="6" Font="arial" Color="#00ff00" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>%((A:NAV2 Radial, degrees) dnor 180 + 360 % )%!03.0f!</String>
             </Text>
    </Element>
<Comment>******
    <Element>
           <Position X="267" Y="368"/>
             	<Text X="90" Y="12" Bright="Yes" Length="8" Font="arial" Color="#00ff00" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                	<String>%CRS%  %((A:NAV2 OBS,degrees))%!03d!</String>
             	</Text>
        </Element>
******</Comment>
  </Element>
</Element>
//----HUD STALL Warning Display
        <Element>
           <Position X="110" Y="120"/>
		<Visible>(A:STALL Warning, bool)</Visible>		   
             <Text X="125" Y="30" Bright="Yes" Length="5" Font="arialnarrow" Color="#00ff00" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                 <String>STALL</String>
             </Text>
        </Element>				
//----Waterline AoA bracket
	//--- alternate ILS/AoA bracket centered on pixel 167,116 from main background
		<Element>
			<Position X="133" Y="92"/>
			<Clip Top="10" Left="10" Right="322" Bottom="410"/>	
			<Image Name="AOABRK2.bmp" Bright="Yes" ImageSizes="12,47">
		    	</Image>
			<Visible>(A:GEAR HANDLE POSITION,percent) 0 &gt; (L:Vector Switch, bool) &amp;&amp; (L:AoABracket Switch, bool) ! &amp;&amp;</Visible>									
			<Shift>
				<Value Minimum="2.1" Maximum="14.1">(A:INCIDENCE ALPHA,Degrees)</Value>
					<Nonlinearity>    (*--from origin, +-10 deg, 238 pix--*)
						<Item Value="-1.9" X="133" Y="-146"/>
						<Item Value="18.1" X="133" Y="330"/>
					</Nonlinearity>
			</Shift>			
		</Element>
//----Waterline ILS
		<Element>
						<Visible>(A:NAV1 has localizer, bool) (L:ILS Switch, bool) ! &amp;&amp; (L:Vector Switch, bool) &amp;&amp;</Visible>
						<Position X="167" Y="72"/>
						<Clip Top="10" Left="10" Right="322" Bottom="410"/>
						<Image Name="LCLNDL2.bmp" Bright="Yes" ImageSizes="2,85">
							</Image>
							<Shift>
               							<Value Minimum="-1" Maximum="1">(A:NAV1 CDI, number) 127 /</Value>
								<Nonlinearity>
									<Item Value="1" X="215" Y="72"/>
									<Item Value="0" X="167" Y="72"/>
									<Item Value="-1" X="119" Y="72"/>
								</Nonlinearity>
							</Shift>					
		</Element>
		<Element>
						<Visible>(A:HSI GSI needle valid, bool) (L:ILS Switch, bool) ! &amp;&amp; (L:Vector Switch, bool) &amp;&amp;</Visible>
						<Position X="124" Y="72"/>
						<Clip Top="10" Left="10" Right="322" Bottom="410"/>
							<Image Name="GSNDL2.bmp" Bright="Yes" ImageSizes="85,2">
							</Image>
							<Shift>
               							<Value Minimum="-1" Maximum="1">(A:NAV1 GSI, number) 120 /</Value>
								<Nonlinearity>
									<Item Value="-1" X="124" Y="72"/>
									<Item Value="0" X="124" Y="120"/>
									<Item Value="1" X="124" Y="168"/>
								</Nonlinearity>
							</Shift>
		</Element>
//---HUD AoA text
	<Element>
		<Visible>(L:Declutter Switch, enum) 2 &lt;</Visible>
		<Element>
               		<Position X="45" Y="196"/>
               		<Text Bright="Yes" X="36" Y="17" Length="4" Font="arial" Color="#00ff00" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                  		<String>%((A:INCIDENCE ALPHA,degrees) -10 max 22min)%!3.1f!</String>
               		</Text>
		</Element>
		<Element>
    	  		<Position X="15" Y="190"/>
			<Image Name="alpha2.bmp" Bright="Yes" ImageSizes="28,28">
		    	</Image>	
		</Element>
	</Element>
//---HUD MACH number
		<Element>
			<Visible>(A:GEAR HANDLE POSITION,percent) 0 == (L:Declutter Switch, enum) 2 &lt; &amp;&amp;</Visible>
               		<Position X="28" Y="222"/>
               		<Text Bright="Yes" X="59" Y="17" Length="8" Font="arial" Color="#00ff00" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                  		<String>%M  %((A:Airspeed mach, machs) 0 max 9.99 min)%!3.2f!</String>
               		</Text>
		</Element>
//---HUD G meter
		<Element>
			<Visible>(A:GEAR HANDLE POSITION,percent) 0 == (L:Declutter Switch, enum) 2 &lt; &amp;&amp;</Visible>
               		<Position X="30" Y="248"/>
               		<Text Bright="Yes" X="59" Y="17" Length="8" Font="arial" Color="#00ff00" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
                  		<String>%G  %((A:G Force,G Force) -9.9 max 9.9 min)%!3.1f!</String>
               		</Text>
		</Element>
//---HUD Digital Heading
	<Element>
	    <Visible>(L:Declutter Switch, enum) 3 == (L:Preset Switch, enum) 1 == ||</Visible> 
		<Element>
               		<Position X="146" Y="28"/>
               		<Text Bright="Yes" X="44" Y="19" Length="3" Font="arial" Color="#00ff00" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                  		<String>%((A:Plane heading degrees gyro, degrees))%!03d!</String>
               		</Text>
		</Element>
		<Element>
    	  		<Position X="144" Y="27"/>
			<Image Name="HDGBox2.bmp" Bright="Yes" ImageSizes="54,22">
		    	</Image>	
		</Element>
	</Element>
//---HUD NWS text, groundspeed when on ground
	<Element>
	   <Visible>(A:Sim On Ground, bool) (A:GEAR HANDLE POSITION,percent) 0 &gt; &amp;&amp; (A:GROUND VELOCITY, knots) 100 &lt; &amp;&amp; (L:Declutter Switch, enum) 1 &lt; &amp;&amp;</Visible>
		<Element>
               			<Position X="267" Y="242"/>
               			<Text Bright="Yes" X="36" Y="12" Length="3" Font="arial" Color="#00ff00" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                  			<String>NWS</String>
               			</Text>
		</Element>
		<Element>
               			 <Position X="28" Y="137"/>
             			<Text X="46" Y="17" Bright="Yes" Length="5" Font="arial" Color="#00ff00" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                			 <String>%((A:GROUND VELOCITY, knots))%!3d!%</String>
             			</Text>
		</Element>
	</Element>

//---HUD BINGO text **************************************
	<Element>
	   <Visible>(A:FUEL TOTAL QUANTITY WEIGHT, pounds) (L:BINGOFuelPounds, enum) &lt; (L:BINGOReset; bool) ! &amp;&amp; (P:Local time,seconds) 1.5 % int 1 == &amp;&amp;</Visible>
		<Element>
			<Position X="110" Y="67"/>
               		<Text X="125" Y="30" Bright="Yes" Length="5" Font="arialnarrow" Color="#00ff00" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
				<String>BINGO</String>
			</Text>
		</Element>
		<Element>
			<Position X="110" Y="100"/>
               		<Text X="125" Y="16" Bright="Yes" Length="9" Font="arial" Color="#00ff00" Adjust="Center" VerticalAdjust="Top" Multiline="No" Fixed="No">
				<String>%((A:FUEL TOTAL QUANTITY WEIGHT, pounds))%!4d!% lbs%</String>
			</Text>
		</Element>
		
	</Element>


//------******************************************************************************************************************
//------******************************************************************************************************************
//------******************************************************************************************************************
//------******************************************************************************************************************
//------******************************************************************************************************************			
</Element>


</Gauge>
