<?xml version="1.0"?>
<aerodynamics>
	<axis name="LIFT">
		
		<function name="aero/force/Lift_alpha">
			<description>Lift due to alpha</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<table>
					<independentVar lookup="row">aero/alpha-deg</independentVar>
					<tableData>
						-25.000  -0.7431
						-24.500  -0.7300
						-24.000  -0.7165
						-23.500  -0.7026
						-23.000  -0.6884
						-22.500  -0.6739
						-22.000  -0.6593
						-21.500  -0.6472
						-21.000  -0.6380
						-20.500  -0.6299
						-20.000  -0.6021
						-19.500  -0.5840
						-19.000  -0.5674
						-18.500  -0.5514
						-18.000  -0.5393
						-17.500  -0.5443
						-17.000  -0.5056
						-16.500  -0.4895
						-16.000  -0.4773
						-15.500  -0.4822
						-15.000  -0.4810
						-14.500  -0.4397
						-14.000  -0.4211
						-13.500  -0.4087
						-13.000  -0.4206
						-12.500  -0.4187
						-12.000  -0.3804
						-11.500  -0.3666
						-11.000  -0.3876
						-10.500  -0.3827
						-10.000  -0.3557
						-9.500  -0.3453
						-9.000  -0.3472
						-8.500  -0.4855
						-8.000  -0.5303
						-7.500  -0.5438
						-7.000  -0.5172
						-6.500  -0.4703
						-6.000  -0.4190
						-5.500  -0.3653
						-5.000  -0.3020
						-4.500  -0.2157
						-4.000  -0.1336 
						-3.500  -0.0522
						-3.000   0.0207
						-2.500   0.0947
						-2.000   0.1655
						-1.500   0.2401
						-1.000   0.3136
						-0.500   0.3890
						0.000   0.4491
						0.500   0.5074
						1.000   0.5640 
						1.500   0.6190  
						2.000   0.6750  
						2.500   0.7281 
						3.000   0.7768 
						3.500   0.8308 
						4.000   0.8996
						4.500   0.9591
						5.000   1.0145
						5.500   1.0668
						6.000   1.1165
						6.500   1.1646
						7.000   1.2102 
						7.500   1.2504
						8.000   1.2855
						8.500   1.3164
						9.000   1.3441
						9.500   1.3720 
						10.000   1.4008
						10.500   1.4303
						11.000   1.4590
						11.500   1.4773
						12.000   1.5069
						12.500   1.5064
						13.000   1.4970
						13.500   1.4761
						14.000   1.4408 
						14.500   1.3750
						15.000   1.0996
						17.000   1.0258
						17.500   1.0427 
						18.500   1.0552
						19.000   1.0908
						19.500   1.0739
						20.000   1.0950
						20.500   1.1072 
						21.000   1.0960
						21.500   1.1110
						22.000   1.1231
						22.500   1.1193
						23.000   1.1116
						23.500   1.1087
						24.000   1.1001
						24.500   0.9191
						25.000   0.9021
					</tableData>
				</table>
				<!--(ported from C172p:) ground effect-->
				<table>
					<independentVar>aero/h_b-mac-ft</independentVar>
					<tableData>
						0.0000	1.2030
						0.1000	1.1270
						0.1500	1.0900
						0.2000	1.0730
						0.3000	1.0460
						0.4000	1.0550
						0.5000	1.0190
						0.6000	1.0130
						0.7000	1.0080
						0.8000	1.0060
						0.9000	1.0030
						1.0000	1.0020
						1.1000	1.0000
					</tableData>
				</table>
			</product>
		</function>
		
		<function name="aero/force/Lift_flap">
			<description>Delta Lift due to flaps</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>fcs/flap-pos-deg</property>
				<value> 0.01 </value>
			</product>
		</function>
		
		<function name="aero/force/Lift_speedbrake">
			<description>Delta Lift due to speedbrake</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>fcs/speedbrake-pos-norm</property>
				<value>-0.05</value>
			</product>
		</function>
		
		<function name="aero/force/Lift_elevator">
			<description>Lift due to Elevator Deflection</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>fcs/elevator-pos-rad</property>
				<value>0.2</value>
			</product>
		</function>
		
	</axis>
	
	<axis name="DRAG">
		
		<function name="aero/force/Drag_basic">
			<description>Drag at zero lift</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<table>
					<independentVar lookup="row">aero/alpha-rad</independentVar>
					<tableData>
						-1.57    0.5
						-0.26    0.013
						0.00    0.009
						0.26    0.013
						1.57    0.9
					</tableData>
				</table>
				<!--(ported from C172p:) Ground effect: occurs when aircraft flies wingspan or less above the ground-->
				<table>
					<independentVar>aero/h_b-mac-ft</independentVar>
					<tableData>
						0.0000	0.4800
						0.1000	0.5150
						0.1500	0.6290
						0.2000	0.7090
						0.3000	0.8150
						0.4000	0.8820
						0.5000	0.9280
						0.6000	0.9620
						0.7000	0.9880
						0.8000	1.0000
						0.9000	1.0000
						1.0000	1.0000
						1.1000	1.0000
					</tableData>
				</table>
			</product>
		</function>
		
		<function name="aero/force/Drag_induced">
			<description>Induced drag</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>aero/cl-squared</property>
				<value>0.012</value>
			</product>
		</function>
		
		<function name="aero/force/Drag_mach">
			<description>Drag due to mach</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<table>
					<independentVar lookup="row">velocities/mach</independentVar>
					<tableData>
						0.00      0.000
						0.7      0.000
						1.10      0.023
						1.80      0.015
					</tableData>
				</table>
			</product>
		</function>
		
		<function name="aero/force/Drag_flap">
			<description>Drag due to flaps</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<table>
					<independentVar lookup="row">fcs/flap-pos-deg</independentVar>
					<tableData>
						-7	-0.002
						0	0
						7	0.002
						25	0.02
					</tableData>
				</table>
			</product>
		</function>
		
		<function name="aero/force/Drag_gear">
			<description>Drag due to gear</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>gear/gear-pos-norm</property>
				<value>0.66282</value> <!-- orthogonal area of extended gear (ft^2) -->
			</product>
		</function>
		
		<function name="aero/force/Drag_speedbrake">
			<description>Drag due to speedbrakes</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>fcs/speedbrake-pos-norm</property>
				<value>0.12</value>
			</product>
		</function>
		
		<function name="aero/force/Drag_beta">
			<description>Drag due to sideslip</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<table>
					<independentVar lookup="row">aero/beta-rad</independentVar>
					<tableData>
						-1.57    1.430
						-0.26    0.070
						0.00    0.000
						0.26    0.070
						1.57    1.430
					</tableData>
				</table>
			</product>
		</function>
		
		<function name="aero/force/Drag_elevator">
			<description>Drag due to Elevator Deflection</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<abs><property>fcs/elevator-pos-norm</property></abs>
				<value>0.001</value>
			</product>
		</function>
		
	</axis>
	
	<axis name="SIDE">
		
		<function name="aero/force/Side_beta">
			<description>Side force due to beta</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>aero/beta-rad</property>
				<value>-1</value>
			</product>
		</function>
		
	</axis>
	
	<axis name="ROLL">
		
		<function name="aero/moment/Roll_beta">
			<description>Roll moment due to beta</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>metrics/bw-ft</property>
				<property>aero/beta-rad</property>
				<value>-0.1</value>
			</product>
		</function>
		
		<function name="aero/moment/Roll_damp">
			<description>Roll moment due to roll rate</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>metrics/bw-ft</property>
				<property>aero/bi2vel</property>
				<property>velocities/p-aero-rad_sec</property>
				<value>-0.4</value>
			</product>
		</function>
		
		<function name="aero/moment/Roll_yaw">
			<description>Roll moment due to yaw rate</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>metrics/bw-ft</property>
				<property>aero/bi2vel</property>
				<property>velocities/r-aero-rad_sec</property>
				<value>0.15</value>
			</product>
		</function>
		
		<function name="aero/moment/Roll_aileron">
			<description>Roll moment due to aileron</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>metrics/bw-ft</property>
				<property>fcs/left-aileron-pos-rad</property>
				<value>0.12</value>
				<!-- (ported from c172p:) the ailerons are less efficient and even create an opposite roll moment close to stall because deflection down makes the wing portion stall-->
				<table>
					<independentVar lookup="row">aero/alpha-deg</independentVar>
					<tableData>
						15    1
						16    0.3
						18   -0.1
					</tableData>
				</table>
			</product>
		</function>
		
		<function name="aero/moment/Roll_rudder">
			<description>Roll moment due to rudder</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>metrics/bw-ft</property>
				<property>fcs/rudder-pos-rad</property>
				<value>0.01</value>
			</product>
		</function>
		
	</axis>
	
	<axis name="PITCH">
		
		<function name="aero/moment/Pitch_alpha">
			<description>Pitch moment due to alpha</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>metrics/cbarw-ft</property>
				<property>aero/alpha-rad</property>
				<value>-0.7</value>
			</product>
		</function>
		
		<function name="aero/moment/Pitch_elevator">
			<description>Pitch moment due to elevator</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>metrics/cbarw-ft</property>
				<property>fcs/elevator-pos-rad</property>
				<table>
					<independentVar lookup="row">velocities/mach</independentVar>
					<tableData>
						0.0     -0.500
						2.0     -0.300
					</tableData>
				</table>
				<!--(ported from C172p): the elevator looses efficiency when stalled-->
				<table>
					<independentVar lookup="row">fcs/elevator-pos-rad</independentVar>
					<independentVar lookup="column">aero/alpha-deg</independentVar>
					<tableData>
							20  	25	35	45	55	65	90
						-0.49	1	0.5	0.2	0.1	0.1	0.1	0.1
						0	1	0.6	0.3	0.15	0.1	0.1	0.1
						0.40	1	0.9	0.8	0.7	0.6	0.5	0.4
					</tableData>
				</table>
				<value>2.5</value>
			</product>
		</function>
		
		<function name="aero/moment/Pitch_damp">
			<description>Pitch moment due to pitch rate</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>metrics/cbarw-ft</property>
				<property>aero/ci2vel</property>
				<property>velocities/q-aero-rad_sec</property>
				<value>-13.5</value>
			</product>
		</function>
		
		<function name="aero/moment/Pitch_alphadot">
			<description>Pitch moment due to alpha rate</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>metrics/cbarw-ft</property>
				<property>aero/ci2vel</property>
				<property>aero/alphadot-rad_sec</property>
				<value>-12</value>
			</product>
		</function>
		
		<function name="aero/moment/Pitch_speedbrake">
			<description>Pitch moment due to speedbrake extension</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>metrics/cbarw-ft</property>
				<property>fcs/speedbrake-pos-norm</property>
				<value>-0.015</value>
			</product>
		</function>
		
	</axis>
	
	<axis name="YAW">
		
		<function name="aero/moment/Yaw_beta">
			<description>Yaw moment due to beta</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>metrics/bw-ft</property>
				<property>aero/beta-rad</property>
				<value>0.15</value>
			</product>
		</function>
		
		<function name="aero/moment/Yaw_damp">
			<description>Yaw moment due to yaw rate</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>metrics/bw-ft</property>
				<property>aero/bi2vel</property>
				<property>velocities/r-aero-rad_sec</property>
				<value>-0.08</value>
			</product>
		</function>
		
		<function name="aero/moment/Yaw_rudder">
			<description>Yaw moment due to rudder</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>metrics/bw-ft</property>
				<property>fcs/rudder-pos-rad</property>
				<table>
					<independentVar lookup="row">/sim/model/variant</independentVar>
					<tableData>
						0	-0.038
						1	-0.05
					</tableData>
				</table>
			</product>
		</function>
		
		<function name="aero/moment/Yaw_aileron">
			<description>Adverse yaw</description>
			<product>
				<property>aero/qbar-psf</property>
				<property>metrics/Sw-sqft</property>
				<property>metrics/bw-ft</property>
				<property>fcs/left-aileron-pos-rad</property>
				<value>-0.02</value>
			</product>
		</function>
		
	</axis>
	
	
	
</aerodynamics>
