<?xml version="1.0"?>
<system name="Dragonfly Instruments">
	
	<channel name="Airspeed Indicator">
		
		<fcs_function name="/instrumentation/airspeed-indicator/needle-mph">
			<function>
				<table>
					<independentVar>/instrumentation/airspeed-indicator/indicated-speed-kt</independentVar>
					<tableData>
						0	0
						17.3795	-14.9
						69.5181	-328.15
					</tableData>
				</table>
			</function>
		</fcs_function>
		<fcs_function name="/instrumentation/airspeed-indicator/needle-kt">
			<function>
				<table>
					<independentVar>/instrumentation/airspeed-indicator/indicated-speed-kt</independentVar>
					<tableData>
						0	0
						20	-14.9
						80	-328.15
					</tableData>
				</table>
			</function>
		</fcs_function>
		<fcs_function name="/instrumentation/airspeed-indicator/needle-kph">
			<function>
				<table>
					<independentVar>/instrumentation/airspeed-indicator/indicated-speed-kt</independentVar>
					<tableData>
						0	0
						21.5983	-14.9
						86.393	-328.15
					</tableData>
				</table>
			</function>
		</fcs_function>
		<switch>
			<default value="/instrumentation/airspeed-indicator/needle-mph"/>
			<test value="/instrumentation/airspeed-indicator/needle-kt">
				/instrumentation/airspeed-indicator/texture eq 1
			</test>
			<test value="/instrumentation/airspeed-indicator/needle-kph">
				/instrumentation/airspeed-indicator/texture eq 2
			</test>
			<output>/instrumentation/airspeed-indicator/needle-unit</output>
		</switch>
	
	</channel>
	<channel name="Hall Wind Meter">
		
		<fcs_function name="/instrumentation/airspeed-indicator[1]/pitot-tube-reference-speed-kt">
			<function>
				<quotient>
					<product>
						<property>velocities/u-aero-fps</property>
						<value>0.59248</value>
					</product>
					<sqrt>
						<ifthen>
							<gt> <p>accelerations/Nz</p> <v>0.0</v> </gt>
							<property>accelerations/Nz</property>
							<value>0.001</value>
						</ifthen>
					</sqrt>
				</quotient>
			</function>
		</fcs_function>

		<fcs_function name="/instrumentation/airspeed-indicator[1]/needle-mph">
			<function>
				<table>
					<!-- 7-80 mph -->
					<independentVar>/instrumentation/airspeed-indicator[1]/pitot-tube-reference-speed-kt</independentVar>
					<tableData>
						0	0
						6.08	0
						69.5181	0.1577
					</tableData>
				</table>
			</function>
		</fcs_function>
		<fcs_function name="/instrumentation/airspeed-indicator[1]/needle-kph">
			<function>
				<table>
					<!-- 11-130 kph -->
					<independentVar>/instrumentation/airspeed-indicator[1]/pitot-tube-reference-speed-kt</independentVar>
					<tableData>
						0	0
						5.94	0
						10.8	0.005915
						16.2	0.02193
						70.19	0.1555
					</tableData>
				</table>
			</function>
		</fcs_function>
		<switch>
			<default value="/instrumentation/airspeed-indicator[1]/needle-mph"/>
			<test value="/instrumentation/airspeed-indicator[1]/needle-kph">
				/instrumentation/airspeed-indicator[1]/texture eq 1
			</test>
			<output>/instrumentation/airspeed-indicator[1]/needle-unit</output>
		</switch>
	
	</channel>
</system>
