<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="http://jsbsim.sourceforge.net/JSBSim.xsl"?>
<fdm_config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd" version="2.0">
	<fileheader>
		<author> Benedikt Wolf (D-ECHO) </author>
		<filecreationdate> 2019-10-12 </filecreationdate>
		<version> 0.1 </version>
		<description> The ASK13 is a training glider </description>
	</fileheader>
	<reference title="Flight Manual (de)" url="http://www.smbc-eferding.at/wp-content/uploads/2014/01/Flughandbuch-ASK-13.pdf" />
	<reference title="Manufacturer's website" url="https://www.alexander-schleicher.de/flugzeuge/ask-13/" />
	<metrics>
		<wingarea unit="M2">17.5</wingarea>
		<wingspan unit="M">16</wingspan>
		<wing_incidence unit="DEG">    0.00 </wing_incidence> <!--reference?!-->
		<chord unit="M">1.14980</chord>	<!-- MAC-->
		<htailarea unit="M2">2.5</htailarea>
		<htailarm unit="M">4.2</htailarm>
		<vtailarea unit="M2">1.48</vtailarea>
		<vtailarm unit="M">4.9</vtailarm>
		<location name="AERORP" unit="M">
			<!--25% MAC-->
			<x> 2.43 </x>
			<y> 0.0 </y>
			<z> 0.629963 </z>
		</location>
		<location name="EYEPOINT" unit="M">
			<x>  -2.6 </x>
			<y>   0.00 </y>
			<z>  1 </z>
		</location>
		<location name="VRP" unit="M">
			<x>0</x>
			<y>0</y>
			<z>0</z>
		</location>
	</metrics>
	<mass_balance>
		<ixx unit="SLUG*FT2"> 1000 </ixx>
		<iyy unit="SLUG*FT2">  500 </iyy>
		<izz unit="SLUG*FT2"> 2000 </izz>
		<emptywt unit="KG"> 296 </emptywt>
		<!--inflight CG limits:
		front		70mm aft of RP		2.25411m
		rear		247mm aft of RP		2.43111m-->
		<location name="CG" unit="M">
			<x> 2.66 </x>
			<y> 0 </y>
			<z> 0.2 </z>
		</location>
		<pointmass name="Pilot">
			<weight unit="KG"> 75 </weight>
			<location name="POINTMASS" unit="M">
				<x> 1.35 </x>
				<y> 0.0 </y>
				<z> 0.2 </z>
			</location>
		</pointmass>
		<pointmass name="Trim Ballast">
			<weight unit="KG"> 0 </weight>
			<location name="POINTMASS" unit="M">
				<x> 0.95 </x>
				<y> 0.0 </y>
				<z> -0.15 </z>
			</location>
		</pointmass>
		<pointmass name="Copilot">
			<weight unit="KG"> 80 </weight>
			<location name="POINTMASS" unit="M">
				<x> 2.28 </x>
				<y> 0.0 </y>
				<z> 0.35 </z>
			</location>
		</pointmass>
	</mass_balance>
	<ground_reactions>
		<contact type="STRUCTURE" name="NOSE_SKID">
			<location unit="M">
				<x> 1.05593 </x>
				<y> 0.0 </y>
				<z> -0.46248 </z>
			</location>
			<static_friction>  0.800 </static_friction>
			<dynamic_friction> 0.700 </dynamic_friction>
			<spring_coeff unit="LBS/FT">      1000 </spring_coeff>
			<damping_coeff unit="LBS/FT/SEC">  100 </damping_coeff>
			<max_steer unit="DEG">0</max_steer>
			<brake_group>NONE</brake_group>
			<retractable>0</retractable>
		</contact>
		<contact type="BOGEY" name="MAIN_WHEEL">
			<location unit="M">
				<x> 2.61287 </x>
				<y> 0.0 </y>
				<z> -0.46391 </z>
			</location>
			<static_friction>  0.700 </static_friction>
			<dynamic_friction> 0.500 </dynamic_friction>
			<rolling_friction> 0.020 </rolling_friction>
			<spring_coeff unit="LBS/FT">      5000 </spring_coeff>
			<damping_coeff unit="LBS/FT/SEC">  300 </damping_coeff>
			<max_steer unit="DEG">0</max_steer>
			<brake_group>LEFT</brake_group>
			<retractable>0</retractable>
		</contact>
		<contact type="BOGEY" name="TAIL_WHEEL">
			<location unit="M">
				<x> 7.18679 </x>
				<y> 0.0 </y>
				<z> 0.23992 </z>
			</location>
			<static_friction>  0.600 </static_friction>
			<dynamic_friction> 0.400 </dynamic_friction>
			<rolling_friction> 0.020 </rolling_friction>
			<spring_coeff unit="LBS/FT">       1000 </spring_coeff>
			<damping_coeff unit="LBS/FT/SEC">   100 </damping_coeff>
			<max_steer unit="DEG">0</max_steer>
			<brake_group>NONE</brake_group>
			<retractable>0</retractable>
		</contact>
		<contact type="STRUCTURE" name="LEFT_WING_SKID">
			<location unit="M">
				<x>  1.83 </x>
				<y> -7.88 </y>
				<z>  0.97 </z>
			</location>
			<static_friction>  0.800 </static_friction>
			<dynamic_friction> 0.700 </dynamic_friction>
			<spring_coeff unit="LBS/FT">        396.90 </spring_coeff>
			<damping_coeff unit="LBS/FT/SEC">   198.45 </damping_coeff>
		</contact>
		<contact type="STRUCTURE" name="RIGHT_WING_SKID">
			<location unit="M">
				<x>  1.83 </x>
				<y>  7.88 </y>
				<z>  0.97 </z>
			</location>
			<static_friction>  0.800 </static_friction>
			<dynamic_friction> 0.700 </dynamic_friction>
			<spring_coeff unit="LBS/FT">        396.90 </spring_coeff>
			<damping_coeff unit="LBS/FT/SEC">   198.45 </damping_coeff>
		</contact>
		<contact type="STRUCTURE" name="CANOPY_TOP">
			<location unit="M">
				<x> 1.33478 </x>
				<y> 0.0 </y>
				<z> 0.87244 </z>
			</location>
			<static_friction>  0.80 </static_friction>
			<dynamic_friction> 0.50 </dynamic_friction>
			<spring_coeff unit="LBS/FT">       500 </spring_coeff>
			<damping_coeff unit="LBS/FT/SEC">   250 </damping_coeff>
		</contact>
		<contact type="STRUCTURE" name="TAIL_TOP">
			<location unit="M">
				<x> 7.32 </x>
				<y> 0.0  </y>
				<z> 1.96 </z>
			</location>
			<static_friction>  0.80 </static_friction>
			<dynamic_friction> 0.50 </dynamic_friction>
			<spring_coeff unit="LBS/FT">       500 </spring_coeff>
			<damping_coeff unit="LBS/FT/SEC">   250 </damping_coeff>
		</contact>
	</ground_reactions>
	<propulsion/>
	<flight_control name="FCS: Ask_13">
		<channel name="Elevator">
			<fcs_function name="trim-effect">
				<function>
					<table>
						<independentVar>aero/qbar-psf</independentVar>
						<tableData>
							0	0
							10	1
						</tableData>
					</table>
				</function>
			</fcs_function>
			<fcs_function name="stick-and-trim">
				<function>
					<table>
						<independentVar lookup="row">/controls/flight/elevator</independentVar>
						<independentVar lookup="column">fcs/trim-deflection</independentVar>
						<tableData>
								-1	1
							-1	-1	-1
							0	-0.5	0.5
							1	1	1
							
						</tableData>
					</table>
				</function>
			</fcs_function>
			<fcs_function name="drop-gravity">
				<function>
					<table>
						<independentVar lookup="row">/controls/flight/elevator</independentVar>
						<independentVar lookup="column">aero/qbar-psf</independentVar>
						<tableData>
								0	0.5	5
							-1	0	0	0
							0	1	1	0
						</tableData>
					</table>
				</function>
			</fcs_function>
			<fcs_function name="trim-deflection"> <!--mechanical linkage between elevator and trim-->
				<function>
					<table>
						<independentVar lookup="row">fcs/elevator-position</independentVar>
						<independentVar lookup="column">/controls/flight/elevator-trim</independentVar>
						<tableData>
								-1	0	1
							-1	0	0.35	0.7
							-0.35	0	0.35	0.3
							0.35	-0.3	-0.35	0
							1	-0.7	-0.35	0
						</tableData>
					</table>
				</function>
			</fcs_function>
			<summer name="Elevator Position">
				<input>fcs/stick-and-trim</input>
				<input>fcs/drop-gravity</input>
				<clipto>
					<min>-1</min>
					<max>1</max>
				</clipto>
				<output>fcs/elevator-pos-norm</output>
			</summer> 			
			<aerosurface_scale name="Elevator Control">
				<input>fcs/elevator-position</input>
				<range>
					<min> -0.35 </min>
					<max>  0.35 </max>
				</range>
				<output>fcs/elevator-pos-rad</output>
			</aerosurface_scale>
		</channel>
		<channel name="Roll">
			<aerosurface_scale name="Left Aileron Control">
				<input>fcs/aileron-cmd-norm</input>
				<range>
					<min> -0.35 </min>
					<max>  0.35 </max>
				</range>
				<output>fcs/left-aileron-pos-rad</output>
			</aerosurface_scale>
			<aerosurface_scale name="Right Aileron Control">
				<input>fcs/aileron-cmd-norm</input>
				<range>
					<min> -0.35 </min>
					<max>  0.35 </max>
				</range>
				<output>fcs/right-aileron-pos-rad</output>
			</aerosurface_scale>
			<aerosurface_scale name="left aileron normalization">
				<input>fcs/left-aileron-pos-rad</input>
				<domain>
					<min> -0.35 </min>
					<max>  0.35 </max>
				</domain>
				<range>
					<min> -1 </min>
					<max>  1 </max>
				</range>
				<output>fcs/left-aileron-pos-norm</output>
			</aerosurface_scale>
			<aerosurface_scale name="right aileron normalization">
				<input>fcs/right-aileron-pos-rad</input>
				<domain>
					<min> -0.35 </min>
					<max>  0.35 </max>
				</domain>
				<range>
					<min> -1 </min>
					<max>  1 </max>
				</range>
				<output>fcs/right-aileron-pos-norm</output>
			</aerosurface_scale>
		</channel>
		<channel name="Rudder">
			<aerosurface_scale name="Rudder Control">
				<input>fcs/rudder-cmd-norm</input>
				<range>
					<min> -0.524 </min>
					<max>  0.524 </max>
				</range>
				<output>fcs/rudder-pos-rad</output>
			</aerosurface_scale>
			<aerosurface_scale name="rudder normalization">
				<input>fcs/rudder-pos-rad</input>
				<domain>
					<min> -0.524 </min>
					<max>  0.524 </max>
				</domain>
				<range>
					<min> -1 </min>
					<max>  1 </max>
				</range>
				<output>fcs/rudder-pos-norm</output>
			</aerosurface_scale>
		</channel>
		<channel name="Speed Brake">
			
			<fcs_function name="fcs/speedbrake-cmd">
				<function>
					<table>
						<independentVar lookup="row">/controls/engines/engine/throttle</independentVar>
						<tableData>
							0	1
							1	0
						</tableData>
					</table>
				</function>
			</fcs_function>
			
			<fcs_function name="fcs/speedbrake-int-norm">
				<function>
					<table>
						<independentVar lookup="row">fcs/speedbrake-cmd</independentVar>
						<tableData>
							0	0
							0.9	1
							1	1
						</tableData>
					</table>
				</function>
				<output>fcs/speedbrake-pos-norm</output>
			</fcs_function>
		
		</channel>
		<channel name="Wheel Brake">
			
			<fcs_function name="fcs/wheelbrake-cmd">
				<function>
					<table>
						<independentVar lookup="row">fcs/speedbrake-cmd</independentVar>
						<tableData>
							0	0
							0.9	0
							1	0.3
						</tableData>
					</table>
				</function>
				<output>fcs/left-brake-cmd-norm</output>
			</fcs_function>
			
		</channel>
		
		<property value="0">/canopy/normal-cmd</property>
		<property value="0">/canopy/jettison-cmd</property>
		<channel name="Canopy">		
			<kinematic name="/canopy/normal-pos-norm">
				<input>/canopy/normal-cmd</input>
				<traverse>
					<setting>
						<position>0</position>
						<time>0</time>
					</setting>
					<setting>
						<position>1</position>
						<time>2</time>
					</setting>
				</traverse>
			</kinematic>
			<kinematic name="/canopy/jettison-pos-norm">
				<input>/canopy/jettison-cmd</input>
				<traverse>
					<setting>
						<position>0</position>
						<time>0</time>
					</setting>
					<setting>
						<position>1</position>
						<time>0.1</time>
					</setting>
				</traverse>
			</kinematic>
		</channel>
	</flight_control>
	<system file="ground_handling"/>
	<aerodynamics file="Systems/ask13-aero.xml"/>
	<external_reactions>
		<force name="turn" frame="BODY">
			<location unit="M">
				<x> -0.99095</x>
				<!--wing tip-->
				<y>  -8</y>
				<z> 1.3</z>
			</location>
			<direction>
				<x> 1.0</x>
				<y> 0.0</y>
				<z> 0.0</z>
			</direction>
		</force>
		<force name="pull" frame="BODY">
			<location unit="M">
				<x> -0.99095</x>
				<!--body-->
				<y>  0</y>
				<z> 1.3</z>
			</location>
			<direction>
				<x> 1.0</x>
				<y> 0.0</y>
				<z> 0.0</z>
			</direction>
		</force>
		<force name="winch_hitch" frame="BODY" unit="LBS">
			<!--approximate winch hook position-->
			<location unit="M">
				<x>  1.65 </x>
				<y> -0.09 </y>
				<z> -0.3  </z>
			</location>
			<direction>
				<x> 0.0</x>
				<y> 0.0</y>
				<z> 0.0</z>
			</direction>
		</force>
		<force name="aerotow_hitch" frame="BODY" unit="LBS">
			<!--approximate aerotow hook position-->
			<location unit="M">
				<x>  0.0    </x>
				<y>  0.0    </y>
				<z> -0.1125 </z>
			</location>
			<direction>
				<x>0.0</x>
				<y>0.0</y>
				<z>0.0</z>
			</direction>
		</force>
	</external_reactions>
</fdm_config>
		

