UNPKG

jsbsim.js

Version:

JSBSim flight dynamics model ported to JavaScript

1,075 lines (1,004 loc) 126 kB
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="http://jsbsim.sourceforge.net/JSBSim.xsl"?> <fdm_config name="General Dynamics F-22A" version="2.0" release="PRODUCTION" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd"> <fileheader> <author>Brian Mills </author> <filecreationdate>2009-05-24</filecreationdate> <version>$Revision: 1.38 $</version> <description>Models an F-22A Raptor</description> <license> <licenseName>GPL (General Public License)</licenseName> <licenseURL>http://www.gnu.org/licenses/gpl.html</licenseURL> </license> <note> This model was created using data that is, or has been, publically available by means of technical reports, textbooks, image graphs or published code. This aircraft description file is in no way related to the manufacturer of the real aircraft. Neither the name of (any of) the authors nor the names of (any of) the manufacturers may be used to endorse or promote products derived from this file. The data is provided ''as is'' and any express or implied warranties, including, but not limitted to the implied warranties of merchantability and fitness for a particular purpose are disclaimed. </note> </fileheader> <metrics> <wingarea unit="FT2"> 840.0 </wingarea> <wingspan unit="FT"> 44.49 </wingspan> <chord unit="FT"> 23.06 </chord> <htailarea unit="FT2"> 238.9 </htailarea> <htailarm unit="FT"> 18.66 </htailarm> <vtailarea unit="FT2"> 158.2 </vtailarea> <vtailarm unit="FT"> 0 </vtailarm> <location name="AERORP" unit="IN"> <x> 417.6 </x> <y> 0 </y> <z> 0 </z> </location> <location name="EYEPOINT" unit="IN"> <x> 148.8 </x> <y> 0 </y> <z> 38 </z> </location> <location name="VRP" unit="IN"> <x> 100 </x> <y> 0 </y> <z> 0 </z> </location> </metrics> <mass_balance> <ixx unit="SLUG*FT2"> 56005 </ixx> <iyy unit="SLUG*FT2"> 280766 </iyy> <izz unit="SLUG*FT2"> 354090 </izz> <ixz unit="SLUG*FT2"> 713 </ixz> <emptywt unit="LBS"> 43430 </emptywt> <location name="CG" unit="IN"> <x> 445.7 </x> <y> 0 </y> <z> -18.6 </z> </location> <pointmass name="Pilot"> <weight unit="LBS"> 230 </weight> <location name="POINTMASS" unit="IN"> <x> 148.8 </x> <y> 0 </y> <z> 20 </z> </location> </pointmass> </mass_balance> <ground_reactions> <contact type="BOGEY" name="NOSE_LG"> <location unit="IN"> <x> 96.7 </x> <y> 0 </y> <z> -89.3 </z> </location> <static_friction> 0.8 </static_friction> <dynamic_friction> 0.5 </dynamic_friction> <rolling_friction> 0.02 </rolling_friction> <spring_coeff unit="LBS/FT"> 18603.4 </spring_coeff> <damping_coeff unit="LBS/FT/SEC"> 6201.1 </damping_coeff> <max_steer unit="DEG"> 80 </max_steer> <brake_group> NONE </brake_group> <retractable>1</retractable> </contact> <contact type="BOGEY" name="LEFT_MLG"> <location unit="IN"> <x> 468.8 </x> <y> -48 </y> <z> -89.3 </z> </location> <static_friction> 0.8 </static_friction> <dynamic_friction> 0.5 </dynamic_friction> <rolling_friction> 0.02 </rolling_friction> <spring_coeff unit="LBS/FT"> 82011.2 </spring_coeff> <damping_coeff unit="LBS/FT/SEC"> 22402.2 </damping_coeff> <max_steer unit="DEG"> 0.0 </max_steer> <brake_group> LEFT </brake_group> <retractable>1</retractable> </contact> <contact type="BOGEY" name="RIGHT_MLG"> <location unit="IN"> <x> 468.8 </x> <y> 48 </y> <z> -89.3 </z> </location> <static_friction> 0.8 </static_friction> <dynamic_friction> 0.5 </dynamic_friction> <rolling_friction> 0.02 </rolling_friction> <spring_coeff unit="LBS/FT"> 82011.2 </spring_coeff> <damping_coeff unit="LBS/FT/SEC"> 22402.2 </damping_coeff> <max_steer unit="DEG"> 0.0 </max_steer> <brake_group> RIGHT </brake_group> <retractable>1</retractable> </contact> </ground_reactions> <propulsion> <engine file="F119-PW-1"> <location unit="IN"> <x> 684.131 </x> <y> -20 </y> <z> 0 </z> </location> <orient unit="DEG"> <roll> 0.0 </roll> <pitch> 0 </pitch> <yaw> 0 </yaw> </orient> <feed>0</feed> <feed>1</feed> <thruster file="direct"> <location unit="IN"> <x> 684.131 </x> <y>-20 </y> <z> 0 </z> </location> <orient unit="DEG"> <roll> 0.0 </roll> <pitch> 0.0 </pitch> <yaw> 0.0 </yaw> </orient> </thruster> </engine> <engine file="F119-PW-1"> <location unit="IN"> <x> 684.131 </x> <y> 20 </y> <z> 0 </z> </location> <orient unit="DEG"> <roll> 0.0 </roll> <pitch> 0 </pitch> <yaw> 0 </yaw> </orient> <feed>0</feed> <feed>1</feed> <thruster file="direct"> <location unit="IN"> <x> 684.131 </x> <y> 20 </y> <z> 0 </z> </location> <orient unit="DEG"> <roll> 0.0 </roll> <pitch> 0.0 </pitch> <yaw> 0.0 </yaw> </orient> </thruster> </engine> <tank type="FUEL"> <location unit="IN"> <x> 446.478 </x> <y> -36 </y> <z> -18.6033 </z> </location> <capacity unit="LBS"> 9350 </capacity> <contents unit="LBS"> 9350 </contents> </tank> <tank type="FUEL"> <location unit="IN"> <x> 446.478 </x> <y> 36 </y> <z> -18.6033 </z> </location> <capacity unit="LBS"> 9350 </capacity> <contents unit="LBS"> 9350 </contents> </tank> </propulsion> <flight_control name="F-22 FC"> <!-- Declare some interface properties --> <!-- <property>fcs/alpha-norm</property> <property>fcs/tvc-pos-norm</property> <property>fcs/tvc-pos-rad</property> <property>fcs/thrust-norm</property> <property>fcs/lef-pos-rad</property> <property>fcs/lef-pos-norm</property> <property>fcs/throttle-override</property> <property>fcs/speedbrake-aileron</property> <property>fcs/speedbrake-aileron-right</property> <property>fcs/speedbrake-rudder</property> <property>fcs/speedbrake-flap</property> <property>fcs/yaw-rate-integrator</property> <property>fcs/pitch-rate-integrator</property> <property>fcs/tvc-inhibit</property> --> <channel name="Lateral"> <!-- Normalize the u-velocity to m/s--> <pure_gain name="fcs/u-velocity-norm"> <input>velocities/u-fps</input> <gain>0.3048</gain> </pure_gain> <summer name="fcs/aileron-cmd-limiter"> <input>fcs/aileron-cmd-norm</input> <input>fcs/roll-trim-cmd-norm</input> <clipto> <min>-1</min> <max>1</max> </clipto> </summer> <!-- Stick filter --> <lag_filter name="fcs/roll-cmd-filter"> <input>fcs/aileron-cmd-limiter</input> <c1>10</c1> </lag_filter> <!-- Limit roll rate command in radians based on altitude, mach and AoA--> <fcs_function name="fcs/roll-cmd-limit"> <function> <table> <independentVar lookup="column">velocities/mach</independentVar> <independentVar lookup="row">aero/alpha-deg</independentVar> <independentVar lookup="table">position/h-sl-ft</independentVar> <tableData breakPoint="0"> 0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 -90 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 -25 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 -20 0.6 0.85 1 1 1 1 1 1 1 -15 0.6 0.85 1.5 1.5 1.5 1.5 1.5 1.5 1.5 -10 0.6 1 2.5 3.14 3.14 3.14 3.14 2.617 2.1 0 0.6 1.5 2.5 3.66 4 4 3.14 2.617 2.1 10 0.6 1 2.5 3.14 3.14 3.14 3.14 2.617 2.1 15 0.6 0.85 2.5 2.617 2.617 2.617 2.617 2.617 2.1 20 0.6 0.85 2.1 2.1 2.1 2.1 2.1 2.1 2.1 25 0.6 0.85 1.5 1.5 1.5 1.5 1.5 1.5 1.5 30 0.6 0.85 1.3 1.3 1.3 1.3 1.3 1.3 1.3 35 0.6 0.85 1 1 1 1 1 1 1 40 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 45 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 180 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 </tableData> <tableData breakPoint="30000"> 0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 -90 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 -25 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 -20 0.6 0.85 1 1 1 1 1 1 1 -15 0.6 0.85 1.5 1.5 1.5 1.5 1.5 1.5 1.5 -10 0.6 0.85 2.5 3.14 3.14 3.14 3.14 2.617 2.1 0 0.6 0.85 2.5 3.66 4 4 3.14 2.617 2.1 10 0.6 0.85 2.5 3.14 3.14 3.14 3.14 2.617 2.1 15 0.6 0.85 2.5 2.617 2.617 2.617 2.617 2.617 2.1 20 0.6 0.85 2.1 2.1 2.1 2.1 2.1 2.1 2.1 25 0.6 0.85 1.5 1.5 1.5 1.5 1.5 1.5 1.5 30 0.6 0.85 1.3 1.3 1.3 1.3 1.3 1.3 1.3 35 0.6 0.85 1 1 1 1 1 1 1 40 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 45 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 180 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 </tableData> <tableData breakPoint="70000"> 0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 -90 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 -25 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 -20 0.6 0.85 1 1 1 1 1 1 1 -15 0.6 0.85 1 1.25 1.5 1.5 1.5 1.5 1.5 -10 0.6 0.85 1.5 1.5 2 2.25 2.25 2.25 2 0 0.6 0.85 1.5 2 2.5 2.5 2.75 2.75 2.5 10 0.6 0.85 1.5 1.5 2 2.25 2.25 2.25 2 15 0.6 0.85 1.5 2 2 2 2 2 2 20 0.6 0.85 1 1.25 1.5 2 2 2 2 25 0.6 0.85 1 1.25 1.5 1.5 1.5 1.5 1.5 30 0.6 0.85 1 1 1.3 1.3 1.3 1.3 1.3 35 0.6 0.85 1 1 1 1 1 1 1 40 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 45 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 180 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 </tableData> </table> </function> </fcs_function> <!-- Calculate the normalized commanded roll rate absolutely limited to +230 deg/s -230 deg/s--> <pure_gain name="fcs/roll-rate-cmd"> <input>fcs/roll-cmd-filter</input> <gain>fcs/roll-cmd-limit</gain> <clipto> <min>-4</min> <max>4</max> </clipto> </pure_gain> <deadband name="fcs/roll-windup-trigger"> <input>fcs/roll-rate-integrator</input> <width>8</width> <clipto> <min>-4</min> <max>4</max> </clipto> </deadband> <summer name="fcs/roll-rate-error"> <input>fcs/roll-rate-cmd</input> <input>-velocities/p-aero-rad_sec</input> <input>-fcs/roll-windup-trigger</input> </summer> <integrator name="fcs/roll-rate-integrator"> <!--trigger>fcs/aileron-int-trigger</trigger--> <input>fcs/roll-rate-error</input> <c1> 1 </c1> <clipto> <min>-4</min> <max>4</max> </clipto> </integrator> <!-- Normalize the v-velocity to m/s--> <pure_gain name="fcs/v-velocity-norm"> <input>velocities/v-fps</input> <gain>0.3048</gain> </pure_gain> <pure_gain name="fcs/rudder-cmd-limiter"> <input>fcs/rudder-cmd-norm</input> <gain> 1.0 </gain> <clipto> <min>-1</min> <max>1</max> </clipto> </pure_gain> <!-- Rudder pedal filter --> <lag_filter name="fcs/rudder-cmd-filter"> <input>fcs/rudder-cmd-limiter</input> <c1>10</c1> </lag_filter> <!-- Limit yaw rate command in radians based on mach and altitude --> <fcs_function name="fcs/yaw-rate-limit"> <function> <table> <independentVar lookup="row">velocities/mach</independentVar> <independentVar lookup="column">position/h-sl-ft</independentVar> <tableData> 0 36000 0 -0.436 -0.436 0.4 -0.349 -0.349 0.8 -0.1745 -0.1745 1.0 -0.1 -0.1 2.0 -0.1 -0.1 </tableData> </table> </function> </fcs_function> <pure_gain name="fcs/yaw-rate-cmd"> <input>fcs/rudder-cmd-filter</input> <gain>fcs/yaw-rate-limit</gain> </pure_gain> <!-- washout filter to fullfill handling qualities--> <washout_filter name="fcs/yaw-rate-filter"> <input>velocities/r-aero-rad_sec</input> <c1> 1.2 </c1> </washout_filter> <deadband name="fcs/yaw-windup-trigger"> <input>fcs/yaw-rate-integrator</input> <width>0.872</width> <clipto> <min>-0.436</min> <max>0.436</max> </clipto> </deadband> <summer name="fcs/yaw-rate-error"> <input> -fcs/yaw-rate-filter </input> <input> -fcs/yaw-windup-trigger </input> <input> fcs/yaw-rate-cmd </input> </summer> <integrator name="fcs/yaw-rate-integrator"> <!--trigger>fcs/rudder-int-trigger</trigger--> <input>fcs/yaw-rate-error</input> <c1> 1 </c1> <clipto> <min>-0.436</min> <max>0.436</max> </clipto> <output>fcs/yaw-rate-integrator</output> </integrator> <!-- if yaw rate exceeds limits based on rate and mach, then apply opposite rudder--> <fcs_function name="fcs/yaw-rate-override"> <function> <table> <independentVar lookup="row">velocities/r-aero-rad_sec</independentVar> <independentVar lookup="column">velocities/mach</independentVar> <tableData> 0 0.4 0.8 1.0 2.0 -0.440 0.872 0.7 0.35 0.2 0.2 -0.436 0 0.7 0.35 0.2 0.2 -0.360 0 0.7 0.35 0.2 0.2 -0.349 0 0 0.35 0.2 0.2 -0.180 0 0 0.35 0.2 0.2 -0.1745 0 0 0 0.2 0.2 -0.11 0 0 0 0.2 0.2 -0.1 0 0 0 0 0 0 0 0 0 0 0 0.1 0 0 0 0 0 0.11 0 0 0 -0.2 -0.2 0.1745 0 0 0 -0.2 -0.2 0.18 0 0 -0.35 -0.2 -0.2 0.349 0 0 -0.35 -0.2 -0.2 0.36 0 -0.7 -0.35 -0.2 -0.2 0.436 0 -0.7 -0.35 -0.2 -0.2 0.440 -0.872 -0.7 -0.35 -0.2 -0.2 </tableData> </table> </function> </fcs_function> <summer name="fcs/yaw-cmd-summer"> <input>fcs/yaw-rate-integrator</input> <input>fcs/yaw-rate-override</input> </summer> <!-- LQR Tracker Integral aileron roll-rate control--> <fcs_function name="fcs/roll-cmd"> <function> <product> <sum> <product> <table> <independentVar lookup="row">velocities/vc-kts</independentVar> <independentVar lookup="column">position/h-sl-ft</independentVar> <tableData> 0 33000 50000 160 0.5 0.35 0.3 270 0.5 0.35 0.3 400 0.45 0.4 0.3 500 0.45 0.4 0.35 580 0.5 0.45 0.35 1000 0.5 0.45 0.4 </tableData> </table> <property> fcs/roll-rate-integrator </property> <value> -1 </value> <table> <independentVar lookup="row">velocities/vc-kts</independentVar> <independentVar lookup="column">position/h-sl-ft</independentVar> <tableData> 0 33000 50000 160 -28.4059 -31.1627 -31.1627 270 -30.9146 -32.6575 -32.6575 330 -35.9146 -32.6575 -32.6575 400 -44.4687 -38.7651 -38.7651 580 -44.2746 -36.5662 -36.5662 700 -39.0735 -34.9842 -34.9842 </tableData> </table> </product> <product> <property> fcs/v-velocity-norm </property> <value> 0 </value> <table> <independentVar lookup="row">velocities/vc-kts</independentVar> <independentVar lookup="column">position/h-sl-ft</independentVar> <tableData> 0 33000 50000 160 -0.0494 -0.0266 -0.0266 270 0.0067 -0.0160 -0.0160 330 0.0067 -0.0160 -0.0160 400 -0.1082 -0.0108 -0.0108 580 -0.0104 -0.0091 -0.0091 700 -0.0095 -0.0118 -0.0118 </tableData> </table> </product> <product> <!--table> <independentVar lookup="row">velocities/vc-kts</independentVar> <independentVar lookup="column">position/h-sl-ft</independentVar> <tableData> 0 33000 50000 160 1 1.5 2 270 1 1.35 1.75 400 1 1.2 1.5 500 1.0 1.1 1.0 580 1.0 1.0 1.0 1000 1.0 1.0 1.0 </tableData> </table--> <property>velocities/p-aero-rad_sec</property> <value>-.35</value> <table> <independentVar lookup="row">velocities/vc-kts</independentVar> <independentVar lookup="column">position/h-sl-ft</independentVar> <tableData> 0 33000 50000 160 11.7952 13.4573 13.4573 270 11.9041 13.1381 13.1381 330 11.9041 13.1381 13.1381 400 12.0644 10.6808 10.6808 580 11.0366 10.7511 10.7511 700 9.3909 10.8556 10.8556 </tableData> </table> </product> </sum> <!--table> <independentVar lookup="row">velocities/vc-kts</independentVar> <independentVar lookup="column">aero/alpha-rad</independentVar> <tableData> -1 -0.25 0 0.25 0.5 1 2 3 160 1.5 1.25 1 1.25 1.5 2 2.5 3 270 1.5 1.25 1 1.25 1.5 2 2.5 3 400 1.5 1.25 1 1.25 1.5 2 2.5 3 500 1.5 1.15 1 1.15 1.35 2 2.5 3 580 1.5 1.15 1 1.15 1.35 2 2.5 3 1000 1.5 1.15 1 1.15 1.35 2 2.5 3 </tableData> </table--> </product> </function> <clipto> <min>-5</min> <max>5</max> </clipto> </fcs_function> <aerosurface_scale name="fcs/roll-reg-scale"> <input> fcs/roll-cmd </input> <domain> <min> -5 </min> <max> 5 </max> </domain> <range> <min> -1 </min> <max> 1 </max> </range> </aerosurface_scale > <actuator name="fcs/aileron-act"> <input> fcs/roll-reg-scale</input> <lag> 0.00 </lag> <rate_limit> 2.29 </rate_limit> <clipto> <min> -1 </min> <max> 1 </max> </clipto> </actuator> <summer name="fcs/left-aileron-out"> <input>fcs/aileron-act</input> <input>fcs/speedbrake-aileron</input> <clipto> <min> -1 </min> <max> 1 </max> </clipto> <output>fcs/left-aileron-pos-norm</output> </summer> <aerosurface_scale name="fcs/left-aileron-control"> <input>fcs/aileron-act</input> <range> <min>-0.436</min> <max>0.436</max> </range> <output>fcs/left-aileron-pos-rad</output> </aerosurface_scale> <pure_gain name="fcs/left-aileron-neg"> <input>fcs/aileron-act</input> <gain>-1</gain> </pure_gain> <summer name="fcs/right-aileron-out"> <input>fcs/left-aileron-neg</input> <input>fcs/speedbrake-aileron-right</input> <clipto> <min> -1 </min> <max> 1 </max> </clipto> <output>fcs/right-aileron-pos-norm</output> </summer> <aerosurface_scale name="fcs/right-aileron-control"> <input>fcs/left-aileron-neg</input> <range> <min>-0.436</min> <max>0.436</max> </range> <output>fcs/right-aileron-pos-rad</output> </aerosurface_scale> <!-- LQR Tracker Integral rudder yaw-rate control--> <fcs_function name="fcs/yaw-cmd"> <function> <product> <sum> <product> <property>fcs/yaw-cmd-summer</property> <value>-0.2</value> <table> <independentVar lookup="row">velocities/vc-kts</independentVar> <independentVar lookup="column">position/h-sl-ft</independentVar> <tableData> 0 33000 50000 160 22.1027 22.1741 22.1741 270 22.1775 15.7518 15.7518 400 14.0894 14.0894 14.0894 580 12.8629 12.8629 12.8629 700 14.8347 12.8631 12.8631 </tableData> </table> </product> <product> <property>fcs/yaw-rate-filter</property> <value>-0.2</value> <table> <independentVar lookup="row">velocities/vc-kts</independentVar> <independentVar lookup="column">position/h-sl-ft</independentVar> <tableData> 0 33000 50000 160 -21.4844 -29.9948 -29.9948 270 -19.5573 -17.5259 -17.5259 400 -13.6930 -13.6930 -13.6930 580 -9.6423 -9.6423 -9.6423 700 -7.7903 -6.1197 -6.1197 </tableData> </table> </product> </sum> <table> <independentVar lookup="row">velocities/vc-kts</independentVar> <independentVar lookup="column">position/h-sl-ft</independentVar> <tableData> 0 33000 50000 160 1 1.2 1.2 270 1 1.1 1.1 400 0.5 0.55 0.6 580 0.3 0.35 0.4 700 0.2 0.25 0.3 </tableData> </table> <table> <independentVar lookup="row">aero/alpha-deg</independentVar> <independentVar lookup="column">position/h-sl-ft</independentVar> <tableData> 0 33000 50000 -60 3 3.5 4 -40 2 2.5 3 -20 1.5 1.75 2 0 0.7 0.8 0.9 20 1.75 2 2.5 40 2.5 3 3.5 60 3 3.5 4 80 3.5 4 5 </tableData> </table> </product> </function> <clipto> <min>-5</min> <max>5</max> </clipto> </fcs_function> <aerosurface_scale name="fcs/yaw-reg-scale"> <input> fcs/yaw-cmd </input> <domain> <min> -5 </min> <max> 5 </max> </domain> <range> <min> -1 </min> <max> 1 </max> </range> </aerosurface_scale > <actuator name="fcs/rudder-act"> <input> fcs/yaw-reg-scale</input> <lag> 0 </lag> <rate_limit> 2.673 </rate_limit> <clipto> <min> -1 </min> <max> 1 </max> </clipto> </actuator> <summer name="fcs/rudder-pos-out"> <input>fcs/rudder-act</input> <input>fcs/speedbrake-rudder</input> <clipto> <min> -1 </min> <max> 1 </max> </clipto> <output>fcs/rudder-pos-norm</output> </summer> <aerosurface_scale name="fcs/rudder-position"> <input>fcs/rudder-act</input> <range> <min>-0.5236</min> <max>0.5236</max> </range> <output>fcs/rudder-pos-rad</output> </aerosurface_scale> </channel> <channel name="Pitch"> <!-- - accelerations/n-pilot-z-norm has the disadvantage that it - has an offset of 1G when positioned horizontal (and -1G - when upside down). To calculate the difference between the - commanded pitch-rate and actual pitch-rate this offset has - to be eliminated. The following function calculates an offset - to compensate for the earth's gravity. --> <fcs_function name="fcs/n-pilot-z-correction"> <function> <product> <cos> <property>attitude/pitch-rad</property> </cos> <cos> <property>attitude/roll-rad</property> </cos> </product> </function> </fcs_function> <summer name="fcs/g-load-corrected"> <input>accelerations/n-pilot-z-norm</input> <input>-fcs/n-pilot-z-correction</input> </summer> <pure_gain name="fcs/g-load-norm"> <input>fcs/g-load-corrected</input> <gain>-1.0</gain> </pure_gain> <!-- Pilot stick filter --> <lag_filter name="fcs/stick-filter"> <input>fcs/elevator-cmd-norm</input> <c1>10</c1> </lag_filter> <!-- Do not allow TVC to operate when gear is down! --> <switch name="fcs/tvc-inhibit"> <default value="1"/> <test logic="AND" value="0"> gear/gear-pos-norm gt 0 </test> <output>fcs/tvc-inhibit</output> </switch> <summer name="fcs/elevator-cmd-limiter"> <input>fcs/stick-filter</input> <input>fcs/pitch-trim-cmd-norm</input> <clipto> <min>-1</min> <max>0.6</max> </clipto> </summer> <!-- Limit pitch rate command based on altitude and mach. Max of +50/-30 deg/sec command --> <fcs_function name="fcs/pitch-cmd-limiter"> <function> <table> <independentVar lookup="row">velocities/mach</independentVar> <independentVar lookup="column">position/h-sl-ft</independentVar> <tableData> 0 30000 60000 0 0.7 0.5236 0.349 0.2 0.8727 0.5236 0.349 0.4 0.8727 0.5236 0.349 0.6 0.8727 0.7 0.349 0.8 0.8727 0.7 0.349 1.0 0.7845 0.7 0.4363 1.2 0.611 0.611 0.4363 1.4 0.611 0.5236 0.349 1.6 0.5236 0.4363 0.349 1.8 0.4363 0.4363 0.349 2.0 0.349 0.349 0.349 </tableData> </table> </function> </fcs_function> <pure_gain name="fcs/pitch-rate-cmd"> <input>fcs/elevator-cmd-limiter</input> <gain>-fcs/pitch-cmd-limiter</gain> </pure_gain> <!-- G-limiter based on mach. +9.5/-3.5 G limit. --> <fcs_function name="fcs/pitch-cmd-g-limiter"> <function> <table> <independentVar lookup="column">velocities/mach</independentVar> <independentVar lookup="row">fcs/g-load-norm</independentVar> <tableData> 0 0.4 0.8 1.0 1.2 1.4 1.6 1.8 2.0 -3.75 0 0 0 0 0 0 0 0 0 -3.5 1 1 1 1 0 0 0 0 0 -3.25 1 1 1 1 1 1 0 0 0 -3.0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 7 1 1 1 1 1 1 1 1 1 7.25 1 1 1 1 1 -0.1 -0.1 -0.1 -0.1 7.5 1 1 1 1 1 -0.1 -0.1 -0.1 -0.1 7.75 1 1 1 1 -0.1 -0.1 -0.1 -0.1 -0.1 8.0 1 1 1 1 -0.1 -0.1 -0.1 -0.1 -0.1 8.25 1 1 1 1 -0.1 -0.1 -0.1 -0.1 -0.1 8.5 1 1 1 1 -0.1 -0.1 -0.1 -0.1 -0.1 8.75 1 1 1 1 -0.1 -0.1 -0.1 -0.1 -0.1 9.0 1 1 1 1 -0.1 -0.1 -0.1 -0.1 -0.1 9.25 1 1 1 1 -0.1 -0.1 -0.1 -0.1 -0.1 9.5 1 1 1 1 -0.1 -0.1 -0.1 -0.1 -0.1 9.75 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0 0 0 10.0 -1 -1 -1 -1 -1 -1 -1 -1 -1 </tableData> </table> </function> </fcs_function> <pure_gain name="fcs/g-limiter"> <input>fcs/pitch-rate-cmd</input> <gain>fcs/pitch-cmd-g-limiter</gain> <clipto> <min>-0.5236</min> <max>0.8727</max> </clipto> </pure_gain> <!-- Limit pitch rate command when gear is down--> <switch name="fcs/gear-down-q-limit"> <default value="1"/> <test logic="AND" value=".3"> gear/gear-pos-norm gt 0 </test> </switch> <pure_gain name="fcs/q-gear-down-limiter"> <input>fcs/g-limiter</input> <gain>fcs/gear-down-q-limit</gain> <clipto> <min>-0.5236</min> <max>0.8727</max> </clipto> </pure_gain> <deadband name="fcs/pitch-windup-trigger"> <input>fcs/pitch-rate-integrator</input> <width>1.4</width> <clipto> <min>-0.5236</min> <max>0.8727</max> </clipto> </deadband> <summer name="fcs/pitch-rate-error"> <input>fcs/q-gear-down-limiter</input> <input>-velocities/q-aero-rad_sec</input> <input>-fcs/pitch-windup-trigger</input> </summer> <integrator name="fcs/pitch-rate-integrator"> <!--trigger>fcs/pitch-int-trigger</trigger--> <input>fcs/pitch-rate-error</input> <c1> 1 </c1> <clipto> <min>-0.5236</min> <max>0.8727</max> </clipto> <output>fcs/pitch-rate-integrator</output> </integrator> <summer name="fcs/pitch-cmd-summer"> <input>fcs/pitch-rate-integrator</input> <!--input>fcs/pitch-rate-override</input--> </summer> <!-- Normalize the w-velocity to m/s --> <pure_gain name="fcs/w-velocity-norm"> <input>velocities/w-fps</input> <gain>0.3048</gain> </pure_gain> <!-- LQR Tracker Integral elevator pitch rate controller--> <fcs_function name="fcs/el-pitch-cmd"> <function> <sum> <product> <table> <independentVar lookup="row">velocities/vc-kts</independentVar> <independentVar lookup="column">aero/alpha-deg</independentVar> <tableData> 19 25 35 90 1 1 1 180 1 1 1 200 1 1 1 215 1 1 1 230 1 1 1 380 1 1 1 500 1 1 1 900 1 1 1 </tableData> </table> <property>fcs/pitch-cmd-summer</property> <value>-0.5</value> <table> <independentVar lookup="row">velocities/vc-kts</independentVar> <independentVar lookup="column">aero/alpha-deg</independentVar> <tableData> 19 25 35 90 38.8840 25.9906 25.9906 180 38.8840 25.9906 25.9906 200 38.8840 25.9906 25.9906 215 58.8840 25.9906 25.9906 230 81.9605 58.8840 25.9906 380 63.4645 56.8517 34.4889 500 61.1371 58.5955 33.0386 900 48.8597 42.1147 42.1147 </tableData> </table> </product> <product> <property>fcs/w-velocity-norm</property> <value>0</value> <table> <independentVar lookup="row">velocities/vc-kts</independentVar> <independentVar lookup="column">aero/alpha-deg</independentVar> <tableData> 19 25 35 90 -0.0231 -0.0119 -0.0119 180 -0.0231 -0.0119 -0.0119 200 -0.0231 -0.0119 -0.0119 215 -0.0231 -0.0119 -0.0119 230 -0.0406 -0.0231 -0.0119 380 -0.0244 -0.0195 -0.0159 500 -0.0115 -0.0085 -0.0061 900 -0.0045 -0.0029 -0.0029 </tableData> </table> </product> <product> <table> <independentVar lookup="row">velocities/vc-kts</independentVar> <independentVar lookup="column">aero/alpha-deg</independentVar> <tableData> 19 25 35 90 1 1 1 180 1 1 1 200 1 1 1 215 1 1 1 230 1 1 1 380 1 1 1 500 1 1 1 900 1 1 1 </tableData> </table> <property>velocities/q-aero-rad_sec</property> <value>-0.3</value> <table> <independentVar lookup="row">velocities/vc-kts</independentVar> <independentVar lookup="column">aero/alpha-deg</independentVar> <tableData> 19 25 35 90 -34.0297 -19.6316 -19.6316 180 -34.0297 -19.6316 -19.6316 200 -34.0297 -19.6316 -19.6316 215 -44.0297 -19.6316 -19.6316 230 -62.1151 -44.0297 -19.6316 380 -47.3350 -42.1836 -26.0436 500 -45.4195 -43.0593 -24.6616 900 -35.7627 -30.5733 -30.5733 </tableData> </table> </product> </sum> </function> <clipto> <min>-5</min> <max>5</max> </clipto> </fcs_function> <aerosurface_scale name="fcs/el-reg-scale"> <input> fcs/el-pitch-cmd </input> <domain> <min> -5 </min> <max> 5 </max> </domain> <range> <min> -1 </min> <max> 1 </max> </range> </aerosurface_scale > <actuator name="fcs/elevator-act"> <input> fcs/el-reg-scale</input> <lag> 0.0 </lag> <rate_limit> 2 </rate_limit> <clipto> <min> -1 </min> <max> 1 </max> </clipto> <output>fcs/elevator-pos-norm</output> </actuator> <aerosurface_scale name="fcs/elevator-position"> <input>fcs/elevator-pos-norm</input> <range> <min>-0.5236</min> <max>0.5236</max> </range> <output>fcs/elevator-pos-rad</output> </aerosurface_scale> <summer name="fcs/dht-left-pos-rad"> <input>-fcs/elevator-pos-rad</input> <input>-fcs/left-aileron-pos-rad</input> <clipto> <min>-0.5236</min> <max>0.5236</max> </clipto> </summer> <summer name="fcs/dht-right-pos-rad"> <input>fcs/elevator-pos-rad</input> <input>fcs/right-aileron-pos-rad</input> <clipto> <min>-0.5236</min> <max>0.5236</max> </clipto> </summer> <!-- Reduce TVC gains if AB is on--> <switch name="fcs/tvc-gain-select"> <default value="1"/> <test logic="AND" value="0.6"> fcs/throttle-pos-norm ge 0.99 </test> </switch> <!-- LQR Tra