<?xml version="1.0" encoding="UTF-8"?>
<Gauge Name="AP1DISP">

	<Element>
		<Visible>(L:DC_ESS_Avail, number) 1 == (A:LIGHT PANEL, bool) 0 == &amp;&amp; (L:LightTest, number) 0 == &amp;&amp;</Visible>

		<Element>
			<Position X="0" Y="0"/>
			<Image Name="AP1Disp.bmp" Bright="Yes" ImageSizes="278,48,0,0"/>
		</Element>

		<Element>
			<Visible>
				(L:AB_AP_SPDMACH, number) 1 ==
				(L:AB_AP_SPDmode_set, number) 0 &lt; 
				(L:FCU_Managed_SPDdisp_override, bool) 1 == || &amp;&amp;
			</Visible>
			<Element>
				<Position X="18" Y="12"/>
				<Text X="31" Y="34" Length="1" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>0</String>
				</Text>
			</Element>
			<Element>
				<Position X="35" Y="25"/>
				<Text X="89" Y="35" Length="1" Fixed="Yes" Font="AirbusFCU" FontSize="21" Attributes="Bold" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>.</String>
				</Text>
			</Element>
			<Element>
				<Position X="40" Y="12"/>
				<Text X="37" Y="34" Length="2" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>%((L:AB_AP_Mach_Select, number) 100 *)%!2d!</String>
				</Text>
			</Element>
		</Element>
		
		<Element>
			<Visible>
				(L:AB_AP_SPDMACH, number) 0 ==
				(L:AB_AP_SPDmode_set, number) 0 &lt; 
				(L:FCU_Managed_SPDdisp_override, bool) 1 == || &amp;&amp;
			</Visible>
			<Element>
				<Position X="18" Y="12"/>
				<Text X="56" Y="34" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>%((L:AB_AP_SPEED_Select, number))%!003.0f!</String>
				</Text>
			</Element>
		</Element>
		
		<Element>
			<Visible>
				(L:AB_AP_SPDmode_set, number) 0 &gt;=
				(L:FCU_Managed_SPDdisp_override, bool) 0 == &amp;&amp;
			</Visible>
			<Element>
				<Position X="18" Y="12"/>
				<Text X="56" Y="34" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>---</String>
				</Text>
			</Element>
		</Element>
		<Element>
			<Visible>
				(L:AB_AP_SPDmode_set, number) 0 &gt;=
				(L:AB_AP_SPDMACH, number) 1 == &amp;&amp;
			</Visible>
			<Element>
				<Position X="76" Y="23"/>
				<Image Name="APDot.bmp" Bright="Yes" ImageSizes="15,15,0,0"/>
			</Element>
		</Element>
		
		<Element>
			<Visible>
				(L:AB_AP_SPDmode_set, number) 0 &gt;=
				(L:AB_AP_SPDMACH, number) 0 == &amp;&amp;
			</Visible>
			<Element>
				<Position X="76" Y="23"/>
				<Image Name="APDot.bmp" Bright="Yes" ImageSizes="15,15,0,0"/>
			</Element>
		</Element>
		
		<Element>
			<Visible>(L:AB_AP_SPDMACH, number) 1 ==</Visible>
			<Element>
				<Position X="41" Y="0"/>
				<Text X="170" Y="25" Length="4" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>m</String>
				</Text>
			</Element>
		</Element>
		
		<Element>
			<Visible>(L:AB_AP_SPDMACH, number) 0 ==</Visible>
			<Element>
				<Position X="13" Y="0"/>
				<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>s</String>
				</Text>
			</Element>
		</Element>
		
		<!-- CHB NOTE: Value displayed in FCU: HDG. -->
		<Element>
			<Visible>
				(L:AB_AP_HDGTRK, number) 0 ==
				(L:AB_AP_HDGmode_setDisp, number) 0 &lt; 
				(L:FCU_Managed_HDGdisp_override, bool) 1 == 
				(L:MCDU_DIR_RDL_NAVARM, bool) 1 == || || &amp;&amp;
			</Visible>
			<Element>
				<Position X="128" Y="12"/>
				<Text X="56" Y="34" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>%((L:AB_AP_HDG_Select, number))%!03d!%</String>
				</Text>
			</Element>
		</Element>
		
		<Element>
			<Visible>
				(L:AB_AP_HDGTRK, number) 1 ==
				(L:AB_AP_HDGmode_setDisp, number) 0 &lt; 
				(L:FCU_Managed_HDGdisp_override, bool) 1 == 
				(L:MCDU_DIR_RDL_NAVARM, bool) 1 == || || &amp;&amp;
			</Visible>
			<Element>
				<Position X="128" Y="12"/>
				<Text X="56" Y="34" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>%((L:Autopilot_TRK_set, degrees))%!003.0f!</String>
				</Text>
			</Element>
		</Element>
		
		<Element>
			<Visible>
				(L:AB_AP_HDGmode_setDisp, number) 0 &gt;=
				(L:FCU_Managed_HDGdisp_override, bool) 0 == &amp;&amp;
				(L:MCDU_DIR_RDL_NAVARM, bool) 1 != &amp;&amp;
			</Visible>
			<Element>
				<Position X="128" Y="12"/>
				<Text X="56" Y="34" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>---</String>
				</Text>
			</Element>
		</Element>
		<Element>
			<Visible>
				(L:AB_AP_HDGmode_setDisp, number) 0 &gt;=
			</Visible>
			<Element>
				<Position X="186" Y="23"/>
				<Image Name="APDot.bmp" Bright="Yes" ImageSizes="15,15,0,0"/>
			</Element>
		</Element>
		
		<Element>
			<Visible>(L:AB_AP_HDGTRK, number) 0 ==</Visible>
			<Element>
				<Position X="119" Y="0"/>
				<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>h</String>
				</Text>
			</Element>
			<Element>
				<Position X="243" Y="15"/>
				<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>h</String>
				</Text>
			</Element>
		</Element>
		
		<Element>
			<Visible>(L:AB_AP_HDGTRK, number) 1 ==</Visible>
			<Element>
				<Position X="150" Y="0"/>
				<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>t</String>
				</Text>
			</Element>
			<Element>
				<Position X="243" Y="29"/>
				<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>t</String>
				</Text>
				</Element>
		</Element>
		
		<Element>
			<Position X="180" Y="0"/>
			<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>n</String>
			</Text>
		</Element>
	</Element>
	
	<Element>
		<Visible>(L:DC_ESS_Avail, number) 1 == (A:LIGHT PANEL, bool) 1 == &amp;&amp; (L:LightTest, number) 0 == &amp;&amp;</Visible>
		
		<Element>
			<Position X="0" Y="0"/>
			<Image Name="AP1Disp_night.bmp" Bright="Yes" ImageSizes="278,48,0,0"/>
		</Element>

		<Element>
			<Visible>
				(L:AB_AP_SPDMACH, number) 1 ==
				(L:AB_AP_SPDmode_set, number) 0 &lt; 
				(L:FCU_Managed_SPDdisp_override, bool) 1 == || &amp;&amp;
			</Visible>
			<Element>
				<Position X="18" Y="12"/>
				<Text X="31" Y="34" Length="1" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>0</String>
				</Text>
			</Element>
			<Element>
				<Position X="35" Y="25"/>
				<Text X="89" Y="35" Length="1" Fixed="Yes" Font="AirbusFCU" FontSize="21" Attributes="Bold" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>.</String>
				</Text>
			</Element>
			<Element>
				<Position X="40" Y="12"/>
				<Text X="37" Y="34" Length="2" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>%((L:AB_AP_Mach_Select, number) 100 *)%!2d!</String>
				</Text>
			</Element>
		</Element>
		
		<Element>
			<Visible>
				(L:AB_AP_SPDMACH, number) 0 ==
				(L:AB_AP_SPDmode_set, number) 0 &lt; 
				(L:FCU_Managed_SPDdisp_override, bool) 1 == || &amp;&amp;
			</Visible>
			<Element>
				<Position X="18" Y="12"/>
				<Text X="56" Y="34" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>%((L:AB_AP_SPEED_Select, number))%!003.0f!</String>
				</Text>
			</Element>
		</Element>
		
		<Element>
			<Visible>
				(L:AB_AP_SPDmode_set, number) 0 &gt;=
				(L:FCU_Managed_SPDdisp_override, bool) 0 == &amp;&amp;
			</Visible>
			<Element>
				<Position X="18" Y="12"/>
				<Text X="56" Y="34" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>---</String>
				</Text>
			</Element>
		</Element>
		<Element>
			<Visible>
				(L:AB_AP_SPDmode_set, number) 0 &gt;=
				(L:AB_AP_SPDMACH, number) 1 == &amp;&amp;
			</Visible>
			<Element>
				<Position X="76" Y="23"/>
				<Image Name="APDot_night.bmp" Bright="Yes" ImageSizes="15,15,0,0"/>
			</Element>
		</Element>
		
		<Element>
			<Visible>
				(L:AB_AP_SPDmode_set, number) 0 &gt;=
				(L:AB_AP_SPDMACH, number) 0 == &amp;&amp;
			</Visible>
			<Element>
				<Position X="76" Y="23"/>
				<Image Name="APDot_night.bmp" Bright="Yes" ImageSizes="15,15,0,0"/>
			</Element>
		</Element>
		
		<Element>
			<Visible>(L:AB_AP_SPDMACH, number) 1 ==</Visible>
			<Element>
				<Position X="41" Y="0"/>
				<Text X="170" Y="25" Length="4" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>m</String>
				</Text>
			</Element>
		</Element>
		
		<Element>
			<Visible>(L:AB_AP_SPDMACH, number) 0 ==</Visible>
			<Element>
				<Position X="13" Y="0"/>
				<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>s</String>
				</Text>
			</Element>
		</Element>
		
		<!-- CHB NOTE: Value displayed in FCU: HDG. -->
		<Element>
			<Visible>
				(L:AB_AP_HDGTRK, number) 0 ==
				(L:AB_AP_HDGmode_setDisp, number) 0 &lt; 
				(L:FCU_Managed_HDGdisp_override, bool) 1 == || &amp;&amp;
			</Visible>
			<Element>
				<Position X="128" Y="12"/>
				<Text X="56" Y="34" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>%((L:AB_AP_HDG_Select, number))%!03d!%</String>
				</Text>
			</Element>
		</Element>
		
		<Element>
			<Visible>
				(L:AB_AP_HDGTRK, number) 1 ==
				(L:AB_AP_HDGmode_setDisp, number) 0 &lt; 
				(L:FCU_Managed_HDGdisp_override, bool) 1 == || &amp;&amp;
			</Visible>
			<Element>
				<Position X="128" Y="12"/>
				<Text X="56" Y="34" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>%((L:Autopilot_TRK_set, degrees))%!003.0f!</String>
				</Text>
				</Element>
		</Element>
		
		<Element>
			<Visible>
				(L:AB_AP_HDGmode_setDisp, number) 0 &gt;=
				(L:FCU_Managed_HDGdisp_override, bool) 0 == &amp;&amp;
			</Visible>
			<Element>
				<Position X="128" Y="12"/>
				<Text X="56" Y="34" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>---</String>
				</Text>
			</Element>
		</Element>
		<Element>
			<Visible>
				(L:AB_AP_HDGmode_setDisp, number) 0 &gt;=
			</Visible>
			<Element>
				<Position X="186" Y="23"/>
				<Image Name="APDot_night.bmp" Bright="Yes" ImageSizes="15,15,0,0"/>
			</Element>
		</Element>
		
		<Element>
			<Visible>(L:AB_AP_HDGTRK, number) 0 ==</Visible>
			<Element>
				<Position X="119" Y="0"/>
				<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>h</String>
				</Text>
			</Element>
			<Element>
				<Position X="243" Y="15"/>
				<Text X="105" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>h</String>
				</Text>
			</Element>
		</Element>
		
		<Element>
			<Visible>(L:AB_AP_HDGTRK, number) 1 ==</Visible>
			<Element>
				<Position X="150" Y="0"/>
				<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>t</String>
				</Text>
			</Element>
			<Element>
				<Position X="243" Y="29"/>
				<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
					<String>t</String>
				</Text>
			</Element>
		</Element>
		
		<Element>
			<Position X="180" Y="0"/>
			<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>n</String>
			</Text>
		</Element>
	</Element>
	
	
	<Element>
		<Visible>(L:DC_ESS_Avail, number) 1 == (A:LIGHT PANEL, bool) 0 == &amp;&amp; (L:LightTest, number) 1 == &amp;&amp;</Visible>
		
		<Element>
			<Position X="0" Y="0"/>
			<Image Name="AP1Disp.bmp" Bright="Yes" ImageSizes="278,48,0,0"/>
		</Element>
		
		<Element>
			<Position X="18" Y="12"/>
			<Text X="56" Y="34" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>888</String>
			</Text>
		</Element>
		
		<Element>
			<Position X="76" Y="23"/>
			<Image Name="APDot.bmp" Bright="Yes" ImageSizes="15,15,0,0"/>
		</Element>
		
		<Element>
			<Position X="41" Y="0"/>
			<Text X="170" Y="25" Length="4" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>m</String>
			</Text>
		</Element>
		
		<Element>
			<Position X="13" Y="0"/>
			<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>s</String>
			</Text>
		</Element>
		
		<Element>
			<Position X="128" Y="12"/>
			<Text X="56" Y="34" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>888</String>
			</Text>
		</Element>
		
		<Element>
			<Position X="186" Y="23"/>
			<Image Name="APDot.bmp" Bright="Yes" ImageSizes="15,15,0,0"/>
		</Element>
		
		<Element>
			<Position X="119" Y="0"/>
			<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>h</String>
			</Text>
		</Element>

		<Element>
			<Position X="243" Y="15"/>
			<Text X="105" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>h</String>
			</Text>
		</Element>
		
		<Element>
			<Position X="150" Y="0"/>
			<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>t</String>
			</Text>
		</Element>

		<Element>
			<Position X="243" Y="29"/>
			<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>t</String>
			</Text>
		</Element>
		
		<Element>
			<Position X="180" Y="0"/>
			<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#5F4618" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>n</String>
			</Text>
		</Element>
	</Element>
	
	<!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->	
	
	<Element>
		<Visible>(L:DC_ESS_Avail, number) 1 == (A:LIGHT PANEL, bool) 1 == &amp;&amp; (L:LightTest, number) 1 == &amp;&amp;</Visible>
		
		<Element>
			<Position X="0" Y="0"/>
			<Image Name="AP1Disp_night.bmp" Bright="Yes" ImageSizes="278,48,0,0"/>
		</Element>
		
		<Element>
			<Position X="18" Y="12"/>
			<Text X="56" Y="34" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>888</String>
			</Text>
		</Element>
		
		<Element>
			<Position X="76" Y="23"/>
			<Image Name="APDot_night.bmp" Bright="Yes" ImageSizes="15,15,0,0"/>
		</Element>
		
		<Element>
			<Position X="41" Y="0"/>
			<Text X="170" Y="25" Length="4" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>m</String>
			</Text>
		</Element>
		
		<Element>
			<Position X="13" Y="0"/>
			<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>s</String>
			</Text>
		</Element>
		
		<Element>
			<Position X="128" Y="12"/>
			<Text X="56" Y="34" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="36" Attributes="Bold" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>888</String>
			</Text>
		</Element>
		
		<Element>
			<Position X="186" Y="23"/>
			<Image Name="APDot_night.bmp" Bright="Yes" ImageSizes="15,15,0,0"/>
		</Element>
		
		<Element>
			<Position X="119" Y="0"/>
			<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>h</String>
			</Text>
		</Element>

		<Element>
			<Position X="243" Y="15"/>
			<Text X="105" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>h</String>
			</Text>
		</Element>
		
		<Element>
			<Position X="150" Y="0"/>
			<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>t</String>
			</Text>
		</Element>

		<Element>
			<Position X="243" Y="29"/>
			<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>t</String>
			</Text>
		</Element>
		
		<Element>
			<Position X="180" Y="0"/>
			<Text X="100" Y="25" Length="3" Fixed="Yes" Font="AirbusFCU" FontSize="17" Color="#C86B20" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
				<String>n</String>
			</Text>
		</Element>
	</Element>
	
	<Element>
		<Select>
			<Value>
			(L:Pause_code, bool) 0 ==
			if{
				
				<!--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-->
				40 (&gt; L:AP_AP_APLOGICREV, number)
								
				<!--AP STUFF-->
				<!--KNOBS STUFF-->
				
				<!--HDG-->
				(L:MCDU_PPOS, number) 1 ==
				if{
					0 (&gt; L:MCDU_PPOS, number) 
					-1 (&gt; L:AB_AP_HDGmode_setDisp, number)
					-1 (&gt; L:AB_AP_HDGmode_set, number) }					
				
				(L:MCDU_DIR_TO_PRESSED, bool) 1 ==
				if{
					0 (&gt; L:MCDU_DIR_RDL_NAVARM, number)
					1 (&gt; L:AB_AP_HDGmode_setDisp, number)
					1 (&gt; L:AB_AP_HDGmode_set, number) 
					0 (&gt; L:MCDU_DIR_TO_PRESSED, bool) }
				
				(L:AB_AP_HDGmode, number) (L:AB_AP_HDGmode_setDisp, number) !=
				(L:AB_AP_HDGmode, number) 0 != &amp;&amp;
				if{
					20 (&gt; L:AlieronAPSmoothFactor, number)  }
					
				(L:AB_AP_HDGmode, number) -1 ==
				if{
					(L:AB_LOC_CAPTURE, bool) 1 ==
					(L:AB_AP_LOC, number) 1 == &amp;&amp;
					if{
						0 (&gt; L:AB_AP_LOC, number) }
					
					(L:AB_LOC_CAPTURE, bool) 1 ==
					(L:AB_AP_LOC2, number) 1 == &amp;&amp;
					
					(L:MCDUAppType, number) 2 &gt;= 
					(L:MCDU_FLT_PHS, number) 5 == &amp;&amp; 
					(L:AB_AP_LOC2, number) 1 == &amp;&amp; ||
					if{
						
						0 (&gt; L:AP_AP_ALT_Mode, number)   
						0 (&gt; L:AP_AP_ALT_Mode99, number)
						1 (&gt; L:AB_AP_KNOBALT, bool)
						0 (&gt; L:AB_AP_LOC2, number)
						
						(A:Vertical speed,feet per minute) 10 / near 10 / (&gt; L:AB_AP_VS_Select2, number)
						(A:Vertical speed,feet per minute) 60 / (A:AIRSPEED TRUE,knots) 1.68781 * / asin rddg 10 * near 10 / (&gt; L:AB_AP_FPA_Select2, number) }
					
					-1 (&gt; L:AB_AP_HDGmode_setDisp, number)
					-1 (&gt; L:AB_AP_HDGmode_set, number) 
					
					(L:MCDU_DIR_RDL_NAVARM, number) 1 ==
					if{
					(L:MCDU_DIR_RDL_NAVARM, number) /-/ (&gt; L:MCDU_DIR_RDL_NAVARM, number) } 
				}
				
				(L:MCDU_DIR_RDL_NAVARM, number) 1 ==
				if{				
					1 (&gt; L:AB_AP_HDGmode_setDisp, number)
					-1 (&gt; L:AB_AP_HDGmode_set, number) } 
				
				(L:AB_AP_HDGmode, number) 1 ==
				(L:MCDU_DIR_RDL_NAVARM, number) 0 == &amp;&amp; 
				if{
					1 (&gt; L:AB_AP_HDGmode_setDisp, number)
					1 (&gt; L:AB_AP_HDGmode_set, number) }
					
				(L:AB_AP_HDGmode, number) 1 ==
				(L:MCDU_DIR_RDL_NAVARM, number) -1 == &amp;&amp; 
				if{
					1 (&gt; L:MCDU_DIR_RDL_NAVARM, number) }
				
				(A:GROUND VELOCITY,knots) 5 &lt;=
				if{ (A:PLANE HEADING DEGREES GYRO,degrees) (>L:AB_FMGS_HDGSRC,number) }
				els{ (A:VELOCITY WORLD X,knots) (A:VELOCITY WORLD Z,knots) / atg rddg (A:VELOCITY WORLD Z,knots) 0 &lt; if{ 180 + } dnor (>L:AB_FMGS_HDGSRC,number) }
				
				(L:AB_FMGS_HDGSRC, number) (A:Delta heading rate,Radians per second) 3.5 * (L:AlieronAPSmoothFactor, number) / rddg + dnor (>L:AB_FMGS_HDGSRC,number) 
				
				0.65 (&gt; L:AB_AP_DistAhead, number)
				
				(L:AB_AP_HDGTRK, number) 0 ==
				if{
					(L:AB_AP_HDG_Select, number) (A:GPS GROUND MAGNETIC TRACK, radians) (A:Plane heading degrees gyro, radians) - rddg + dnor (&gt; L:Autopilot_TRK_set, degrees)
					(L:Autopilot_TRK_set, degrees) (&gt; L:Autopilot_TRK_set_hist, number) }
				
				(L:AB_AP_HDGTRK, number) 1 ==
				(L:AB_LOC_CAPTURE, bool) 0 == &amp;&amp;
				if{
					(L:Autopilot_TRK_set, degrees) (A:GPS GROUND MAGNETIC TRACK, radians) (A:Plane heading degrees gyro, radians) - rddg - dnor (&gt; L:AB_AP_HDG_Select, number)
					(L:AB_AP_HDG_Select, number) (&gt; L:AB_AP_HDG_Select_hist, number) }
				
				(A:SIM ON GROUND, bool) 1 ==
				(L:FBWMODE,number) 1 == &amp;&amp;
				if{
					
					(A:GPS GROUND MAGNETIC TRACK, radians) (&gt; L:RWYTRACK, number)
					
					(L:AB_AP_HDGmode, number) 1 ==
					if{
						0 (&gt; L:FCU_Managed_HDGdisp_override, bool) }
					
					(L:FCU_Managed_HDGdisp_override, bool) 1 == 
					if{
						-1 (&gt; L:AB_AP_HDGmode_setDisp, number) }
					
					(L:AB_AP_HDGmode_setDisp, number) -1 == 
					if{
						1 (&gt; L:FCU_TO_set_HDG, bool) }
					els{
						0 (&gt; L:FCU_TO_set_HDG, bool) } }
				
				(L:FCU_TO_set_HDG, bool) 1 ==
				(A:SIM ON GROUND, bool) 0 == &amp;&amp;
				if{	
					
					(L:AB_AP_HDGmode, number) 0 != 
					if{
						0 (&gt; L:FCU_TO_set_HDG, bool) } }		
				
				<!-- FINAL APP MANAGMENT -->
				(L:MCDUAppType, number) 2 &gt;= 
				(L:AB_AP_LOC2, number) 1 == &amp;&amp;
				if{						
					1 (&gt; L:FCU_FINALmd, bool) }
				els{
					0 (&gt; L:FCU_FINALmd, bool) }
				
				
				(L:FCU_FINALmd, bool) (L:FCU_FINALmd_hist, bool) !=
				if{
					
					(L:FCU_FINALmd, bool) 1 == 
					(L:MCDU_FLT_PHS, number) 5 == &amp;&amp;
					if{
						0 (&gt; L:AB_AP_KNOBALT, bool)
						1 (&gt; L:AP_AP_ALT_Mode99, number)
						1 (&gt; L:AP_AP_ALT_Mode, number) }
					
					(L:FCU_FINALmd, bool) (&gt; L:FCU_FINALmd_hist, bool) }
				
				<!--Disable other AP when APPR not activated-->
				(L:AB_AP_AP1, number) 1 ==
				(L:AB_AP_AP2, number) 1 == &amp;&amp;

				(L:AB_AP_LOC2, number) 0 == &amp;&amp;
				if{
					0 (&gt; L:AB_AP_AP2, number) }
				
				<!--ALT-->
				(L:AB_AP_VSlevel, number) 1 ==
				(L:AB_AP_VSlevel, number) -1 == ||
				if{
					
					(L:AB_AP_VSlevel, number) -1 ==
					if{							
						0 (&gt; L:AB_AP_VSlevel, number)
						
						(L:AB_AP_KNOBALT, bool) 0 ==
						(L:FCU_Managed_VSdisp_override, bool) 0 == &amp;&amp;
						if{
							(A:Vertical speed,feet per minute) 10 / near 10 / (&gt; L:AB_AP_VS_Select2, number)
							(A:Vertical speed,feet per minute) 60 / (A:AIRSPEED TRUE,knots) 1.68781 * / asin rddg 10 * near 10 / (&gt; L:AB_AP_FPA_Select2, number) }
						
						(L:AB_LOC_CAPTURE, bool) 1 ==
						(L:AB_AP_LOC2, number) 1 == &amp;&amp;
						
						(L:MCDUAppType, number) 2 &gt;= 
						(L:MCDU_FLT_PHS, number) 5 == &amp;&amp; 
						(L:AB_AP_LOC2, number) 1 == &amp;&amp; ||
						if{
							
							0 (&gt; L:AB_AP_LOC2, number)
							1 (&gt; L:AB_AP_LOC1, number)
							
							(A:Vertical speed,feet per minute) 10 / near 10 / (&gt; L:AB_AP_VS_Select2, number)
							(A:Vertical speed,feet per minute) 60 / (A:AIRSPEED TRUE,knots) 1.68781 * / asin rddg 10 * near 10 / (&gt; L:AB_AP_FPA_Select2, number) }
						
					}
					
					(L:AB_AP_VSlevel, number) 1 ==
					if{
						0 (&gt; L:AB_AP_VS_Select2, number)
						0 (&gt; L:AB_AP_VSlevel, number)
						0 (&gt; L:AB_AP_FPA_Select2, number) }
					
					(L:AB_AP_ALT_Selected, number) (L:AB_AP_ALT_Select, number) !=
					if{
						1 (&gt; L:AB_AP_KNOBALT, bool) }
					
					(L:AB_AP_ALT_Selected_LOG, number) (&gt; L:AB_AP_ALT_Selected, number)
					
					(L:AP_AP_ALT_Capture, number) 1 ==
					if{
						0 (&gt; L:AP_AP_ALT_Capture, number) }
					
					1 (&gt; L:AB_AP_ALT_CaptureVSInhibit, number)
					
					(L:AB_AP_ALT_Selected, number) (&gt; L:AB_AP_ALT_Caphist, number)
					
					(L:AB_AP_LOC2, number) 1 ==
					(L:MCDUAppType, number) 2 &gt;= &amp;&amp;
					(L:MCDUAppType, number) 5 != &amp;&amp;
					(L:MCDU_FLT_PHS, number) 5 == &amp;&amp;
					(L:MCDU_WPT_DEST_Dist,number) (L:MCDU_FAF2Dest_Dist, number) &lt;= &amp;&amp;
					if{
						0 (&gt; L:AB_AP_LOC2, number)
					}
					
					0 (&gt;L:AP_FADEC_IDLTHR,number)
					0 (&gt; L:AP_AP_ALT_Mode, number)   
					0 (&gt; L:AP_AP_ALT_Mode99, number)
					0 (&gt; L:AB_AP_SRSmode, number)
					1 (&gt; L:AB_AP_KNOBALT, bool) }
				
				(L:AB_AP_ALTmode, number) -1 ==
				if{
					0 (&gt; L:AB_AP_SRSmode, number)
					0 (&gt; L:AB_AP_ALT_CaptureVSInhibit, number)
					0 (&gt; L:AB_AP_KNOBALT, bool)
					0 (&gt;	L:MCDU_Early_DES, number)
					0 (&gt; L:AB_APSTP_DES, number)
					0 (&gt; L:AP_AP_ALT_Capture, number) 
					(L:AB_AP_ALT_Selected, number) (&gt; L:AB_AP_ALT_Caphist, number)
					
					-1 (&gt; L:AP_AP_ALT_Mode99, number)
					-1 (&gt; L:AP_AP_ALT_Mode, number) }
				
				(L:AB_AP_ALTmode, number) 1 ==
				(L:MCDU_FLT_PHS, number) 6 != &amp;&amp;
				(L:AB_AP_HDGmode_setDisp, number) -1 != &amp;&amp;
				if{
					0 (&gt; L:AB_AP_ALT_CaptureVSInhibit, number)
					0 (&gt; L:AB_AP_KNOBALT, bool)
					0 (&gt; L:AP_AP_ALT_Capture, number) 
					(L:AB_AP_ALT_Selected, number) (&gt; L:AB_AP_ALT_Caphist, number)
					
					1 (&gt; L:AP_AP_ALT_Mode99, number)
					1 (&gt; L:AP_AP_ALT_Mode, number)						
					
				}
				
				(L:MCDU_FLT_PHS, number) 3 ==
				(L:AB_AP_ALT_Select, number) (A:INDICATED ALTITUDE, feet) - 0 &lt; &amp;&amp;
				(L:MCDU_WPT_DEST_Dist,number) 200 &lt;= 
				(L:AB_AP_ALT_Select, number) 20000 &lt;= || &amp;&amp;
				(A:SIM ON GROUND, bool) 0 == &amp;&amp;
				(L:AB_AP_ALTmode, number) 1 == 
				(L:AB_AP_ALTmode, number) -1 == ||				
				(L:AB_AP_VSlevel, number) 1 == ||
				(L:AB_AP_VSlevel, number) -1 == || &amp;&amp;
				(L:FADEC_Load, bool) 1 == &amp;&amp;
				if{
					1 (&gt;	L:MCDU_Early_DES, number)
					
					(L:AB_AP_ALT_Select, number) (&gt; L:AB_AP_ALT_Selected_LOG, number)
					(L:AB_AP_ALT_Selected_LOG, number) (&gt; L:AB_AP_ALT_Selected, number)
					(L:AB_AP_ALT_Select, number) (&gt; L:AB_AP_ALT_SelectedLast, number) 
					
					(L:AP_VDEV_DIF, number) -200 &lt;
					(L:AB_AP_ALTmode, number) 1 == &amp;&amp;
					if{
						1 (&gt;	L:MCDU_Early_Vnav, number) } }
				els{
					(L:MCDU_FLT_PHS, number) 3 &lt;=
					if{
						0 (&gt;	L:MCDU_Early_DES, number) } }
				
				(L:AB_AP_LoadVar, bool) 0 ==
				if{
					1 (&gt; L:AB_AP_LoadVar, bool)
					1000 (&gt;L:AB_AP_ALT_Select, number)
					1 (&gt; L:AP_AP_ALT_Mode99, number) }
				
				
				(L:AB_AP_HDGmode_setDisp, number) -1 ==
				(L:AP_AP_ALT_Mode99, number) 1 == &amp;&amp;
				(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &gt; &amp;&amp;
				if{
					(L:MCDU_FLT_PHS, number) 4 ==
					(L:MCDU_FLT_PHS, number) 5 == ||
					if{
						
						(A:Vertical speed,feet per minute) 10 / near 10 / (&gt; L:AB_AP_VS_Select2, number)
						0 (&gt; L:AP_AP_ALT_Mode99, number)
						0 (&gt; L:AP_AP_ALT_Mode, number)   
						1 (&gt; L:AB_AP_KNOBALT, bool) }
					els{						
						-1 (&gt; L:AP_AP_ALT_Mode99, number)
						-1 (&gt; L:AP_AP_ALT_Mode, number) } }
				
				(L:MCDU_FLT_PHS, number) 0 ==
				(L:MCDU_THR_ACC, number) 0 != &amp;&amp;
				(A:SIM ON GROUND, bool) 1 == &amp;&amp;
				if{
					(L:AB_AP_ALT_Select, number) (L:MCDU_THR_ACC, number) &gt;
					if{
						0 (&gt; L:AB_AP_KNOBALT, bool)
						1 (&gt; L:AP_AP_ALT_Mode99, number)
						1 (&gt; L:AP_AP_ALT_Mode, number) }
					els{
						0 (&gt; L:AP_AP_ALT_Mode, number)
						0 (&gt; L:AP_AP_ALT_Mode99, number) } }
				
				<!--(L:MCDU_FLT_PHS, number) 2 ==-->
				(L:AP_AP_ALT_Mode99, number) 1 ==
				(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
				if{
					(L:MCDU_FLT_PHS, number) 0 ==
					(L:MCDU_THR_ACC, number) 0 != &amp;&amp;
					(L:AB_AP_ALT_Select, number) (L:MCDU_THR_ACC, number) &gt; &amp;&amp;
					if{
						1 (&gt; L:AP_AP_ALT_Mode, number) }
					
						(L:AB_AP_ALT_Select, number) (&gt; L:AB_AP_ALT_Selected_LOG, number)
					
					(L:MCDU_WPT_ALTCSTR, number) 0 !=
					(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
					if{
												
						<!--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-->
						<!--XXXXXX ALT PRIORITY HANDLING COND 2/3 XXXXXXX-->
						<!--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-->
						
						(L:MCDU_FLT_PHS, number) 2 &lt;=
						if{
							
							(L:AB_AP_ALT_Select, number) (&gt; L:AB_AP_ALTCSTR, number)
							
							(L:MCDU_WPT_ALTCSTR_COND4, number) 0 !=
							(L:MCDU_WPT_ALTCSTR_COND42, number) 0 != &amp;&amp;
							(L:MCDU_WPT_ALTCSTR_COND4, number) (L:MCDU_WPT_ALTCSTR_COND42, number) &lt; &amp;&amp;
							(L:MCDU_WPT_ALTCSTR_COND4_Dist, number) (L:AB_AP_DIST2TOC2, number) &lt;= &amp;&amp;
							if{
								(L:AB_AP_ALTCSTR, number) (L:MCDU_WPT_ALTCSTR_COND4, number) max (L:AB_AP_ALT_Select, number) min (&gt; L:AB_AP_ALTCSTR, number) }
							
							(L:MCDU_WPT_ALTCSTR_COND4, number) 0 !=
							(L:MCDU_WPT_ALTCSTR_COND42, number) 0 != &amp;&amp;
							(L:MCDU_WPT_ALTCSTR_COND42, number) (L:MCDU_WPT_ALTCSTR_COND4, number) &lt; &amp;&amp;
							(L:MCDU_WPT_ALTCSTR_COND4_Dist, number) (L:AB_AP_DIST2TOC2, number) &lt;= &amp;&amp;
							if{
								(L:AB_AP_ALTCSTR, number) (L:MCDU_WPT_ALTCSTR_COND42, number) max (L:AB_AP_ALT_Select, number) min (&gt; L:AB_AP_ALTCSTR, number) }
							
							(L:MCDU_WPT_ALTCSTR_COND2, number) 0 !=
							(L:MCDU_WPT_ALTCSTR_COND2_Dist, number) (L:AB_AP_DIST2TOC2, number) &lt;= &amp;&amp;
							if{
								(L:AB_AP_ALTCSTR, number) (L:MCDU_WPT_ALTCSTR_COND2, number) max (L:AB_AP_ALT_Select, number) min (&gt; L:AB_AP_ALTCSTR, number) }
							
							(L:MCDU_WPT_ALTCSTR_COND4, number) 0 !=
							(L:MCDU_WPT_ALTCSTR_COND42, number) 0 != &amp;&amp;
							(L:MCDU_WPT_ALTCSTR_COND4, number) (L:MCDU_WPT_ALTCSTR_COND42, number) &gt; &amp;&amp;
							(L:MCDU_WPT_ALTCSTR_COND4_Dist, number) (L:AB_AP_DIST2TOC2, number) &lt;= &amp;&amp;
							if{
								(L:AB_AP_ALTCSTR, number) (L:MCDU_WPT_ALTCSTR_COND4, number) min (&gt; L:AB_AP_ALTCSTR, number) }
							
							(L:MCDU_WPT_ALTCSTR_COND4, number) 0 !=
							(L:MCDU_WPT_ALTCSTR_COND42, number) 0 != &amp;&amp;
							(L:MCDU_WPT_ALTCSTR_COND42, number) (L:MCDU_WPT_ALTCSTR_COND4, number) &gt; &amp;&amp;
							(L:MCDU_WPT_ALTCSTR_COND4_Dist, number) (L:AB_AP_DIST2TOC2, number) &lt;= &amp;&amp;
							if{
								(L:AB_AP_ALTCSTR, number) (L:MCDU_WPT_ALTCSTR_COND42, number) min (&gt; L:AB_AP_ALTCSTR, number) }
							
							(L:MCDU_WPT_ALTCSTR_COND3, number) 0 !=
							(L:MCDU_WPT_ALTCSTR_COND3_Dist, number) (L:AB_AP_DIST2TOC2, number) &lt;= &amp;&amp;
							if{
								(L:AB_AP_ALTCSTR, number) (L:MCDU_WPT_ALTCSTR_COND3, number) min (&gt; L:AB_AP_ALTCSTR, number) }
							
							(L:MCDU_WPT_ALTCSTR_COND1, number) 0 !=
							(L:AB_AP_ALT_Select, number) (L:MCDU_WPT_ALTCSTR_COND1, number) &gt; &amp;&amp;
							(L:MCDU_WPT_ALTCSTR_COND1_Dist, number) (L:AB_AP_DIST2TOC2, number) &lt;= &amp;&amp;
							if{
								(L:AB_AP_ALTCSTR, number) (L:MCDU_WPT_ALTCSTR_COND1, number) min (&gt; L:AB_AP_ALTCSTR, number) }
							
						}
						
						(L:MCDU_FLT_PHS, number) 4 &gt;=
						if{
							
							(L:AB_AP_ALT_Select, number) (&gt; L:AB_AP_ALTCSTR, number)
							
							(L:MCDU_WPT_ALTCSTR_COND1_DES, number) 0 !=
							(L:AB_AP_ALT_Select, number) (L:MCDU_WPT_ALTCSTR_COND1_DES, number) &lt; &amp;&amp;
							if{
								(L:AB_AP_ALTCSTR, number) (L:MCDU_WPT_ALTCSTR_COND1_DES, number) max (&gt; L:AB_AP_ALTCSTR, number) }
							
							(L:MCDU_WPT_ALTCSTR_COND2_DES, number) 0 !=								
							if{
								(L:AB_AP_ALTCSTR, number) (L:MCDU_WPT_ALTCSTR_COND2_DES, number) max (&gt; L:AB_AP_ALTCSTR, number) }
							
							(L:MCDU_WPT_ALTCSTR_COND3_DES, number) 0 !=
							if{
								(L:AB_AP_ALTCSTR, number) (L:MCDU_WPT_ALTCSTR_COND3_DES, number) min (L:AB_AP_ALT_Select, number) max (&gt; L:AB_AP_ALTCSTR, number) }
							
							(L:MCDU_WPT_ALTCSTR_COND4_DES, number) 0 !=
							if{
								(L:AB_AP_ALTCSTR, number) (L:COND4_CALCOPT, number) max (&gt; L:AB_AP_ALTCSTR, number) } }
						
						(L:MCDU_WPT_ALTCSTR_COND1, number) 0 !=
						(L:MCDU_WPT_ALTCSTR_COND2, number) 0 != ||
						(L:MCDU_WPT_ALTCSTR_COND3, number) 0 != ||
						(L:MCDU_WPT_ALTCSTR_COND4, number) 0 != ||
						if{
							(L:AB_AP_ALTCSTR, number) (&gt; L:AB_AP_ALT_Selected_LOG, number) } 
					}
					
				} <!--mode99 cLOSE-->
				els{
					
					(L:AB_AP_ALT_Select, number) (&gt; L:AB_AP_ALT_Selected_LOG, number)			
					(L:AB_AP_ALT_Select, number) (&gt; L:AB_AP_ALT_SelectedLast, number) }
				
				(L:AB_AP_ALTmode, number) 0 !=
				(L:AP_AP_ALT_Mode, number) 0 != ||
				(L:AB_AP_SRSmode, number) 1 == ||
				
				(L:AB_AP_ALT_SelectedLast, number) (L:AB_AP_ALT_Selected, number) !=
				(L:AP_AP_ALT_Mode, number) 0 == &amp;&amp;
				(L:AP_AP_ALT_Mode99, number) 1 == &amp;&amp; ||
				
				(L:AB_AP_KNOBALT, bool) 1 == ||
				if{
					
					(L:AB_AP_ALT_Selected_LOG, number) (&gt; L:AB_AP_ALT_Selected, number)
					(L:AB_AP_ALT_Select, number) (&gt; L:AB_AP_ALT_SelectedLast, number) }
				
				<!-- Initiate Des -->
				(L:MCDU_FLT_PHS, number) 3 ==
				(L:AB_AP_ALTmode, number) 0 != &amp;&amp;
				
				(L:MCDU_WPT_DEST_Dist,number) 200 &lt;= 
				(L:AB_AP_ALT_Select, number) 20000 &lt;= || &amp;&amp;
				if{ 
					(L:AB_AP_ALT_Select, number) (&gt; L:AB_AP_ALT_Selected_LOG, number)
					(L:AB_AP_ALT_Selected_LOG, number) (&gt; L:AB_AP_ALT_Selected, number)
					(L:AB_AP_ALT_Select, number) (&gt; L:AB_AP_ALT_SelectedLast, number) } 
				
				<!-- NEW CRZ ALT Update -->
				(L:MCDU_FLT_PHS, number) 2 ==
				(L:AB_AP_ALTmode, number) 0 != &amp;&amp;
				(L:MCDU_Cruisealt, number) (L:AB_AP_ALT_Select, number) &lt; &amp;&amp;
				if{
					(L:AB_AP_ALT_Select, number) (&gt; L:MCDU_NEWCRZALT, number) } 

				(L:MCDU_FLT_PHS, number) 3 == 
				(L:AB_AP_ALTmode, number) 0 != &amp;&amp;
				if{
					(L:MCDU_Cruisealt, number) (L:AB_AP_ALT_Select, number) &gt;
					(L:MCDU_WPT_DEST_Dist,number) 200 &gt; &amp;&amp;
					(L:AB_AP_ALT_Select, number) 20000 &gt; &amp;&amp;
					if{
						(L:AB_AP_ALT_Select, number) (&gt; L:MCDU_NEWCRZALT, number) 
						(L:AB_AP_ALTmode, number) 0 max (&gt; L:AB_APSTP_DES, number) }
					
					(L:MCDU_Cruisealt, number) (L:AB_AP_ALT_Select, number) &lt;
					if{
						0 (&gt; L:AB_APSTP_DES, number)
						(L:AB_AP_ALT_Select, number) (&gt; L:MCDU_NEWCRZALT, number) }
				} 
				
				(L:MCDU_FLT_PHS, number) 3 == 
				(L:MCDU_Cruisealt, number) (L:AB_AP_ALT_Select, number) == &amp;&amp;
				if{
					(L:AB_AP_ALT_Select, number) (&gt; L:AB_AP_ALT_Selected_LOG, number)
					(L:AB_AP_ALT_Selected_LOG, number) (&gt; L:AB_AP_ALT_Selected, number)
					(L:AB_AP_ALT_Select, number) (&gt; L:AB_AP_ALT_SelectedLast, number) } 
				
				(L:AB_AP_ALT_Selected, number) (L:AB_AP_ALT_Selected_HIS, number) !=
				if{
					(L:AB_AP_ALT_Selected, number) (&gt; L:AB_AP_ALT_Selected_HIS, number)
					0 (&gt; L:AP_AP_ALT_Capture_SM, number)
					0 (&gt; L:AP_AP_ALT_Capture, number) }
				
				<!-- Reversion from OP CLB when alt is lower than current height, reversion from OP DEs when alt is higher than current height -->
				(L:AP_AP_ALT_Mode99, number) -1 ==				
				(L:AB_AP_ALT_Selected_LOG, number) (L:AB_AP_ALT_Selected_LOGhis99, number) != &amp;&amp;
				(L:AP_AP_ALT_Capture, number) 0 == &amp;&amp;
				
				(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) &lt;
				(L:AB_AP_ALT_Selected_LOGhis99, number) (A:INDICATED ALTITUDE, feet) &gt; &amp;&amp;
				
				(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) &gt;
				(L:AB_AP_ALT_Selected_LOGhis99, number) (A:INDICATED ALTITUDE, feet) &lt; &amp;&amp; || &amp;&amp;
				if{				
					0 (&gt; L:AP_AP_ALT_Mode, number)   
					0 (&gt; L:AP_AP_ALT_Mode99, number)   
					(A:Vertical speed,feet per minute) 10 / near 10 / (&gt; L:AB_AP_VS_Select2, number)							
					1 (&gt; L:AB_AP_KNOBALT, bool) }
				
				<!-- RESET VS XXXX -->
				(L:AP_AP_ALT_Capture, number) (L:AP_AP_ALT_Capture_HIS, number) !=
				if{
					
					(L:AP_AP_ALT_Capture, number) 1 ==
					if{
						0 (&gt; L:FCU_Managed_VSdisp_override, bool)
						0 (&gt; L:FCU_Managed_VSoverride_start, bool)
						0 (&gt; L:FCU_Managed_VSoverride_val, number)
					}
					
					(L:AP_AP_ALT_Capture, number) (&gt; L:AP_AP_ALT_Capture_HIS, number) }
				
				(L:MCDUAppType, number) 2 &gt;= 
				(L:MCDU_FLT_PHS, number) 5 == &amp;&amp;								
				(L:AB_AP_LOC2, number) 1 == &amp;&amp;
				(L:AP_VDEV_DIF, number) -100 &gt; &amp;&amp;
				if{
					0 (&gt; L:AP_AP_ALT_Capture_SM, number)
					0 (&gt; L:AP_AP_ALT_Capture, number) }
				
				<!--Altitude aquire and hold -->
				(L:AB_AP_NAV_GS, bool) 0 ==
				(L:MCDUAppType, number) 1 &lt;= &amp;&amp;										
				(L:AB_AP_LOC2, number) 1 == &amp;&amp;
				
				(L:AB_AP_KNOBALT, bool) 1 == ||
				
				(L:AB_AP_LOC2, number) 0 == ||
				
				(L:MCDUAppType, number) 2 &gt;= 
				(L:MCDU_FLT_PHS, number) 4 == &amp;&amp; ||
				
				(L:MCDUAppType, number) 2 &gt;= 
				(L:MCDU_FLT_PHS, number) 5 == &amp;&amp;								
				(L:AP_VDEV_DIF, number) -100 &lt; &amp;&amp; ||
				
				(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) &lt;
				(L:AB_AP_VS_Select3, number) 0 &lt; &amp;&amp;					
				(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) &gt;
				(L:AB_AP_VS_Select3, number) 0 &gt; &amp;&amp; || &amp;&amp; 				
				
				(L:AP_AP_ALT_Capture, number) 1 == || 
				
				(L:AB_AP_ALT_CaptureVSInhibit, number) 0 == &amp;&amp;		
				if{
					
					(L:AP_AP_ALT_Mode, number) 0 == &amp;&amp;
					(L:AB_AP_LOC2, number) 0 == &amp;&amp;
					
					(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - -400 &lt; 
					(L:MCDU_FLT_PHS, number) 5 == &amp;&amp; 
					
					(L:AP_AP_ALT_Capture, number) 0 ==
					(L:MCDU_FLT_PHS, number) 5 != &amp;&amp;
					(L:MCDU_FLT_PHS, number) 0 != &amp;&amp;  ||
					
					if{
						(L:AP_AP_ALT_Mode99, number) (&gt; L:AP_AP_ALT_Mode, number) }
					
					
					(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) &lt;
					(A:Vertical speed,feet per minute) (L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - / abs 4.25 &gt; &amp;&amp;
					(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) &gt;
					(A:Vertical speed,feet per minute) (L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - abs / 4.25 &gt; &amp;&amp; ||
					
					(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - abs 20 &gt;= &amp;&amp;
					
					(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - abs 100 &lt;= ||					
					(L:AP_AP_ALT_Capture, number) 1 == || 
					if{
						0 (&gt; L:AB_AP_KNOBALT, bool)
						0 (&gt; L:AB_APSTP_DES, number)
						0 (&gt; L:AP_AP_ALT_Mode, number)
						1 (&gt; L:AP_AP_ALT_Capture, number)
						0 (&gt;L:AP_FADEC_IDLTHR,number)
						0 (&gt;L:AP_FADEC_CLBTHR,number) 
						

						(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - 4.25 * 100 / (&gt;L:AB_AP_VS_Select3, number)
						
						(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - abs 20 &lt;
						
						(L:MCDU_Cruisealt, number) (A:INDICATED ALTITUDE, feet) - abs 50 &lt;
						(L:AB_AP_ALT_Selected, number) (L:MCDU_Cruisealt, number) == &amp;&amp; ||
						if{
							1 (&gt; L:AP_AP_ALT_Capture, number)
							1 (&gt; L:AP_AP_ALT_Capture_SM, number)
							
							(L:AB_AP_ALT_Selected, number) (&gt; L:AB_AP_ALT_Caphist, number)
							
							(L:AB_AP_VSlevel, number) 1 ==
							(L:AB_AP_VSlevel, number) -1 == ||
							if{
								(L:AB_AP_ALT_Selected, number) (L:AB_AP_ALT_Select, number) ==
								if{
									0 (&gt; L:AB_AP_KNOBALT, bool) } 
							}
							
							<!-- 0 (&gt;L:AB_AP_VS_Select3, number) -->	}
						
					}
					
				}
				
				(L:AB_AP_ALT_Caphist, number) (A:INDICATED ALTITUDE, feet) - abs 20 &lt;
				
				(L:MCDU_Cruisealt, number) (A:INDICATED ALTITUDE, feet) - abs 50 &lt;
				(L:AB_AP_ALT_Selected, number) (L:MCDU_Cruisealt, number) == &amp;&amp; ||
				
				(L:AP_AP_ALT_Capture, number) 1 == &amp;&amp;
				if{
					(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - 4.25 * 100 / (&gt;L:AB_AP_VS_Select3, number)								
				}
				
				<!-- RESET VS ALTCapture Inhibit -->
				(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - abs 100 &gt;
				(L:AB_AP_ALT_CaptureVSInhibit, number) 1 == &amp;&amp;
				if{
					0 (&gt; L:AB_AP_ALT_CaptureVSInhibit, number) }
				
				<!-- Revert to VS when alt change in ALT* -->
				(L:AB_AP_ALT_Selected_LOG, number) (L:AB_AP_ALT_Selected_LOGhis99, number) !=
				if{
					
					(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) &lt;
					(L:AB_AP_ALT_Selected_LOGhis99, number) (A:INDICATED ALTITUDE, feet) &gt; &amp;&amp;
					
					(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) &gt;
					(L:AB_AP_ALT_Selected_LOGhis99, number) (A:INDICATED ALTITUDE, feet) &lt; &amp;&amp; || 
					
					(L:AB_AP_KNOBALT, bool) 0 != &amp;&amp;
					
					(L:AP_AP_ALT_Capture, number) 1 ==
					(L:AP_AP_ALT_Capture_SM, number) 0 == &amp;&amp; ||
					
					
					if{
						(A:Vertical speed,feet per minute) 10 / near 10 / (&gt; L:AB_AP_VS_Select2, number)
						0 (&gt; L:AP_AP_ALT_Mode, number)    
						1 (&gt; L:AB_AP_KNOBALT, bool)
						0 (&gt; L:AP_AP_ALT_Capture_SM, number)
						0 (&gt; L:AP_AP_ALT_Capture, number) }
					
					(L:AB_AP_ALT_Selected_LOG, number) (&gt; L:AB_AP_ALT_Selected_LOGhis99, number) }
				
				(L:AB_AP_ALTSTEP, number) 1 ==
				(L:AB_AP_ALT_Select, number) (L:AB_AP_ALT_Select_hist, number) - 0 != &amp;&amp;
				(L:AB_AP_ALT_Select, number) 1000 / near 1000 * (L:AB_AP_ALT_Select, number) != &amp;&amp;
				if{
					(L:AB_AP_ALT_Select, number) 1000 / near 1000 * (&gt; L:AB_AP_ALT_Select, number)
					(L:AB_AP_ALT_Select, number) (L:AB_AP_ALT_Select_hist, number) - 1000 &gt;
					if{
						(L:AB_AP_ALT_Select, number) 1000 - (&gt; L:AB_AP_ALT_Select, number)
					}
					(L:AB_AP_ALT_Select, number) (L:AB_AP_ALT_Select_hist, number) - -1000 &lt;
					if{
						(L:AB_AP_ALT_Select, number) 1000 + (&gt; L:AB_AP_ALT_Select, number)
					}
				}
				(L:AB_AP_ALT_Select, number) (&gt; L:AB_AP_ALT_Select_hist, number)
				
				(L:MCDU_FLT_PHS, number) 0 ==
				(L:AP_AP_ALT_Mode, number) 1 ==
				(L:AP_AP_ALT_Mode99, number) 1 == || &amp;&amp;
				(A:SIM ON GROUND, bool) 0 == &amp;&amp;
				if{
					0 (&gt; L:AP_AP_ALT_Mode99, number)
					<!--MCDU NOT PROGRAM VNAV DISABLE-->
					(L:AB_AP_ALT_Selected, number) (L:AB_AP_ALT_Select, number) !=
					if{
						1 (&gt; L:AB_AP_KNOBALT, bool) }
					(L:AB_AP_ALT_Select, number) (&gt; L:AB_AP_ALT_Selected, number)
					0 (&gt; L:AP_AP_ALT_Mode, number) }
				
				(L:AP_AP_ALT_Mode, number) -1 ==
				(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - abs 25 &gt; &amp;&amp;
				(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
				if{
					
					<!--THR CLB/IDLE-->
					(L:Throttle_ani_fix_L, number) 25 ==
					(L:Throttle_ani_fix_R, number) 25 == ||
					(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - 0 &gt; &amp;&amp;
					if{
						0 (&gt;L:AP_FADEC_IDLTHR,number)
						1 (&gt;L:AP_FADEC_CLBTHR,number) }
					
					(L:Throttle_ani_fix_L, number) 25 ==
					(L:Throttle_ani_fix_R, number) 25 == ||
					(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - 0 &lt; &amp;&amp;
					if{
						0 (&gt;L:AP_FADEC_CLBTHR, number)
						1 (&gt;L:AP_FADEC_IDLTHR, number) } }
				
				<!--VNAV -->
				(A:Airspeed indicated, knots) (A:Airspeed mach, machs) / (&gt; L:AB_AP_MACHTAS, number)
				(L:MCDU_SEL_SPD, number) (L:MCDU_SEL_Mach, number) / (&gt; L:AB_AP_SpdTAS, number)
				
				(A:Airspeed indicated, knots) (A:Airspeed mach, machs) / (&gt; L:AB_AP_MACHTAS_DES, number)
				(L:MCDU_ECON_SPD_DES, number) (L:MCDU_SEL_Mach, number) / (&gt; L:AB_AP_SpdTAS_DES, number)
				
				(L:MCDU_WPT_SPDCSTRlast, number) 0 ==
				(L:MCDU_FLT_PHS, number) 0 == ||
				if{
					400 (&gt; L:MCDU_WPT_SPDCSTRlast, number) }
				
				(L:AB_AP_SPDMACH, number) 1 ==
				if{
					(A:Airspeed indicated, knots) (A:Airspeed mach, machs) / (L:AB_AP_Mach_Selected, number) * near (&gt; L:AB_AP_SPEED_Selected, number)
					(A:Airspeed indicated, knots) (A:Airspeed mach, machs) / (L:AB_AP_Mach_Selected, number) * near (&gt; L:AB_AP_SPEED_Select, number) }
								
				(L:AB_AP_SPDmode_set, number) 0 &gt;= 
				(L:AB_AP_HDGmode_setDisp, number) 0 &gt; &amp;&amp;
				if{
					
					<!--SRS-->
					(L:MCDU_FLT_PHS, number) 2 &lt;=
					if{
						
						(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &lt;
						if{
							
							<!--THR CLB/IDLE-->
							(L:Throttle_ani_fix_L, number) 25 ==
							(L:Throttle_ani_fix_R, number) 25 == ||
							(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - abs 400 &gt; &amp;&amp;
							(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
							if{
								0 (&gt;L:AP_FADEC_IDLTHR,number)
								1 (&gt;L:AP_FADEC_CLBTHR,number) }
							
							(L:MCDU_V2, number) 0 ==
							if{
								0 (&gt; L:AB_AP_SRSmode, number) }
							els{
								1 (&gt; L:AB_AP_SRSmode, number)
								(L:MCDU_V2, number) 10 + (&gt; L:AB_AP_SPEED_Selected, number) }
						}
						
						els{
							0 (&gt; L:AB_AP_SRSmode, number) }
						
					}
					
					<!--CLB-->
					(L:MCDU_FLT_PHS, number) 2 ==
					if{
						
						1 (&gt; L:DESUNARM, number)
						
						
						<!--MACH BUTTON SWITCH-->
						(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &gt;
						(L:AB_AP_SpdTAS, number) (L:AB_AP_MACHTAS, number) &gt;= &amp;&amp;
						(L:AB_AP_SPDMACH, number) 0 == &amp;&amp;
						(L:AB_AP_SPDmode_set, number) 0 &gt;= &amp;&amp;
						if{
							1 (&gt; L:AB_AP_SPDMACH, number)
							0 (&gt; L:AB_AP_SPDMACH_but, bool)
							0 (&gt; L:AB_AP_SPDMACH_but_timout, number) }
						
						(L:AP_AP_ALT_Mode99, number) 1 ==
						if{
							<!--THR CLB/IDLE-->
							(L:Throttle_ani_fix_L, number) 25 ==
							(L:Throttle_ani_fix_R, number) 25 == ||
							(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - abs 400 &gt; &amp;&amp;
							(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
							if{
								0 (&gt;L:AP_FADEC_IDLTHR,number)
								1 (&gt;L:AP_FADEC_CLBTHR,number) } }
						
						(L:MCDU_WPT_SPDCSTR_2, number) 0 !=
						(L:MCDU_WPT_SPDCSTR_2_DIST, number) (L:AB_AP_DIST2TOC2, number) &lt;= &amp;&amp;
						<!--(L:MCDU_TMP_WPT_SPDCSTR_COND, number) 0 != &amp;&amp;-->
						if{
							
							(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &gt;
							(A:INDICATED ALTITUDE, feet) (L:MCDU_Cruisealt, number) &lt; &amp;&amp;
							(A:INDICATED ALTITUDE, feet) 10100 &lt; &amp;&amp;
							if{
								(L:MCDU_SEL_SPD, number) (L:MCDU_WPT_SPDCSTR_2, number) min <!-- (L:ElevatorVmoCalc, number) 15 - min --> 250 min (&gt; L:AB_AP_SPEED_Selected, number) }
							
							<!--10000 FT RESTR-->
							(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &gt;
							(A:INDICATED ALTITUDE, feet) (L:MCDU_Cruisealt, number) &lt; &amp;&amp;
							(A:INDICATED ALTITUDE, feet) 10100 &gt; &amp;&amp;
							if{
								(L:MCDU_SEL_SPD, number) (L:MCDU_WPT_SPDCSTR_2, number) min (&gt; L:AB_AP_SPEED_Selected, number)	 }
							
							<!--MACH/IAS Switch-->
							(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &gt;
							(A:INDICATED ALTITUDE, feet) (L:MCDU_Cruisealt, number) &lt; &amp;&amp;
							if{
								(L:MCDU_SEL_Mach, number) (&gt; L:AB_AP_Mach_Selected, number)
							} }
						
						els{
							
							(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &gt;
							(A:INDICATED ALTITUDE, feet) (L:MCDU_Cruisealt, number) &lt; &amp;&amp;
							(A:INDICATED ALTITUDE, feet) 10100 &lt; &amp;&amp;
							if{
								(L:MCDU_SEL_SPD, number) <!-- (L:ElevatorVmoCalc, number) 15 - min --> 250 min (&gt; L:AB_AP_SPEED_Selected, number)
							}
							
							<!--10000 FT RESTR-->
							(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &gt;
							(A:INDICATED ALTITUDE, feet) (L:MCDU_Cruisealt, number) &lt; &amp;&amp;
							(A:INDICATED ALTITUDE, feet) 10100 &gt; &amp;&amp;
							if{
								(L:MCDU_SEL_SPD, number) (&gt; L:AB_AP_SPEED_Selected, number)
							}
							
							<!--MACH/IAS Switch-->
							(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &gt;
							(A:INDICATED ALTITUDE, feet) (L:MCDU_Cruisealt, number) &lt; &amp;&amp;
							if{
								(L:MCDU_SEL_Mach, number) (&gt; L:AB_AP_Mach_Selected, number)
							} }
						
					}
					
					<!--CRZ-->
					(L:MCDU_FLT_PHS, number) 3 ==
					if{
						(L:MCDU_WPT_SPDCSTRlast, number) 0 ==
						if{
							400 (&gt; L:MCDU_WPT_SPDCSTRlast, number) }
						
						(L:AP_AP_ALT_Capture_SM, number) 0 ==
						(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
						if{					
							
							<!--THR CLB/IDLE-->
							(L:Throttle_ani_fix_L, number) 25 ==
							(L:Throttle_ani_fix_R, number) 25 == ||
							(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - 0 &gt; &amp;&amp;
							if{
								0 (&gt;L:AP_FADEC_IDLTHR,number)
								1 (&gt;L:AP_FADEC_CLBTHR,number) }
							
							(L:Throttle_ani_fix_L, number) 25 ==
							(L:Throttle_ani_fix_R, number) 25 == ||
							(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - 0 &lt; &amp;&amp;
							if{
								0 (&gt;L:AP_FADEC_CLBTHR, number)
								1 (&gt;L:AP_FADEC_IDLTHR, number) }
							
							(L:AB_APSTP_DES, number) 1 ==
							(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
							if{ 
								0 (&gt;L:AP_FADEC_CLBTHR, number)
								0 (&gt;L:AP_FADEC_IDLTHR, number) } }
						
						(L:AP_AP_ALT_Mode99, number) 1 ==
						(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
						(L:AB_AP_ALT_Selected, number) (L:MCDU_Cruisealt, number) == &amp;&amp;
						(L:AP_AP_ALT_Capture_SM, number) 1 == &amp;&amp;
						if{
							0 (&gt; L:AP_AP_ALT_Mode99, number)
							0 (&gt; L:AP_FADEC_CLBTHR, number)
							0 (&gt; L:AP_FADEC_IDLTHR, number) }
						
						<!--MACH BUTTON SWITCH-->
						(L:AB_AP_SpdTAS, number) (L:AB_AP_MACHTAS, number) &lt;
						if{
							
							(A:INDICATED ALTITUDE, feet) 10100 &lt;
							if{
								(L:MCDU_SEL_SPD, number) (L:ElevatorVmoCalc, number) 15 - min 250 min (&gt; L:AB_AP_SPEED_Selected, number) }
							els{
								(L:MCDU_SEL_SPD, number) (&gt; L:AB_AP_SPEED_Selected, number) }
							
							0 (&gt; L:AB_AP_SPDMACH, number)
							0 (&gt; L:AB_AP_SPDMACH_but, bool)
							0 (&gt; L:AB_AP_SPDMACH_but_timout, number) }
						
						<!--MACH BUTTON SWITCH-->
						(L:AB_AP_SpdTAS, number) (L:AB_AP_MACHTAS, number) &gt;=
						if{
							(L:MCDU_SEL_Mach, number) (&gt; L:AB_AP_Mach_Selected, number)
							1 (&gt; L:AB_AP_SPDMACH, number)
							0 (&gt; L:AB_AP_SPDMACH_but, bool)
							0 (&gt; L:AB_AP_SPDMACH_but_timout, number) }
					}
					
					
					<!--DES-->
					(L:MCDU_FLT_PHS, number) 4 ==
					if{
						
						(L:MCDU_WPT_SPDCSTRlast, number) 0 ==
						if{
							400 (&gt; L:MCDU_WPT_SPDCSTRlast, number) }
						
						(L:MCDU_WPT_SPDCSTR, number) 0 !=
						(L:MCDU_ECON_SPD_DES, number) (L:MCDU_WPT_SPDCSTR_2, number) - 0 max 0.0001 * 2 pow 0.1251 (L:MCDU_ECON_SPD_DES, number) (L:MCDU_WPT_SPDCSTR_2, number) - 0 max * + 0.5052 + 1 + (L:MCDU_WPT_SPDCSTR_2_DIST, number) &gt;= &amp;&amp;
						(L:MCDU_WPT_SPDCSTRlast, number) 400 == &amp;&amp;
						if{
							(L:MCDU_WPT_SPDCSTR_2, number) (&gt; L:MCDU_WPT_SPDCSTRlast, number) }
						
						(L:MCDU_WPT_SPDCSTR, number) 0 !=
						(L:MCDU_WPT_SPDCSTRlast, number) (L:MCDU_WPT_SPDCSTR_2, number) - 0 max 0.0001 * 2 pow 0.1251 (L:MCDU_WPT_SPDCSTRlast, number) (L:MCDU_WPT_SPDCSTR_2, number) - 0 max * + 0.5052 + 1 + (L:MCDU_WPT_SPDCSTR_2_DIST, number) &gt;= &amp;&amp;
						(L:MCDU_WPT_SPDCSTRlast, number) 400 != &amp;&amp;
						if{
							(L:MCDU_WPT_SPDCSTR_2, number) (&gt; L:MCDU_WPT_SPDCSTRlast, number) }
						
						(L:AP_AP_ALT_Mode99, number) 1 ==
						(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
						<!--(L:MCDU_WPT_SPDCSTRlast, number) 0 == &amp;&amp;-->
						if{
							(L:MCDU_FLT_PHS, number) 4 &gt;=
							(L:AP_AP_ALT_Mode, number) -1 != &amp;&amp;
							
							(L:MCDU_Early_Vnav, number) 1 ==
							(L:AP_AP_ALT_Mode99, number) 1 == &amp;&amp; ||
							if{ 
								0 (&gt;L:AP_FADEC_CLBTHR, number)
								0 (&gt;L:AP_FADEC_IDLTHR, number) } }
						
						(L:MCDU_WPT_SPDCSTRlast, number) 0 !=
						<!--(L:MCDU_TMP_WPT_SPDCSTR_COND, number) 0 != &amp;&amp;-->
						if{
							
							<!--MACH/IAS Switch-->
							(L:AB_AP_SpdTAS_DES, number) (L:AB_AP_MACHTAS_DES, number) &gt;=
							(L:AB_AP_SPDmode_set, number) 0 &gt;= &amp;&amp;
							if{
								1 (&gt; L:AB_AP_SPDMACH, number)
								0 (&gt; L:AB_AP_SPDMACH_but, bool)
								0 (&gt; L:AB_AP_SPDMACH_but_timout, number)
								
								(L:MCDU_SEL_Mach, number) (L:MCDU_WPT_SPDCSTRlast, number) (A:Airspeed indicated, knots) (A:Airspeed mach, machs) / / min (L:Mrkr_Mvmnt_TopA, number) 5 - (A:Airspeed mach, machs) (A:Airspeed indicated, knots) / * min (&gt; L:AB_AP_Mach_Selected, number)									
								<!-- (A:Airspeed indicated, knots) (A:Airspeed mach, machs) / (L:MCDU_SEL_Mach, number) * (L:MCDU_WPT_SPDCSTRlast, number) min (&gt; L:AB_AP_SPEED_Selected, number) --> }
							
							(L:AB_AP_SpdTAS_DES, number) (L:AB_AP_MACHTAS_DES, number) &lt;
							(L:AB_AP_SPDmode_set, number) 0 &gt;= &amp;&amp;
							if{
								0 (&gt; L:AB_AP_SPDMACH, number)
								0 (&gt; L:AB_AP_SPDMACH_but, bool)
								0 (&gt; L:AB_AP_SPDMACH_but_timout, number) 
								
								(L:MCDU_ECON_SPD_DES, number) (L:MCDU_WPT_SPDCSTRlast, number) min (&gt; L:AB_AP_SPEED_Selected, number) }
							
							<!--11000 FT RESTR-->
							(L:AB_AP_SpdTAS_DES, number) (L:AB_AP_MACHTAS_DES, number) &lt;
							(A:INDICATED ALTITUDE, feet) 11000 &gt; &amp;&amp;
							if{
								(L:MCDU_ECON_SPD_DES, number) (L:MCDU_WPT_SPDCSTRlast, number) min (&gt; L:AB_AP_SPEED_Selected, number)
							}
							
							(A:INDICATED ALTITUDE, feet) 11000 &lt;
							if{
								(L:MCDU_ECON_SPD_DES, number) (L:MCDU_WPT_SPDCSTRlast, number) min 250 min (&gt; L:AB_AP_SPEED_Selected, number) }
								
						}
						
						els{
							<!--MACH BUTTON SWITCH-->
							(L:AB_AP_SpdTAS_DES, number) (L:AB_AP_MACHTAS_DES, number) &lt;
							(L:AB_AP_SPDmode_set, number) 0 &gt;= &amp;&amp;
							if{
								0 (&gt; L:AB_AP_SPDMACH, number)
								0 (&gt; L:AB_AP_SPDMACH_but, bool)
								0 (&gt; L:AB_AP_SPDMACH_but_timout, number) }
							
							<!--MACH/IAS Switch-->
							(L:AB_AP_SpdTAS_DES, number) (L:AB_AP_MACHTAS_DES, number) &gt;=
							if{
								(L:MCDU_SEL_Mach, number) (L:Mrkr_Mvmnt_TopA, number) 5 - (A:Airspeed mach, machs) (A:Airspeed indicated, knots) / * min (&gt; L:AB_AP_Mach_Selected, number)	}
							
							<!--11000 FT RESTR-->
							(L:AB_AP_SpdTAS_DES, number) (L:AB_AP_MACHTAS_DES, number) &lt;
							(A:INDICATED ALTITUDE, feet) 11000 &gt; &amp;&amp;
							if{
								(L:MCDU_ECON_SPD_DES, number) (&gt; L:AB_AP_SPEED_Selected, number)	}
							
							(A:INDICATED ALTITUDE, feet) 11000 &lt;
							if{
								(L:MCDU_ECON_SPD_DES, number) 250 min (&gt; L:AB_AP_SPEED_Selected, number)	} }
						
					}
					
					
					(L:MCDU_FLT_PHS, number) 5 ==
					if{
						
						(L:MCDU_WPT_SPDCSTRlast, number) 0 ==
						if{
							400 (&gt; L:MCDU_WPT_SPDCSTRlast, number) }
						
						(L:MCDU_WPT_SPDCSTR, number) 0 !=
						(L:MCDU_ECON_SPD_DES, number) (L:MCDU_WPT_SPDCSTR, number) - 0 max 0.0001 * 2 pow 0.1251 (L:MCDU_ECON_SPD_DES, number) (L:MCDU_WPT_SPDCSTR, number) - 0 max * + 0.5052 + (L:MCDU_WPT_SPDCSTR_DIST, number) &gt;= &amp;&amp;
						(L:MCDU_WPT_SPDCSTRlast, number) 400 == &amp;&amp;
						if{
							(L:MCDU_WPT_SPDCSTR, number) (&gt; L:MCDU_WPT_SPDCSTRlast, number) }
						
						(L:MCDU_WPT_SPDCSTR, number) 0 !=
						(L:MCDU_WPT_SPDCSTRlast, number) (L:MCDU_WPT_SPDCSTR, number) - 0 max 0.0001 * 2 pow 0.1251 (L:MCDU_WPT_SPDCSTRlast, number) (L:MCDU_WPT_SPDCSTR, number) - 0 max * + 0.5052 + (L:MCDU_WPT_SPDCSTR_DIST, number) &gt;= &amp;&amp;
						(L:MCDU_WPT_SPDCSTRlast, number) 400 != &amp;&amp;
						if{
							(L:MCDU_WPT_SPDCSTR, number) (&gt; L:MCDU_WPT_SPDCSTRlast, number) }
						
						(L:AP_AP_ALT_Mode, number) 1 ==
						(L:AB_AP_LOC2, number) 0 == &amp;&amp;
						(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
						if{
							
							<!--THR IDLE-->
							(L:Throttle_ani_fix_L, number) 25 ==
							(L:Throttle_ani_fix_R, number) 25 == ||
							(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - 0 &lt; &amp;&amp;
							if{
								0 (&gt;L:AP_FADEC_CLBTHR, number)
								1 (&gt;L:AP_FADEC_IDLTHR, number) }
							
							(L:MCDU_FLT_PHS, number) 4 &gt;=
							(L:AP_AP_ALT_Mode, number) -1 != &amp;&amp;
							
							(L:MCDU_Early_Vnav, number) 1 ==
							(L:AP_AP_ALT_Mode99, number) 1 == &amp;&amp; ||
							if{ 
								0 (&gt;L:AP_FADEC_CLBTHR, number)
								0 (&gt;L:AP_FADEC_IDLTHR, number) } 
							
						}

						(L:MCDU_APP_VAPP, number) (L:MCDU_APP_VAPP, number) (L:MCDU_APP_HW, number) 10 max - (A:AMBIENT WIND DIRECTION,radians) (A:PLANE HEADING DEGREES GYRO,radians) - cos (A:AMBIENT WIND VELOCITY,knots) * + max (L:MCDU_WPT_SPDCSTRlast, number) min (&gt; L:AB_AP_SPEED_Selected, number)
						
						
						
					}
					
					(L:MCDU_FLT_PHS, number) 6 ==
					if{
						
						<!--THR CLB/IDLE-->
						(L:Throttle_ani_fix_L, number) 25 ==
						(L:Throttle_ani_fix_R, number) 25 == ||
						(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - 400 &gt; &amp;&amp;
						(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
						if{
							0 (&gt;L:AP_FADEC_IDLTHR,number)
							1 (&gt;L:AP_FADEC_CLBTHR,number) } 
						
						(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &gt;=
						if{
							(A:FLAPS HANDLE INDEX, number) 0 !=
							(L:MCDU_WPT_SPDCSTR_2, number) 0 != &amp;&amp;
							if{
								(L:MCDU_TO_0,number) (L:MCDU_WPT_SPDCSTR_2, number) min (&gt; L:AB_AP_SPEED_Selected, number) }
							els{
								<!--TMPY HARDCODE CLEANDOT SPD-->
								(L:MCDU_TO_0,number) (&gt; L:AB_AP_SPEED_Selected, number) }
							
						}
						els{
							(A:Airspeed indicated, knots) (L:ACCELERATION BODY Z, Feet per second squared) 0.592484 *  7.5 * - (L:VLS_autocalc,number) 5 + max (L:MCDU_APP_VAPP, number) max (L:VLS_autocalc,number) 25 + min (&gt; L:AB_AP_SPEED_Selected, number) 
							
						}
						
						
						
					}
					
				}
				
				(L:AB_AP_SPDmode_set, number) 0 &gt;=
				(L:AB_AP_HDGmode_setDisp, number) 0 &lt;= &amp;&amp;
				if{
					
					<!--SRS-->
					(L:MCDU_FLT_PHS, number) 2 &lt;=
					if{
						
						(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &lt;
						if{
							
							<!--THR CLB/IDLE-->
							(L:Throttle_ani_fix_L, number) 25 ==
							(L:Throttle_ani_fix_R, number) 25 == ||
							(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - abs 400 &gt; &amp;&amp;
							(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
							if{
								0 (&gt;L:AP_FADEC_IDLTHR,number)
								1 (&gt;L:AP_FADEC_CLBTHR,number) }
							
							(L:MCDU_V2, number) 0 ==
							if{
								0 (&gt; L:AB_AP_SRSmode, number) }
							els{
								1 (&gt; L:AB_AP_SRSmode, number)
								(L:MCDU_V2, number) 10 + (&gt; L:AB_AP_SPEED_Selected, number) }
						}
						
						els{
							0 (&gt; L:AB_AP_SRSmode, number) } 
					}
					
					<!--CLB-->
					(L:MCDU_FLT_PHS, number) 2 ==
					if{
						
						1 (&gt; L:DESUNARM, number)
						
						<!--MACH BUTTON SWITCH-->
						(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &gt;
						(L:AB_AP_SpdTAS, number) (L:AB_AP_MACHTAS, number) &gt;= &amp;&amp;
						(L:AB_AP_SPDMACH, number) 0 == &amp;&amp;
						(L:AB_AP_SPDmode_set, number) 0 &gt;= &amp;&amp;
						if{
							1 (&gt; L:AB_AP_SPDMACH, number)
							0 (&gt; L:AB_AP_SPDMACH_but, bool)
							0 (&gt; L:AB_AP_SPDMACH_but_timout, number) }
						
						<!--MACH BUTTON SWITCH-->
						(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &gt;
						(L:AB_AP_SpdTAS, number) (L:AB_AP_MACHTAS, number) &lt; &amp;&amp;
						(L:AB_AP_SPDMACH, number) 0 == &amp;&amp;
						(L:AB_AP_SPDmode_set, number) 0 &gt;= &amp;&amp;
						if{
							0 (&gt; L:AB_AP_SPDMACH, number)
							0 (&gt; L:AB_AP_SPDMACH_but, bool)
							0 (&gt; L:AB_AP_SPDMACH_but_timout, number) }
						
						
						(L:AP_AP_ALT_Mode99, number) 1 ==
						if{
							<!--THR CLB/IDLE-->
							(L:Throttle_ani_fix_L, number) 25 ==
							(L:Throttle_ani_fix_R, number) 25 == ||
							(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - abs 400 &gt; &amp;&amp;
							(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
							if{
								0 (&gt;L:AP_FADEC_IDLTHR,number)
								1 (&gt;L:AP_FADEC_CLBTHR,number) }
							
						}
						
						(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &gt;
						(A:INDICATED ALTITUDE, feet) (L:MCDU_Cruisealt, number) &lt; &amp;&amp;
						(A:INDICATED ALTITUDE, feet) 10100 &lt; &amp;&amp;
						if{
							(L:MCDU_SEL_SPD, number) 250 min (&gt; L:AB_AP_SPEED_Selected, number)
						}
						
						<!--10000 FT RESTR-->
						(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &gt;
						(A:INDICATED ALTITUDE, feet) (L:MCDU_Cruisealt, number) &lt; &amp;&amp;
						(A:INDICATED ALTITUDE, feet) 10100 &gt; &amp;&amp;
						if{
							(L:MCDU_SEL_SPD, number) (&gt; L:AB_AP_SPEED_Selected, number)
						}
						
						<!--MACH/IAS Switch-->
						(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &gt;
						(A:INDICATED ALTITUDE, feet) (L:MCDU_Cruisealt, number) &lt; &amp;&amp;
						if{
							(L:MCDU_SEL_Mach, number) (&gt; L:AB_AP_Mach_Selected, number)
						} 
						
					}
					
					<!--CRZ-->
					(L:MCDU_FLT_PHS, number) 3 ==
					if{
						(L:MCDU_WPT_SPDCSTRlast, number) 0 ==
						if{
							400 (&gt; L:MCDU_WPT_SPDCSTRlast, number) }
						
						(L:AP_AP_ALT_Capture_SM, number) 0 ==
						(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
						if{
							
							<!--THR CLB/IDLE-->
							(L:Throttle_ani_fix_L, number) 25 ==
							(L:Throttle_ani_fix_R, number) 25 == ||
							(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - 0 &gt; &amp;&amp;
							if{
								0 (&gt;L:AP_FADEC_IDLTHR,number)
								1 (&gt;L:AP_FADEC_CLBTHR,number) }
							
							(L:Throttle_ani_fix_L, number) 25 ==
							(L:Throttle_ani_fix_R, number) 25 == ||
							(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - 0 &lt; &amp;&amp;
							if{
								0 (&gt;L:AP_FADEC_CLBTHR, number)
								1 (&gt;L:AP_FADEC_IDLTHR, number) } }
						
						(L:AP_AP_ALT_Capture_SM, number) 1 ==
						if{
							
							(L:AP_AP_ALT_Mode99, number) 1 ==
							(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
							(L:AB_AP_ALT_Selected, number) (L:MCDU_Cruisealt, number) == &amp;&amp;
							(L:AP_AP_ALT_Capture_SM, number) 1 == &amp;&amp;
							if{
								0 (&gt; L:AP_AP_ALT_Mode99, number)
								0 (&gt; L:AP_FADEC_CLBTHR, number)
								0 (&gt; L:AP_FADEC_IDLTHR, number) }
							
							(L:AP_AP_ALT_Mode, number) 0 ==
							(L:AP_AP_ALT_Mode99, number) 0 == &amp;&amp;
							if{
								<!--MACH BUTTON SWITCH-->
								(L:AB_AP_SpdTAS, number) (L:AB_AP_MACHTAS, number) &lt;
								if{
									
									(A:INDICATED ALTITUDE, feet) 10100 &lt;
									if{
										(L:MCDU_SEL_SPD, number) (L:ElevatorVmoCalc, number) 15 - min 250 min (&gt; L:AB_AP_SPEED_Selected, number) }
									els{
										(L:MCDU_SEL_SPD, number) (&gt; L:AB_AP_SPEED_Selected, number) }
									
									0 (&gt; L:AB_AP_SPDMACH, number)
									0 (&gt; L:AB_AP_SPDMACH_but, bool)
									0 (&gt; L:AB_AP_SPDMACH_but_timout, number) }
								
								<!--MACH BUTTON SWITCH-->
								(L:AB_AP_SpdTAS, number) (L:AB_AP_MACHTAS, number) &gt;=
								if{
									(L:MCDU_SEL_Mach, number) (&gt; L:AB_AP_Mach_Selected, number)
									1 (&gt; L:AB_AP_SPDMACH, number)
									0 (&gt; L:AB_AP_SPDMACH_but, bool)
									0 (&gt; L:AB_AP_SPDMACH_but_timout, number) } }
						} }
					
					
					<!--DES-->
					(L:MCDU_FLT_PHS, number) 4 ==
					if{
						
						(L:AP_AP_ALT_Mode99, number) 1 ==
						(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
						<!--(L:MCDU_WPT_SPDCSTRlast, number) 0 == &amp;&amp;-->
						if{
							
							<!--THR CLB/IDLE-->							
							(L:MCDU_FLT_PHS, number) 4 &gt;=
							(L:AP_AP_ALT_Mode, number) -1 != &amp;&amp;
							
							(L:MCDU_Early_Vnav, number) 1 ==
							(L:AP_AP_ALT_Mode99, number) 1 == &amp;&amp; ||
							if{ 
								0 (&gt;L:AP_FADEC_CLBTHR, number)
								0 (&gt;L:AP_FADEC_IDLTHR, number) } }
						
						<!--MACH BUTTON SWITCH-->
						(L:AB_AP_SpdTAS_DES, number) (L:AB_AP_MACHTAS_DES, number) &lt;
						(L:AB_AP_SPDmode_set, number) 0 &gt;= &amp;&amp;
						if{
							0 (&gt; L:AB_AP_SPDMACH, number)
							0 (&gt; L:AB_AP_SPDMACH_but, bool)
							0 (&gt; L:AB_AP_SPDMACH_but_timout, number) }
						
						<!--MACH/IAS Switch-->
						(L:AB_AP_SpdTAS_DES, number) (L:AB_AP_MACHTAS_DES, number) &gt;=
						if{
							(L:MCDU_SEL_Mach, number) (&gt; L:AB_AP_Mach_Selected, number)	}
						
						<!--11000 FT RESTR-->
						(L:AB_AP_SpdTAS_DES, number) (L:AB_AP_MACHTAS_DES, number) &lt;
						(A:INDICATED ALTITUDE, feet) 11000 &gt; &amp;&amp;
						if{
							(L:MCDU_ECON_SPD_DES, number) (&gt; L:AB_AP_SPEED_Selected, number)	}
						
						(A:INDICATED ALTITUDE, feet) 11000 &lt;
						if{
							(L:MCDU_ECON_SPD_DES, number) 250 min (&gt; L:AB_AP_SPEED_Selected, number)	} 
						
					}
					
					
					(L:MCDU_FLT_PHS, number) 5 ==	
					if{
						
						(L:AP_AP_ALT_Mode, number) 1 ==
						(L:AB_AP_LOC2, number) 0 == &amp;&amp;
						(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
						if{
							
							<!--THR IDLE-->
							(L:Throttle_ani_fix_L, number) 25 ==
							(L:Throttle_ani_fix_R, number) 25 == ||
							(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - 0 &lt; &amp;&amp;
							if{
								0 (&gt;L:AP_FADEC_CLBTHR, number)
								1 (&gt;L:AP_FADEC_IDLTHR, number) }
							
							(L:MCDU_FLT_PHS, number) 4 &gt;=
							(L:AP_AP_ALT_Mode, number) -1 != &amp;&amp;
							
							(L:MCDU_Early_Vnav, number) 1 ==
							(L:AP_AP_ALT_Mode99, number) 1 == &amp;&amp; ||
							if{ 
								0 (&gt;L:AP_FADEC_CLBTHR, number)
								0 (&gt;L:AP_FADEC_IDLTHR, number) } 
							
						}
						
						(L:MCDU_APP_VAPP, number) (L:MCDU_APP_VAPP, number) (L:MCDU_APP_HW, number) 10 max - (A:AMBIENT WIND DIRECTION,radians) (A:PLANE HEADING DEGREES GYRO,radians) - cos (A:AMBIENT WIND VELOCITY,knots) * + max (&gt; L:AB_AP_SPEED_Selected, number)
						
					}
					
					(L:MCDU_FLT_PHS, number) 6 ==
					if{	

						<!--THR CLB/IDLE-->
						(L:Throttle_ani_fix_L, number) 25 ==
						(L:Throttle_ani_fix_R, number) 25 == ||
						(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - 400 &gt; &amp;&amp;
						(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
						if{
							0 (&gt;L:AP_FADEC_IDLTHR,number)
							1 (&gt;L:AP_FADEC_CLBTHR,number) } 
						
						(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &gt;=
						if{
							(L:MCDU_TO_0,number) (&gt; L:AB_AP_SPEED_Selected, number) }
						els{
							(A:Airspeed indicated, knots) (L:ACCELERATION BODY Z, Feet per second squared) 0.592484 *  7.5 * - (L:VLS_autocalc,number) 5 + max (L:MCDU_APP_VAPP, number) max (L:VLS_autocalc,number) 25 + min (&gt; L:AB_AP_SPEED_Selected, number) }
						
					}
				}
				
				(L:AB_AP_HDGmode_setDisp, number) 0 &gt;
				if{
					
					<!--SRS-->
					(L:MCDU_FLT_PHS, number) 2 &lt;=
					if{
						
						(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &lt;
						if{
							
							<!--THR CLB/IDLE-->
							(L:Throttle_ani_fix_L, number) 25 ==
							(L:Throttle_ani_fix_R, number) 25 == ||
							(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - abs 400 &gt; &amp;&amp;
							(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
							if{
								0 (&gt;L:AP_FADEC_IDLTHR,number)
								1 (&gt;L:AP_FADEC_CLBTHR,number) }
							
							(L:MCDU_V2, number) 0 ==
							if{
								0 (&gt; L:AB_AP_SRSmode, number) }
							els{
								1 (&gt; L:AB_AP_SRSmode, number) }
						}
						
						els{
							0 (&gt; L:AB_AP_SRSmode, number) }
						
					}
					
					<!--CLB-->
					(L:MCDU_FLT_PHS, number) 2 ==
					if{
						
						1 (&gt; L:DESUNARM, number)
						
						(L:AP_AP_ALT_Mode99, number) 1 ==
						if{
							<!--THR CLB/IDLE-->
							(L:Throttle_ani_fix_L, number) 25 ==
							(L:Throttle_ani_fix_R, number) 25 == ||
							(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - abs 400 &gt; &amp;&amp;
							(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
							if{
								0 (&gt;L:AP_FADEC_IDLTHR,number)
								1 (&gt;L:AP_FADEC_CLBTHR,number) }
						}
		
					}
					
					<!--CRZ-->
					(L:MCDU_FLT_PHS, number) 3 ==
					if{
						(L:AP_AP_ALT_Capture_SM, number) 0 ==
						(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
						if{					
							
							<!--THR CLB/IDLE-->
							(L:Throttle_ani_fix_L, number) 25 ==
							(L:Throttle_ani_fix_R, number) 25 == ||
							(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - 0 &gt; &amp;&amp;
							if{
								0 (&gt;L:AP_FADEC_IDLTHR,number)
								1 (&gt;L:AP_FADEC_CLBTHR,number) }
							
							(L:Throttle_ani_fix_L, number) 25 ==
							(L:Throttle_ani_fix_R, number) 25 == ||
							(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - 0 &lt; &amp;&amp;
							if{
								0 (&gt;L:AP_FADEC_CLBTHR, number)
								1 (&gt;L:AP_FADEC_IDLTHR, number) }
							
							(L:AB_APSTP_DES, number) 1 ==
							(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
							if{ 
								0 (&gt;L:AP_FADEC_CLBTHR, number)
								0 (&gt;L:AP_FADEC_IDLTHR, number) } }
						
						(L:AP_AP_ALT_Mode99, number) 1 ==
						(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
						(L:AB_AP_ALT_Selected, number) (L:MCDU_Cruisealt, number) == &amp;&amp;
						(L:AP_AP_ALT_Capture_SM, number) 1 == &amp;&amp;
						if{
							0 (&gt; L:AP_AP_ALT_Mode99, number)
							0 (&gt; L:AP_FADEC_CLBTHR, number)
							0 (&gt; L:AP_FADEC_IDLTHR, number) }
						
					}
					
					
					<!--DES-->
					(L:MCDU_FLT_PHS, number) 4 ==
					if{

						(L:AP_AP_ALT_Mode99, number) 1 ==
						(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
						<!--(L:MCDU_WPT_SPDCSTRlast, number) 0 == &amp;&amp;-->
						if{
							
							<!--THR CLB/IDLE-->							
							(L:MCDU_FLT_PHS, number) 4 &gt;=
							(L:AP_AP_ALT_Mode, number) -1 != &amp;&amp;
							
							(L:MCDU_Early_Vnav, number) 1 ==
							(L:AP_AP_ALT_Mode99, number) 1 == &amp;&amp; ||
							if{ 
								0 (&gt;L:AP_FADEC_CLBTHR, number)
								0 (&gt;L:AP_FADEC_IDLTHR, number) } }				

					}
					
					
					(L:MCDU_FLT_PHS, number) 5 ==
					if{
						
						(L:AP_AP_ALT_Mode, number) 1 ==
						(L:AB_AP_LOC2, number) 0 == &amp;&amp;
						(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
						if{
							
							<!--THR IDLE-->
							(L:Throttle_ani_fix_L, number) 25 ==
							(L:Throttle_ani_fix_R, number) 25 == ||
							(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - 0 &lt; &amp;&amp;
							if{
								0 (&gt;L:AP_FADEC_CLBTHR, number)
								1 (&gt;L:AP_FADEC_IDLTHR, number) }
							
							(L:MCDU_FLT_PHS, number) 4 &gt;=
							(L:AP_AP_ALT_Mode, number) -1 != &amp;&amp;
							
							(L:MCDU_Early_Vnav, number) 1 ==
							(L:AP_AP_ALT_Mode99, number) 1 == &amp;&amp; ||
							if{ 
								0 (&gt;L:AP_FADEC_CLBTHR, number)
								0 (&gt;L:AP_FADEC_IDLTHR, number) } 
							
						}

					}
					
					(L:MCDU_FLT_PHS, number) 6 ==
					if{

						<!--THR CLB/IDLE-->
						(L:Throttle_ani_fix_L, number) 25 ==
						(L:Throttle_ani_fix_R, number) 25 == ||
						(L:AB_AP_ALT_Selected, number) (A:INDICATED ALTITUDE, feet) - 400 &gt; &amp;&amp;
						(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
						if{
							0 (&gt;L:AP_FADEC_IDLTHR,number)
							1 (&gt;L:AP_FADEC_CLBTHR,number) }
					}
					
				}
				
				
				(L:MCDU_HOLD_DECEL_Dist, number) (L:MCDU_HOLD_Dist, number) &gt;
				(L:MCDU_HOLD_DECEL_ACTIVE, number) 1 == ||
				
				(L:MCDU_HOLD_Dist, number) /-/ 2 != &amp;&amp;
				if{
				
					(L:MCDU_HOLD_Dist, number) 0 !=
					if{
						1 (&gt; L:MCDU_HOLD_DECEL_ACTIVE, number) }
					
					(L:MCDU_TO_0,number) (&gt; L:AB_AP_SPEED_Selected, number)
				}
				
				(L:MCDU_HOLD_Dist, number) /-/ 2 ==
				if{
					0 (&gt; L:MCDU_HOLD_DECEL_ACTIVE, number)
				}
				
				<!--NORM ATHR-->
				(L:AP_AP_ALT_Mode, number) 0 ==
				(L:AB_AP_KNOBALT, bool) 0 == &amp;&amp;
				(L:AP_AP_ALT_Capture, number) 1 == &amp;&amp;
				(L:AB_AP_NAV_GS, bool) 1 ==
				(L:AB_AP_LOC2, number) 1 == &amp;&amp; ||
				(L:AB_AP_KNOBALT, number) 1 == ||
				(L:AB_AP_AP1, number) 0 ==
				(L:AB_AP_AP2, number) 0 == &amp;&amp;
				(L:AB_MPL_FD, number) 0 == &amp;&amp; ||
				if{
					0 (&gt;L:AP_FADEC_CLBTHR, number)
					0 (&gt;L:AP_FADEC_IDLTHR, number) }
				
				
				(L:MCDU_FLT_PHS, number) 6 ==
				(L:FLTPHS_PREV, number) 5 == &amp;&amp;
				if{
					
					(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &lt;
					if{
						1 (&gt; L:AB_AP_SRSmode, number)
						0 (&gt; L:AB_AP_LOC2, number)
						0 (&gt; L:AB_AP_LOC, number)
						0 (&gt; L:AB_LOC_CAPTURE, bool)
						0 (&gt; L:AB_AP_NAV_GS, bool)
						-1 (&gt; L:AP_AP_ALT_Mode99, number)
						-1 (&gt; L:AP_AP_ALT_Mode, number)
						0 (&gt; L:AB_AP_KNOBALT, bool) }
					
					1 (&gt; L:AB_AP_HDGmode_set, number)
					1 (&gt; L:AB_AP_HDGmode_setDisp, number)
					1 (&gt; L:AB_AP_SPDmode_set, number)					 
					0 (&gt; L:GEODESCEND, number)
					(L:MCDU_FLT_PHS, number) (&gt; L:FLTPHS_PREV, number)  }
				els{
					(L:MCDU_FLT_PHS, number) (&gt; L:FLTPHS_PREV, number) }
				
				(A:INDICATED ALTITUDE, feet) (L:MCDU_THR_ACC, number) &gt;
				(L:AB_AP_SRSmode, number) 1 == &amp;&amp;
				if{
					-1 (&gt; L:AP_AP_ALT_Mode99, number)
					-1 (&gt; L:AP_AP_ALT_Mode, number)
					0 (&gt; L:AB_AP_SRSmode, number) }
				
				
			}
			</Value>
		</Select>
	</Element>
	<Element>
		<Select>
			<Value>
			<!--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-->
			(L:Pause_code, bool) 0 ==
			if{
				<!--AUTOPILOT -->
				<!--Autopilot engage disengage -->
				
				(L:AB_AP_AP1, number) 1 ==
				(L:AB_AP_AP2, number) 1 == ||
				(A:SIM ON GROUND, bool) 1 == &amp;&amp;
				(L:AB_AUTOLAND, bool) 0 == &amp;&amp;
				(L:FBWROLL, number) abs 75 &gt; ||
				(L:FBWELEV98, number) abs 75 &gt; ||
				if{
					0 (&gt; L:AB_AP_AP1, number)
					0 (&gt; L:AB_AP_AP2, number) }
				
				(L:AB_AP_AP1, number) 0 ==
				(L:AB_AP_AP2, number) 0 == &amp;&amp;
				(L:FBWRUD55, number) abs 1 &gt;  ||
				(A:SIM ON GROUND, bool) 1 == &amp;&amp;
				(L:AB_AUTOLAND, bool) 1 == &amp;&amp; 
				if{
					0 (&gt; L:AB_AP_AP1, number)
					0 (&gt; L:AB_AP_AP2, number) }
				
				(L:AB_AP_LOC2, number) 0 ==
				if{
					0 (&gt; L:AB_AUTOLAND, bool) }
				
				<!--AP Disconnect on MDA Non Precision appr -->
				(L:MCDU_APP_MDA, number) 0 !=
				(A:INDICATED ALTITUDE:1, feet) (L:MCDU_APP_MDA, number) 50 - &lt;= &amp;&amp;
				(L:AB_AP_AP1, number) 1 == 
				(L:AB_AP_AP2, number) 1 == || &amp;&amp;
				(L:AB_AUTOLAND, bool) 0 == &amp;&amp; 
				(L:MCDU_FLT_PHS, number) 5 == &amp;&amp;
				if{
					0 (&gt; L:AB_AP_AP1, number) 
					0 (&gt; L:AB_AP_AP2, number)
				}
				
				(A:SIM ON GROUND, bool) 1 ==
				(L:AUTORST, bool) 1 == &amp;&amp;
				(A:GROUND VELOCITY,knots) 30 &lt;= &amp;&amp;
				if{
					
					(L:AFTLANDTIMER, number) 1 + (&gt; L:AFTLANDTIMER, number)
					(L:AFTLANDTIMER, number) 270 &gt;=
					if{
						0 (&gt; L:AUTORST, bool)
						0 (&gt; L:AFTLANDTIMER, number)
						0 (&gt; L:AB_AP_LOC2, number) } }
				
				els{
					0 (&gt; L:AFTLANDTIMER, number) }
				
				(L:MCDU_FLT_PHS, number) 5 ==
				(L:AB_AUTOLAND, bool) 1 == ||
				if{
					1 (&gt; L:AUTORST, bool) }
				
				
				<!--Z Key ON-->
				
				(L:AP_Z_Pressed, bool) 1 ==
				(L:AP_Z_On, bool) 0 == &amp;&amp;
				if{
					1 (&gt; L:AP_Z_On, bool) 
					0 (&gt; L:AP_Z_Off, bool)
				}
				
				<!--Z Key OFF-->
				
				(L:AP_Z_Pressed, bool) 0 ==
				(L:AP_Z_Off, bool) 0 == &amp;&amp;
				if{
					(L:AP_Z_Offtmr, number) 1 + (&gt; L:AP_Z_Offtmr, number)
					
					(L:AP_Z_Offtmr, number) 8 &gt;
					if{
						0 (&gt; L:AP_Z_Offtmr, number)
						1 (&gt; L:AP_Z_Off, bool)
						0 (&gt; L:AP_Z_On, bool) }
					
				}
				els{
					0 (&gt; L:AP_Z_Offtmr, number) }
				
				<!--Conventional Disc Detect-->
				
				(L:AB_AP_AP1, number) 1 ==
				(L:AB_AP_AP2, number) 1 == ||
				if{
					1 (&gt; L:AB_AP_Disc1, number) }
				
				(L:AB_AP_AP1, number) 0 ==
				(L:AB_AP_AP2, number) 0 == &amp;&amp;
				(L:AB_AP_Disc1, number) 1 == &amp;&amp;
				if{
					1.5 (&gt; L:AB_AP_Disc1, number) }
				
				<!--Take Over PB Disc-->
				(L:AB_AP_AP1, number) 1 ==
				(L:AB_AP_AP2, number) 1 == ||
				(L:AP_Z_On, bool) 1 == &amp;&amp;
				if{
					0 (&gt; L:AB_AP_AP1, number)
					0 (&gt; L:AB_AP_AP2, number)
					0 (&gt; L:AB_AP_Disc1, number) 
					1 (&gt; L:AB_AP_Disc2, number)						
					1 (&gt; L:ASC_AP_Off_playinit, bool)
					0 (&gt; L:AB_Disc2_timer, number)
					1 (&gt; L:AP_OFF_ZkeyWait, bool) }
				
				<!--Take Over PB Supress Warn-->
				(L:AP_OFF_ZkeyWait, bool) 1 ==
				(L:AP_Z_OFF, bool) 1 == &amp;&amp;
				if{
					0 (&gt; L:AP_OFF_ZkeyWait, bool) }
				
				(L:AB_AP_Disc1, number) 1.5 ==
				(L:AP_Z_On, bool) 1 == &amp;&amp;
				if{
					2 (&gt; L:AB_AP_Disc1, number) }
				
				<!-- AP disconnect -->	
				(L:AB_AP_Disc1, number) 1 ==
				if{
					0 (&gt; L:Trig_MW_03, bool)
				}
				(L:AB_AP_Disc1, number) 1 &gt;
				(L:AB_AP_Disc2, number) 0 == &amp;&amp;
				if{
					1 (&gt; L:Trig_MW_03, bool)
				}
				
				(L:AB_MPL_Master_Warning, bool) 1 ==
				(L:AB_AP_Disc1, number) 2 == ||
				if{
					0 (&gt; L:Trig_MW_03, bool)
					0 (&gt; L:AB_AP_Disc1, number) 
				}
				
				(L:AP_Z_On, bool) 1 ==
				(L:AP_OFF_ZkeyWait, bool) 0 == &amp;&amp;
				(L:AB_MPL_Master_Warning, bool) 1 == ||
				if{
					0 (&gt; L:AB_AP_Disc2, number) 						
					0 (&gt; L:AB_MPL_MW_Light_state, bool)
					0 (&gt; L:Trig_MW_03a, bool)
				}
				
				(L:AB_AP_Disc2, number) 1 ==
				(L:AB_AP_Disc2, number) 1.5 == ||
				if{
					1 (&gt; L:ASC_AP_Off_playinit, bool)
					1 (&gt; L:Trig_MW_03a, bool)
					0 (&gt; L:AB_AP_Disc2, number)
				}
				
				(L:Trig_MW_03a, bool) 1 ==
				if{
					(L:AB_Disc2_timer, number) 1 + (&gt; L:AB_Disc2_timer, number)
					(L:AB_Disc2_timer, number) 162 ==
					if{
						0 (&gt; L:Trig_MW_03a, bool)
						0 (&gt; L:AB_Disc2_timer, number)
					}
				}
				
				<!--Mode set -->
				(L:AB_AP_SPDmode, number) -1 ==
				if{
					(L:AB_AP_SPDmode_set, number) 0 &gt;=
					(L:FCU_Managed_SPDdisp_override, bool) 0 == &amp;&amp;
					if{
						(A:Airspeed indicated, knots) near (&gt; L:AB_AP_SPEED_Select, number) } 
					
					-1 (&gt; L:AB_AP_SPDmode_set, number)
					
				}
				(L:AB_AP_SPDmode, number) 1 ==
				if{
					1 (&gt; L:AB_AP_SPDmode_set, number)
				}
				
				(L:AB_AP_ALTmode, number) -1 ==
				(L:ALTmode_reset, bool) 1 == 
				(L:AB_AP_ALTmode_set, number) 0 &lt;= &amp;&amp; ||
				if{
					(&gt; L:X_AP_ALT_HOLD_ON)
					-1 (&gt; L:AB_AP_ALTmode_set, number)
					0 (&gt; L:ALTmode_reset, bool)
				}
				(L:AB_AP_ALTmode, number) 1 ==
				(L:ALTmode_reset, bool) 1 == 
				(L:AB_AP_ALTmode_set, number) 1 == &amp;&amp; ||
				if{
					(&gt; L:X_AP_ALT_HOLD_ON)
					1 (&gt; L:AB_AP_ALTmode_set, number)
					0 (&gt; L:ALTmode_reset, bool)
				}
				
				<!--Knob timeout -->		 
				(L:AB_AP_SPEED_Select, number) (L:AB_AP_SPEED_Select_hist, number) !=
				(L:AB_AP_SPEED_Select, number) (L:AB_AP_SPEED_Select_hist, number) - abs 3 &lt; &amp;&amp;
				(L:AB_AP_SPDMACH, number) 0 == &amp;&amp;
				(L:AB_AP_Mach_Select, number) (L:AB_AP_Mach_Select_hist, number) !=
				(L:AB_AP_SPDMACH, number) 1 == &amp;&amp; ||
				if{
					1 (&gt; L:FCU_Managed_SPDdisp_override, bool)
					0 (&gt; L:FCU_Managed_SPDoverride_start, bool)
					0 (&gt; L:FCU_Managed_SPDoverride_val, number)
				}
				(L:FCU_Managed_SPDdisp_override, bool) 1 ==
				(L:FCU_Managed_SPDoverride_start, bool) 0 == &amp;&amp;
				if{
					(P:Local time, seconds) (&gt; L:FCU_Managed_SPDoverride_timer, number)
					1 (&gt; L:FCU_Managed_SPDoverride_start, bool)
				}
				
				(L:FCU_Managed_SPDoverride_start, bool) 1 ==
				if{
					(P:Local time, seconds) (L:FCU_Managed_SPDoverride_timer, number) - (&gt; L:FCU_Managed_SPDoverride_val, number)
				}
				(L:FCU_Managed_SPDoverride_val, number) 10 &gt;
				if{
					0 (&gt; L:FCU_Managed_SPDdisp_override, bool)
					0 (&gt; L:FCU_Managed_SPDoverride_start, bool)
					0 (&gt; L:FCU_Managed_SPDoverride_val, number)
				}
				
				(L:AB_AP_HDG_Select, number) (L:AB_AP_HDG_Select_hist, number) != 
				(L:AB_AP_HDGTRK, number) 0 == &amp;&amp;
				
				(L:Autopilot_TRK_set, degrees) (L:Autopilot_TRK_set_hist, number) != 
				(L:AB_AP_HDGTRK, number) 1 == &amp;&amp; ||
				if{
					1 (&gt; L:FCU_Managed_HDGdisp_override, bool)
					0 (&gt; L:FCU_Managed_HDGoverride_start, bool)
					0 (&gt; L:FCU_Managed_HDGverride_val, number)
				}
				(L:FCU_Managed_HDGdisp_override, bool) 1 ==
				(L:FCU_Managed_HDGoverride_start, bool) 0 == &amp;&amp;
				if{
					(P:Local time, seconds) (&gt; L:FCU_Managed_HDGoverride_timer, number)
					1 (&gt; L:FCU_Managed_HDGoverride_start, bool)
				}
				
				(L:FCU_Managed_HDGoverride_start, bool) 1 ==
				if{
					(P:Local time, seconds) (L:FCU_Managed_HDGoverride_timer, number) - (&gt; L:FCU_Managed_HDGoverride_val, number)
				}
				(L:FCU_Managed_HDGoverride_val, number) 45 &gt;
				if{
					0 (&gt; L:FCU_Managed_HDGdisp_override, bool)
					0 (&gt; L:FCU_Managed_HDGoverride_start, bool)
					0 (&gt; L:FCU_Managed_HDGoverride_val, number)
				}
				<!-- SPD Preselect channel -->
				(L:AB_AP_SPDmode, number) 0 !=
				(L:FCU_Managed_SPDdisp_override, bool) 1 == &amp;&amp;
				(L:AB_AP_SPDmode_set, number) 0 &lt; ||
				if{	
					
					(L:AB_AP_SPDMACH, number) 1 ==
					if{
						(L:AB_AP_Mach_Select, number) (&gt; L:AB_AP_Mach_Selected, number) }
					
					(L:AB_AP_SPDMACH, number) 0 ==
					if{
						(L:AB_AP_SPEED_Select, number) (&gt; L:AB_AP_SPEED_Selected, number)
						(L:AB_AP_SPEED_Selected, number) (A:Airspeed indicated, knots) (A:Airspeed mach, machs) / / (&gt; L:AB_AP_Mach_Select, number) } }
				
				(L:AB_AP_SPDmode_set, number) 0 &gt;=
				(L:FCU_Managed_SPDdisp_override, bool) 0 == &amp;&amp;
				if{
					(L:AB_AP_Mach_Selected, number) (&gt; L:AB_AP_Mach_Select, number)
					(L:AB_AP_SPEED_Selected, number) (&gt; L:AB_AP_SPEED_Select, number)
					(L:AB_AP_SPEED_Select, number) (&gt; L:AB_AP_SPEED_Select_hist, number)
					(L:AB_AP_Mach_Select, number) (&gt; L:AB_AP_Mach_Select_hist, number) }
				
				<!-- VS/FPA Preselect channel -->
				
				(L:AB_AP_VS_Select2, number) (L:AB_AP_VS_Select2_hist, number) != 
				(L:AB_AP_HDGTRK, number) 0 == &amp;&amp;
				
				(L:AB_AP_FPA_Select2, number) (L:AB_AP_FPA_Select2_hist, number) != 
				(L:AB_AP_HDGTRK, number) 1 == &amp;&amp; ||
				if{
					1 (&gt; L:FCU_Managed_VSdisp_override, bool)
					0 (&gt; L:FCU_Managed_VSoverride_start, bool)
					0 (&gt; L:FCU_Managed_VSverride_val, number)
				}
				(L:FCU_Managed_VSdisp_override, bool) 1 ==
				(L:FCU_Managed_VSoverride_start, bool) 0 == &amp;&amp;
				if{
					(P:Local time, seconds) (&gt; L:FCU_Managed_VSoverride_timer, number)
					1 (&gt; L:FCU_Managed_VSoverride_start, bool)
				}
				
				(L:FCU_Managed_VSoverride_start, bool) 1 ==
				if{
					(P:Local time, seconds) (L:FCU_Managed_VSoverride_timer, number) - (&gt; L:FCU_Managed_VSoverride_val, number)
				}
				(L:FCU_Managed_VSoverride_val, number) 45 &gt;
				(L:AB_AP_ALTmode, number) 0 != ||
				if{
					0 (&gt; L:FCU_Managed_VSdisp_override, bool)
					0 (&gt; L:FCU_Managed_VSoverride_start, bool)
					0 (&gt; L:FCU_Managed_VSoverride_val, number)
				}
				
				(L:AB_AP_VSlevel, number) 0 !=
				(L:FCU_Managed_VSdisp_override, bool) 1 == &amp;&amp;
				(L:AB_AP_KNOBALT, bool) 1 == ||
				if{
					(L:AB_AP_VS_Select2, number) (&gt; L:AB_AP_VS_Select3, number)
					(L:AB_AP_FPA_Select2, number) (&gt; L:AB_AP_FPA_Select3, number) }
				
				(L:AB_AP_KNOBALT, bool) 0 ==
				(L:FCU_Managed_VSdisp_override, bool) 0 == &amp;&amp;
				if{
					(A:Vertical speed,feet per minute) 10 / near 10 / (&gt; L:AB_AP_VS_Select2, number)
					(A:Vertical speed,feet per minute) 60 / (A:AIRSPEED TRUE,knots) 1.68781 * / asin rddg 10 * near 10 / (&gt; L:AB_AP_FPA_Select2, number)
					(L:AB_AP_VS_Select2, number) (&gt; L:AB_AP_VS_Select2_hist, number)
					(L:AB_AP_FPA_Select2, number) (&gt; L:AB_AP_FPA_Select2_hist, number) }
				
				(L:AB_AP_HDGmode_setDisp, number) 0 &gt;=
				(L:FCU_Managed_HDGdisp_override, bool) 0 == &amp;&amp;
				(L:AB_LOC_CAPTURE, bool) 0 == &amp;&amp;
				if{
					(A:Plane heading degrees gyro, degrees) (&gt; L:AB_AP_HDG_Select, number)
					(L:AB_AP_HDG_Select, number) (A:GPS GROUND MAGNETIC TRACK, radians) (A:Plane heading degrees gyro, radians) - rddg - (&gt; L:Autopilot_TRK_set, degrees)
					(L:AB_AP_HDG_Select, number) (&gt; L:AB_AP_HDG_Select_hist, number)
					(L:Autopilot_TRK_set, degrees) (&gt; L:Autopilot_TRK_set_hist, number) }
				
				(L:AB_AP_SPEED_Select, number) (&gt; L:AB_AP_SPEED_Select_hist, number)
				(L:AB_AP_Mach_Select, number) (&gt; L:AB_AP_Mach_Select_hist, number)
				(L:AB_AP_HDG_Select, number) (&gt; L:AB_AP_HDG_Select_hist, number)
				(L:Autopilot_TRK_set, degrees) (&gt; L:Autopilot_TRK_set_hist, number)
				(L:AB_AP_VS_Select2, number) (&gt; L:AB_AP_VS_Select2_hist, number)
				(L:AB_AP_FPA_Select2, number) (&gt; L:AB_AP_FPA_Select2_hist, number)
				
				(L:AB_AP_SPDmode, number) 0 !=
				if{
					(L:AB_AP_SPDmode_tmr, number) 1 + (&gt;L:AB_AP_SPDmode_tmr, number)
					(L:AB_AP_SPDmode_tmr, number) 12 ==
					if{
						0 (&gt; L:AB_AP_SPDmode, number)
						0 (&gt;L:AB_AP_SPDmode_tmr, number)
					}
				}
				(L:AB_AP_HDGmode, number) 0 !=
				if{
					(L:AB_AP_HDGmode_tmr, number) 1 + (&gt;L:AB_AP_HDGmode_tmr, number)
					(L:AB_AP_HDGmode_tmr, number) 12 ==
					if{
						0 (&gt; L:AB_AP_HDGmode, number)
						0 (&gt; L:AB_AP_HDGmode_tmr, number)
					}
				}
				
				(L:AB_AP_ALTmode, number) 0 !=
				if{
					(L:AB_AP_ALTmode_tmr, number) 1 + (&gt;L:AB_AP_ALTmode_tmr, number)
					(L:AB_AP_ALTmode_tmr, number) 12 ==
					if{
						0 (&gt; L:AB_AP_ALTmode, number)
						0 (&gt;L:AB_AP_ALTmode_tmr, number)
					}
				}
				
				<!-- Knob limits -->
				(L:AB_AP_SPEED_Select, number) 399 &gt;=
				if{
					399 (&gt;L:AB_AP_SPEED_Select, number)
				}
				(L:AB_AP_SPEED_Select, number) 100 &lt;
				if{
					100 (&gt; L:AB_AP_SPEED_Select, number)
				}
				
				(L:AB_AP_Mach_Select, number) 0.99 &gt;=
				if{
					0.99 (&gt;L:AB_AP_Mach_Select, number)
				}
				(L:AB_AP_Mach_Select, number) 0.10 &lt;
				if{
					0.10 (&gt; L:AB_AP_Mach_Select, number)
				}	
				
				(L:AB_AP_HDG_Select, number) 360 &gt;=
				if{
					0 (&gt; L:AB_AP_HDG_Select, number)
				}
				(L:AB_AP_HDG_Select, number) 0 &lt;
				if{
					359 (&gt; L:AB_AP_HDG_Select, number)
				}
				
				(L:AB_AP_ALT_Select, number) 49000 &gt;=
				if{
					49000 (&gt; L:AB_AP_ALT_Select, number)
				}
				(L:AB_AP_ALT_Select, number) 100 &lt;
				if{
					100 (&gt; L:AB_AP_ALT_Select, number)
				}
				
				
				<!--SPDMACH Button timeout -->
				(L:AB_AP_SPDMACH_but, number) 1 ==
				if{
					(L:AB_AP_SPDMACH_but_timout, number) 1 + (&gt; L:AB_AP_SPDMACH_but_timout, number)
					(L:AB_AP_SPDMACH_but_timout, number) 54 ==
					if{
						0 (&gt; L:AB_AP_SPDMACH_but, bool)
						0 (&gt; L:AB_AP_SPDMACH_but_timout, number)
					}
				}			
				
				<!--FLX TOGA ATHRT set -->
				(L:Throttle_ani_fix_L, number) (L:Throttle_ChckL, number) !=
				(L:Throttle_ani_fix_R, number) (L:Throttle_ChckR, number) !=  ||
				if{
					(L:Throttle_ani_fix_L, number) (>L:Throttle_ChckL, number)
					(L:Throttle_ani_fix_R, number) (>L:Throttle_ChckR, number)
					
					(L:Throttle_ani_fix_L, number) 25 &gt;
					(L:Throttle_ani_fix_R, number) 25 &gt; ||
					(A:SIM ON GROUND, bool) 1 == &amp;&amp;
					if{
						1 (&gt; L:AB_AP_ATHR2, number)
						1 (&gt; L:AB_AP_ATHR, number) } 
					
					(L:Throttle_ani_fix_L, number) 0 ==
					(L:Throttle_ani_fix_R, number) 0 == &amp;&amp;
					(L:AB_AP_ATHR, number) 1 == &amp;&amp;
					(L:FBW_TOGALK2, bool) 0 &lt;= &amp;&amp;
					if{
						0 (&gt; L:AB_AP_ATHR2, number) 
						1 (&gt; L:ATHR_Disconnect_std, number)
						0 (&gt; L:AB_AP_ATHR, number) } }
				
				(L:Throttle_ani_fix_L, number) 20 ==
				(L:Throttle_ani_fix_R, number) 20 == ||
				(L:AB_AP_ATHR, number) 0 == &amp;&amp;
				if{
					0 (&gt; L:AB_AP_ATHR2, number) }
				
				(L:Throttle_ani_fix_L, number) 25 &lt;
				(L:Throttle_ani_fix_R, number) 25 &lt; ||
				(L:AB_AP_ATHR2, number) 1 == &amp;&amp;
				if{
					1 (&gt; L:AB_AP_ATHR, number) }
				
				(L:Throttle_ani_fix_L, number) 25 &gt;
				(L:Throttle_ani_fix_R, number) 25 &gt; ||
				
				(L:AB_AP_ATHR, number) 1 == 
				(L:MCDU_FLT_PHS, number) 6 == 
				(A:FLAPS HANDLE INDEX, number) 0 != &amp;&amp; || &amp;&amp;
				if{
					1 (&gt; L:AB_AP_ATHR2, number)
					1 (&gt; L:AB_AP_ATHR, number) }
				
				(L:Throttle_ani_fix_L, number) 0 !=
				(L:Throttle_ani_fix_R, number) 0 != &amp;&amp;
				(L:FBW_TOGALK, bool) 1 == &amp;&amp;
				if{
					0 (&gt; L:FBW_TOGALK2, bool) }
				
				<!-- (A:TURB ENG REVERSE NOZZLE PERCENT:1, percent) 2 &gt;=
				(A:TURB ENG REVERSE NOZZLE PERCENT:2, percent) 2 &gt;= || 
				(L:Throttle_ani_fix_L, number) 0 ==
				(L:Throttle_ani_fix_R, number) 0 == &amp;&amp;
				(L:FBW_TOGALK, bool) 0 &lt;= &amp;&amp; ||
				(L:AB_AP_ATHR, number) 1 == &amp;&amp;
				if{
					1 (&gt; L:ATHR_Disconnect_std, number)
				}
				els{
					0 (&gt; L:ATHR_Disconnect_std, number)
				} -->
				
				<!--Speed hold -->		
				(A:SIM ON GROUND, bool) 0 ==
				(L:AB_AP_SPDMACH, number) 0 == &amp;&amp;
				if{
					
				}
				<!--Mach hold -->			
				(A:SIM ON GROUND, bool) 0 ==
				(L:AB_AP_SPDMACH, number) 1 == &amp;&amp;
				if{
					
				}
				
				<!--Alpha flr -->	
				(L:TOGA_Time, number) 1 + 21 min (&gt; L:TOGA_Time, number)
				
				(A:AIRSPEED INDICATED, knots) (L:V1SG_Adj_Final, number) 1.05 * &lt;= 
				(A:SIM ON GROUND, bool) 0 == &amp;&amp;
				(L:TOGA_Time, number) 20 &gt;= &amp;&amp;
				(A:Airspeed indicated, knots) 100 &gt;= &amp;&amp;
				(A:Radio height,feet) 11.8 - 50 &gt; &amp;&amp;
				if{
					1 (&gt; L:FBW_TOGALK, bool)
					1 (&gt; L:FBW_TOGALK2, bool)
					1 (&gt; L:AB_AP_ATHR, number)
				}
				
				(L:FBW_TOGALK, bool) 1 ==
				
				(L:Throttle_ani_fix_L, number) 0 ==
				(L:Throttle_ani_fix_R, number) 0 == &amp;&amp;
				(L:FBW_TOGALK2, bool) 0 == &amp;&amp; 
				
				(L:AB_AP_ATHR, number) 0 ==  || &amp;&amp;
				if{
					0 (&gt; L:FBW_TOGALK, bool)
					0 (&gt; L:FBW_TOGALK2, bool)
				}
				
				<!--Overspeed Protection -->	
				
				<!--Auto Land -->			
				<!-- 				(L:AB_AP_AP1, number) 1 ==
				(L:AB_AP_AP2, number) 1 == ||
				(L:AB_AP_ATHR, number) 1 == &amp;&amp; -->
				(A:NAV HAS LOCALIZER:1, bool) 1 == <!-- &amp;&amp; -->
				(A:NAV RADIAL ERROR:1, Degrees) abs 6.5 &lt; &amp;&amp;
				(L:AB_AP_NAV_GS, bool) 1 == &amp;&amp;
				(A:RADIO HEIGHT, feet) 200 &gt;= &amp;&amp;
				if{
					1 (&gt; L:AB_AUTOLAND, bool)
				}
				
				(L:AB_AUTOLAND, bool) 1 ==
				(A:SIM ON GROUND, bool) 0 == &amp;&amp;
				(A:Radio height,feet) 11.8 - 40 &lt; &amp;&amp;
				if{
					1 (&gt; L:Autoland_retard, bool) }
				
				(A:SIM ON GROUND, bool) 1 ==
				(A:Radio height, feet) 14 - 100 &gt; ||
				if{
					0 (&gt; L:Autoland_retard, bool) }
				
				(L:AB_AUTOLAND, bool) 1 ==
				if{					
					(A:NAV CDI:1, number) abs 100 &gt;= 
					(A:NAV GSI:1, number) abs 100 &gt;= ||
					(A:RADIO HEIGHT, feet) 100 &gt; &amp;&amp;
					(L:Blink_state, bool) 1 == &amp;&amp;
					(L:AB_AP_AP1, number) 1 == &amp;&amp;
					(L:AB_AP_AP2, number) 1 == &amp;&amp;
					if{
						1 (&gt; L:AB_MPL_AUTOLAND_LIGHT, bool)
					}
					els{
						0 (&gt; L:AB_MPL_AUTOLAND_LIGHT, bool)
					}
					
				}	
				
				(L:AB_AP_LOC2, number) 0 ==
				(A:RADIO HEIGHT, feet) 200 &gt;= &amp;&amp;
				if{
					0 (&gt; L:AB_AUTOLAND, bool)
				}
				
				(L:AB_AP_LOC2, number) 0 ==
				(A:RADIO HEIGHT, feet) 200 &gt;= ||
				if{
					0 (&gt; L:AB_MPL_AUTOLAND_LIGHT, bool)
				}
				
				<!--V/S Level -->	
				(L:AB_AP_VSlevel, number) 1 ==
				if{
					(L:AB_AP_VSlevel_timout, number) 1 + (&gt; L:AB_AP_VSlevel_timout, number)
					(L:AB_AP_VSlevel_timout, number) 54 ==
					if{
						0 (&gt; L:AB_AP_VSlevel, bool)
						0 (&gt; L:AB_AP_VSlevel_timout, number)	} }					
				
				<!--HDG TRK -->		
				(L:AB_AP_HDGTRK_but, number) 1 ==
				if{
					(L:AB_AP_HDGTRK_timout, number) 1 + (&gt; L:AB_AP_HDGTRK_timout, number)
					(L:AB_AP_HDGTRK_timout, number) 54 ==
					if{
						0 (&gt; L:AB_AP_HDGTRK_but, bool)
						0 (&gt; L:AB_AP_HDGTRK_timout, number) } }
				
				1 (&gt; L:Checkx, bool)
				
			}
			</Value>
		</Select>
	</Element>
</Gauge>			