<?xml version="1.0"?>
<system name="Arcus M Engine System">
	<channel name="Engine Controls">
		<fcs_function>
			<function>
				<table>
					<independentVar>atmosphere/pressure-altitude</independentVar>
					<tableData>
						0	1
						30000	0.36
					</tableData>
				</table>
			</function>
			<output>fcs/mixture-cmd-norm</output>
			<output>fcs/mixture-pos-norm</output>
		</fcs_function>
		<pure_gain>
			<input>/controls/engines/engine[0]/throttle-int</input>
			<gain>1.0</gain>
			<output>fcs/throttle-cmd-norm</output>
			<output>fcs/throttle-pos-norm</output>
		</pure_gain>
		<fcs_function name="fcs/propeller-brake">
			<function>
				<table>
					<independentVar lookup="row">/controls/engines/engine[0]/propeller-brake</independentVar>
					<tableData>
						0	0.27
						1	15
					</tableData>
				</table>
			</function>
			<output>propulsion/engine[0]/friction-hp</output>
		</fcs_function>
	</channel>
	<channel name="Control switching">
		<switch>
			<default value="0.0"/>
			<test value="/controls/engines/engine[0]/throttle">
				/controls/arcus/throttle-to-airbrake eq 1
			</test>
			<test value="/controls/engines/engine[0]/mixture">
				/controls/arcus/mixture-to-airbrake eq 1
			</test>
			<output>/controls/flight/spoilers-rev</output>
		</switch>
		<fcs_function name="/controls/flight/spoilers">
			<function>
				<table>
					<independentVar lookup="row">/controls/flight/spoilers-rev</independentVar>
					<tableData>
						0	1
						1	0
					</tableData>
				</table>
			</function>
		</fcs_function>
		<switch>
			<default value="0.0"/>
			<test value="/controls/engines/engine[0]/throttle">
				/controls/arcus/throttle-to-airbrake eq 0
			</test>
			<test value="/controls/engines/engine[0]/mixture" logic="AND">
				/controls/arcus/mixture-to-throttle eq 1
				/controls/arcus/throttle-to-airbrake eq 1
			</test>
			<output>/controls/engines/engine[0]/throttle-int</output>
		</switch>
	</channel>
	<channel name="Engine Controls Animation">
		<!--	Engine Control Panel	-->
		<lag_filter>
			<input>/controls/electric/engine-battery-switch</input>
			<c1>12.0</c1>
			<output>/controls/electric/engine-battery-switch-pos</output>
		</lag_filter>
		<lag_filter>
			<input>/controls/engines/engine/extend-propeller</input>
			<c1>12.0</c1>
			<output>/controls/engines/engine/extend-propeller-pos</output>
		</lag_filter>
	</channel>
</system>
