<?xml version='1.0' encoding='UTF-8' ?>
 <system name="general">
	<property>/sim/model/pushback/target-speed-fps</property>
	<channel name="Pushback">	
		<switch name="systems/pushback/linked">
			<default value="-1"/>
			<test value="0">
				/sim/model/pushback/position-norm gt 0.95
				/gear/gear/wow == 1
				gear/unit[0]/wheel-speed-fps lt 50
			</test>
		</switch>
		
		<summer name="systems/pushback/speed-error">
			<input>/sim/model/pushback/target-speed-fps</input>
			<input>-gear/unit[0]/wheel-speed-fps</input>
		</summer>
		
		<pid name="systems/pushback/force">
			<input>systems/pushback/speed-error</input>
			<kp>/sim/model/pushback/kp</kp>
			<ki>/sim/model/pushback/ki</ki>
			<kd>/sim/model/pushback/kd</kd>
			<trigger>systems/pushback/linked</trigger>
			<output>/sim/model/pushback/force</output>
		</pid>
		
		<switch name="systems/pushback/force-output">
			<default value="0"/>
			<test value="systems/pushback/force">
				systems/pushback/linked == 0
			</test>
			<output>external_reactions/pushback/magnitude</output>
		</switch>

		<fcs_function name="Pushback Force X">
			<function>
				<cos>
					<toradians><property>fcs/steer-pos-deg[0]</property></toradians>
				</cos>
			</function>
			<output>external_reactions/pushback/x</output>
		</fcs_function>

		<fcs_function name="Pushback Force Y">
			<function>
				<sin>
					<toradians><property>fcs/steer-pos-deg[0]</property></toradians>
				</sin>
			</function>
			<output>external_reactions/pushback/y</output>
		</fcs_function>	
	</channel>
	<channel name="Doors">
		<lag_filter name="doors/canopy-pos-norm-int">
			<input>doors/canopy-cmd</input>
			<c1>2</c1>
		</lag_filter>
		<fcs_function>
			<function>
				<table>
					<independentVar>doors/canopy-pos-norm-int</independentVar>
					<tableData>
						0	0
						0.01	0
						0.99	1
						1	1
					</tableData>
				</table>
			</function>
			<output>doors/canopy-pos-norm</output>
		</fcs_function>
	</channel>
	<channel name="Bugs">
		<fcs_function>
			<function>
				<table>
					<independentVar lookup="row">velocities/vc-kts</independentVar>
					<tableData>
						0	0
						15	0
						100	1
					</tableData>
				</table>
			</function>
			<output>fcs/bugs/accumulation-factor</output>
		</fcs_function>
	</channel>
	<channel name="GTX328">
		<switch name="instrumentation/it-gtx327/night-textures">
			<default value="0"/>
			<test value="1">
				/rendering/scene/diffuse/red lt 0.7
			</test>
		</switch>
		<switch name="instrumentation/it-gtx327/emission-factor">
			<default value="0.1"/>
			<test value="0.6">
				/rendering/scene/diffuse/red lt 0.7
			</test>
		</switch>
	</channel>
	<channel name="CED" execrate="3">
		<fcs_function>
			<function>
				<quotient>
					<property>propulsion/engine[0]/power-hp</property>
					<value>130</value>
				</quotient>
			</function>
			<output>/engines/engine[0]/load</output>
		</fcs_function>
	</channel>
 </system>
