<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="http://jsbsim.sourceforge.net/JSBSim.xsl"?>

<fdm_config name="CRJ900jsb" version="2.0" release="ALPHA"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">

 <fileheader>
  <author> Aeromatic v 3.3.10 </author>
  <filecreationdate> 02 Jan 2018 </filecreationdate>
  <version>$Revision: 1.80 $</version>
  <description> Models a CRJ-900jsb. </description>
 </fileheader>

 <!--
    Copyright 2018, Daniel Meissner (daniel_hl.83@googlemail.com)
 
    This file is part of the Flightgear CRJ700-family.

    The Flightgear CRJ700-family is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 2 of the License, or
    (at your option) any later version.

    The Flightgear CRJ700-family is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with the Flightgear CRJ700-family.  If not, see <http://www.gnu.org/licenses/>.
 -->
 
<!--
  File:     CRJ-900jsb.xml
  Inputs:
    name:          CRJ-900jsb
    type:          Multi-engine Passenger Jet Airliner, Transonic Jet Transport
    stall speed:   137.00kts
    max weight:    84500.00 lb
    length:        118.00 ft
    wing: 
     span:         81.58 ft
     area:         765.00 sq-ft
     mean chord:   13.04 ft
     aspect ratio: 18.20:1
     taper ratio:  0.23:1
     incidence:    2.00 degrees
     dihedral:     3.00 degrees
     sweep:        22.00 degrees

    no. engines:   2
    engine type:   Turbine Engine
    engine layout: aft fuselage

    control type:   Conventional with Yaw Damper

    gear type:     tricycle
    steering type: steering
    retractable?:  yes

  Outputs:
    wing loading:       110.46 lb/sq-ft
     - thickness ratio: 11.56%
    payload:            12933.50 lbs
    CL-alpha:           6.02 per radian
    CL-0:               0.31
    CL-max:             1.74
    CD-0:               0.02
    K:                  0.04
    Mcrit:              0.79

    min. turn radius    917.41 ft
    max. turn rate:     0.28 deg/s
-->

 <metrics>
     <!-- Source: Aeromatic -->
   <wingarea  unit="M2">    71.1 </wingarea>
   <wingspan  unit="M" >    24.9 </wingspan> 
   <wing_incidence unit="DEG"> 2.0 </wing_incidence> <!-- to be verified -->
   <chord     unit="M" >     3.97 </chord> <!-- to be verified -->
   <htailarea unit="M2">    16.1 </htailarea> <!-- to be verified -->
   <htailarm  unit="M" >    16.0 </htailarm> <!-- to be verified -->
   <vtailarea  unit="M2">   16.2 </vtailarea> <!-- to be verified -->
   <vtailarm  unit="M" >    16.0 </vtailarm> <!-- to be verified -->
   <location name="AERORP" unit="M">
     <x>    18.81 </x>
     <y>     0.00 </y>
     <z>    -0.60 </z>
   </location>
   <location name="EYEPOINT" unit="M">
     <x>    2.52 </x>
     <y>   -0.765 </y>
     <z>    1.78 </z>
   </location>
   <location name="VRP" unit="M">
     <x>     0.0 </x>
     <y>     0.0 </y>
     <z>     0.0 </z>
   </location>
 </metrics>

 <mass_balance>
     <!-- Source: yasim -->
     <ixx unit="KG*M2">  247218 </ixx>    <!--222510 kgm^2 --> <!-- 164114.95 slugs -->
     <iyy unit="KG*M2"> 1895931 </iyy>      <!--1800952 -->   <!--1328314 slugft2 -->
     <izz unit="KG*M2"> 2076981 </izz>      <!--1954974--> <!-- 1441914.8 -->
     <ixz unit="KG*M2">  127876 </ixz>
   <emptywt unit="LBS" >  48160.00 </emptywt>
   <location name="CG" unit="M">
     <x>    18.81 </x>   <!-- 786.99 inches-->
     <y>     0.00 </y>
     <z>    -0.60 </z>
   </location>
   <pointmass name="Payload">
    <description> 12933.50 LBS should bring model up to entered max weight </description>
    <weight unit="LBS"> 6466.75 </weight>
    <location name="POINTMASS" unit="M">
     <x>    18.81 </x>   <!-- 27.3% MAC -->
     <y>     0.00 </y>
     <z>     0.00 </z>
   </location>
  </pointmass>
 </mass_balance>

 <propulsion>
     <!-- Source: Aeromatic -->
   <engine file="CF34-8C">
    <location unit="M">
      <x>   27.00 </x>
      <y>   -2.25 </y>
      <z>    0.6 </z>
    </location>
    <orient unit="DEG">
      <pitch>     2.50 </pitch>
       <roll>     0.00 </roll>
        <yaw>     0.00 </yaw>
    </orient>
    <feed> 0 </feed>

    <thruster file="direct">
     <sense> 1 </sense>
     <location unit="M">
       <x>  27.00 </x>
       <y>  -2.25 </y>
       <z>   0.6 </z>
     </location>
     <orient unit="DEG">
       <pitch>     2.50 </pitch>
        <roll>     0.00 </roll>
         <yaw>     0.00 </yaw>
     </orient>
    </thruster>
  </engine>

   <engine file="CF34-8C">
    <location unit="M">
      <x>  27.00 </x>
      <y>   2.25 </y>
      <z>   0.6 </z>
    </location>
    <orient unit="DEG">
      <pitch>     2.50 </pitch>
       <roll>     0.00 </roll>
        <yaw>     0.00 </yaw>
    </orient>
    <feed> 1 </feed>

    <thruster file="direct">
     <sense> 1 </sense>
     <location unit="M">
       <x>  27.00 </x>
       <y>   2.25 </y>
       <z>   0.6 </z>
     </location>
     <orient unit="DEG">
       <pitch>     2.50 </pitch>
        <roll>     0.00 </roll>
         <yaw>     0.00 </yaw>
     </orient>
    </thruster>
  </engine>

  <tank type="FUEL" number="0">     <!-- left wing tank -->
     <location unit="M">
       <x>  19.96 </x>
       <y>  -3.81 </y>
       <z>  -0.9 </z>
     </location>
     <capacity unit="LBS"> 7492.00 </capacity>
     <contents unit="LBS"> 3901.08 </contents>
  </tank>
  <tank type="FUEL" number="1">     <!-- right wing tank -->
     <location unit="M">
       <x>  19.96 </x>
       <y>   3.81 </y>
       <z>  -0.9 </z>
     </location>
     <capacity unit="LBS"> 7492.00 </capacity>
     <contents unit="LBS"> 3901.08 </contents>
  </tank>
  <tank type="FUEL" number="2">     <!-- center tank -->
     <location unit="M">
       <x>   19.96 </x>
       <y>    0.00 </y>
       <z>   -0.9 </z>
     </location>
     <capacity unit="LBS"> 4610.00 </capacity>
     <contents unit="LBS"> 3901.08 </contents>
  </tank>

 </propulsion>

 <ground_reactions>

  <contact type="BOGEY" name="NOSE">
    <location unit="M">
        <!-- Source Gear Locations: CRJ900 three-view measurement -->
      <x>   2.0203 </x>
      <y>     0.00 </y>
      <z>  -3.8 </z>
    </location>
    <static_friction>  0.80 </static_friction>
    <dynamic_friction> 0.50 </dynamic_friction>
    <rolling_friction> 0.06 </rolling_friction>    <!-- Source: Trial value. Aeromatic Original: 0.02 -->
    <spring_coeff  unit="LBS/FT">     25350.00 </spring_coeff>
    <damping_coeff unit="LBS/FT/SEC"> 12675.00 </damping_coeff>
    <max_steer unit="DEG"> 5.00 </max_steer>
    <brake_group> NONE </brake_group>
    <retractable> 1 </retractable>
  </contact>

  <contact type="BOGEY" name="LEFT_MAIN">
    <location unit="M">
      <x>   19.55 </x>
      <y>   -2.054 </y>
      <z>   -4.21 </z>
    </location>
    <static_friction>  0.80 </static_friction>
    <dynamic_friction> 0.50 </dynamic_friction>
    <rolling_friction> 0.06 </rolling_friction>
    <spring_coeff  unit="LBS/FT">     84500.00 </spring_coeff>
    <damping_coeff unit="LBS/FT/SEC"> 42250.00 </damping_coeff>
    <max_steer unit="DEG">0</max_steer>
    <brake_group> LEFT </brake_group>
    <retractable> 1 </retractable>
  </contact>

  <contact type="BOGEY" name="RIGHT_MAIN">
    <location unit="M">
      <x>   19.55 </x>
      <y>    2.054 </y>
      <z>   -4.21 </z>
    </location>
    <static_friction>  0.80 </static_friction>
    <dynamic_friction> 0.50 </dynamic_friction>
    <rolling_friction> 0.06 </rolling_friction>
    <spring_coeff  unit="LBS/FT">     84500.00 </spring_coeff>
    <damping_coeff unit="LBS/FT/SEC"> 42250.00 </damping_coeff>
    <max_steer unit="DEG">0</max_steer>
    <brake_group> RIGHT </brake_group>
    <retractable> 1 </retractable>
  </contact>

  <contact type="STRUCTURE" name="LEFT_WING">
    <location unit="M">
     <x>   19.96 </x>
     <y>  -12.43 </y>
     <z>   -0.9 </z>
    </location>
   <static_friction>  1 </static_friction>
   <dynamic_friction> 1 </dynamic_friction>
   <spring_coeff unit="LBS/FT">      84500.00 </spring_coeff>
   <damping_coeff unit="LBS/FT/SEC"> 84500.00 </damping_coeff>
  </contact>

  <contact type="STRUCTURE" name="RIGHT_WING">
    <location unit="M">
     <x>   19.96 </x>
     <y>   12.43 </y>
     <z>   -0.9 </z>
    </location>
   <static_friction>  1 </static_friction>
   <dynamic_friction> 1 </dynamic_friction>
   <spring_coeff unit="LBS/FT">      84500.00 </spring_coeff>
   <damping_coeff unit="LBS/FT/SEC"> 84500.00 </damping_coeff>
  </contact>

 </ground_reactions>

 <system file="Propulsion.xml"/>
 <system file="Thrust Reverse.xml"/>
 <system file="Aircraft control.xml"/>
 <system file="Landing Gear.xml"/>
 <system file="Flaps.xml"/>
 <system file="Slats.xml"/>
 <system file="Spoilers.xml"/>
 <system file="Speedbrake.xml"/>

 <flight_control name="FCS: CRJ900jsb">

 </flight_control>

 <aerodynamics>

     
     <aero_ref_pt_shift_x>
         <function name="aero/function/aero_ref_shift">
             <sum>
                 <!-- Mach tuck -->
                 <table>
                     <independentVar lookup="row">velocities/mach</independentVar>
                     <tableData>
                         0.00 0.00      <!-- guesstimately increases from quarter chord at Ma=0.00 to half chord at Ma=1.00 -->
                         0.65 0.00
                         1.00 0.25
                         2.00 0.25
                     </tableData>
                 </table>
                 
                 <!-- shift due to flap extension -->
                  <table>
                     <independentVar lookup="row">fcs/flap-pos-deg</independentVar>
                     <tableData>
                         0  0.00
                         1  0.04
                         8  0.08
                         20  0.15
                         30  0.15
                         45  0.15
                     </tableData>
                 </table>
            </sum>
         </function>
     </aero_ref_pt_shift_x>
     
  <axis name="LIFT">

    <!-- Lift above 0.85 and below -0.85 is generalised -->
    <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-rad</independentVar>
            <tableData>
              -1.57  0.0000
              -1.22 -0.5685
              -1.05 -0.7659
              -0.88 -0.8844
              -0.65 -0.5700
              -0.29 -1.4249
               0.00  0.3134
               0.24  1.7383
               0.60  0.8834
               0.88  1.1156
               1.05  0.9661
               1.22  0.7171
               1.57  0.0000
            </tableData>
          </table>
          <value>0.75</value>
      </product>
    </function>
      <!--<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-rad</independentVar>
                  <tableData>
                      -1.22 0
                      -1.05 -0.5
                      -0.88 -0.7
                      -0.65 -0.5
                      -0.29 -1.3
                       0.00  0.16
                       0.24  1.3792
                       0.60  0.5
                       0.88  0.75
                       1.05  0.6
                       1.22  0.0
                  </tableData>
              </table>
              <value>1.15</value>
          </product>
      </function>-->
    <function name="aero/force/Lift_pitch_rate">
        <description>Lift due to pitch rate</description>
        <product>
          <property>aero/qbar-psf</property>
          <property>metrics/Sw-sqft</property>
          <property>velocities/q-aero-rad_sec</property>
          <property>aero/ci2vel</property>
          <value> 7.4095 </value>
        </product>
      </function>

      <function name="aero/force/Lift_alpha_rate">
        <description>Lift due to alpha rate</description>
        <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <property>aero/alphadot-rad_sec</property>
           <property>aero/ci2vel</property>
           <value> 1.4672 </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.6076 </value>          <!-- source: experiment. original 0.6076 -->
       </product>
    </function>

    <function name="aero/force/Lift_inbd_flap">
       <description>Delta Lift due to Inboard flaps</description>
       <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <property>fcs/flap-inbd-pos-deg</property>
           <value> 0.0099778 </value>
       </product>
    </function>

    <function name="aero/force/Lift_outbd_flap">
       <description>Delta Lift due to Outboard flaps</description>
       <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <property>fcs/flap-outbd-pos-deg</property>
           <value> 0.00715 </value>
       </product>
    </function>
    
    <function name="aero/force/Lift_slat">
        <description>Delta Lift due to slats</description>
        <product>
            <property>aero/qbar-psf</property>
            <property>metrics/Sw-sqft</property>
            <property>fcs/slat-pos-norm</property>
            <value>0.294</value>
        </product>
    </function>
    
    <function name="aero/force/Lift_spoilers">
       <description>Delta Lift due to spoilers</description>
       <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <property>fcs/spoilers-pos-norm</property>
           <value> -0.2000 </value>
       </product>
    </function>

    <!-- Lift due to Mach -->
    <function name="aero/force/Lift_mach">
        <description>Lift factor due to mach</description>
        <product>
            <property>aero/force/Lift_alpha</property>
            <table>
                <independentVar lookup="row">velocities/mach</independentVar>
                <tableData>
                    0.00    1.00
                    0.20    1.12
                    0.40    1.29
                    0.60    1.58
                    0.80    1.92
                    0.90    1.99
                    1.00    2.00
                    1.10    1.42
                    1.20    0.96
                    1.40    0.65
                </tableData>
                <!-- Prandtl Glauert 0-0.6 and 1.2-1.4 with quadratic fitting around mach 1 -->
                </table>
        </product>
    </function>  
  </axis>

  <axis name="DRAG">

    <!-- CD0 is based on fuselage, wing, horizontal- en vertical tail -->
    <!-- Antennas, struts and wires are not taken into account        -->
    <!-- CD for gear (fixed and retractable) is defined below         -->
    <function name="aero/force/Drag_minimum">
       <description>Minimum drag</description>
       <product>
          <property>aero/qbar-psf</property>
          <property>metrics/Sw-sqft</property>
          <value> 0.0237 </value>
          <!-- <value> 1.1 </value> --> <!-- experiment -->
       </product>
    </function>

    <function name="aero/force/Drag_alpha">
       <description>Drag due to alpha</description>
       <product>
          <property>aero/qbar-psf</property>
          <property>metrics/Sw-sqft</property>
          <table>
            <independentVar lookup="row">aero/alpha-rad</independentVar>
            <tableData>
             -1.57    1.4084
             -0.24    0.0265
              0.00    0.0000
              0.24    0.0265
              1.57    1.4084
            </tableData>
          </table>
          <value>1.15</value> <!--experiment-->
       </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.0297 </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.0000
                0.79    0.0000
                1.10    0.0230
                1.80    0.0150
            </tableData>
          </table>
          <value>0.9</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.2300
              -0.26    0.0500
               0.00    0.0000
               0.26    0.0500
               1.57    1.2300
            </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-rad</property></abs>
           <value> 0.0400 </value>
       </product>
    </function>

    <function name="aero/force/Drag_gear">
       <description>Drag due to gear</description>
         <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <property>gear/gear-pos-norm</property>
           <value> 0.0150 </value>
         </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>
           <!--
           <property>fcs/flap-pos-deg</property>
           <value> 0.0012 </value>
           -->
           <!-- Source: expermiment -->
           <table>
               <independentVar lookup="row">fcs/flap-pos-deg</independentVar>
               <tableData>
                   0    0.0000
                   1    0.0005
                   8    0.002
                  20    0.015
                  30    0.035
                  45    0.065
              </tableData>
           </table>
         </product>
    </function>


    <function name="aero/force/Drag_spoilers">
       <description>Drag due to spoilers</description>
         <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <property>fcs/spoilers-pos-norm</property>
           <value> 0.0237 </value>
         </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.1200 </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> -0.8808 </value>
       </product>
    </function>
    <function name="aero/force/Side_roll_rate">
       <description>Side force due to roll rate</description>
       <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <property>aero/bi2vel</property>
           <property>velocities/p-aero-rad_sec</property>
           <table>
             <independentVar lookup="row">aero/Re</independentVar>
             <tableData>
                19220116   0.3203
                21142126   0.0232
                28830174   0.0103
                38487612   0.0058
             </tableData>
           </table>
       </product>
    </function>

    <function name="aero/force/Side_yaw_rate">
       <description>Side force due to yaw rate</description>
       <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <property>aero/bi2vel</property>
           <property>velocities/r-aero-rad_sec</property>
           <value> 0.9564 </value>
       </product>
    </function>

    <function name="aero/force/Side_rudder">
       <description>Side force due to rudder</description>
       <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <property>fcs/rudder-pos-rad</property>
           <value> 0.2671 </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> -3.1438 </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    -2.3981
              2.0    -0.5995
            </tableData>
          </table>
       </product>
    </function>
    
    <!--experimental!!! -->
    <!-- now done by shift of aero rp above. 
    <function name="aero/moment/Pitch_flaps">
       <description>Pitch moment due to slap deflection</description>
       <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <property>metrics/cbarw-ft</property>
           <property>fcs/flap-pos-deg</property>
           <value> -0.0025 </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> -37 </value>                                 <!-- Source: expermiment -->
       </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> -5.9053 </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>
           <property>fcs/gear-no-wow</property>
           <table>
             <independentVar lookup="row">aero/alpha-rad</independentVar>
             <independentVar lookup="column">aero/Re</independentVar>
             <tableData>
                         19220116 21142126 28830174 38487612
                 -0.0349  -0.2269  -0.0874  -0.0827  -0.0841
                  0.3491  -1.7714  -0.2993  -0.3249  -0.4036
             </tableData>
           </table>
           <value>0.2</value>
        </product>
    </function>

    <!-- Value source: experiment. Aeromatic original: -0.368 -->
    <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.45 </value>
       </product>
    </function>
    
    <!--
    <function name="aero/moment/Roll_damp">
       <description>Roll moment due to roll rate</description>
       <product>
           <value>0.5</value>
           <property>atmosphere/rho-slugs_ft3</property>
           <property>velocities/p-aero-rad_sec</property>
           <abs>
               <property>velocities/p-aero-rad_sec</property>
           </abs>
           <sqr>
               <product>
                   <value>0.5</value>
                   <property>metrics/bw-ft</property>
                   <value>0.4</value>
               </product>
           </sqr>                   
           <sum>
               <property>metrics/Sw-sqft</property>
               <property>metrics/Sh-sqft</property>
               <property>metrics/Sv-sqft</property>
           </sum>
           
           <value> -0.7 </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>
           <table>
             <independentVar lookup="row">aero/alpha-rad</independentVar>
             <independentVar lookup="column">aero/Re</independentVar>
             <tableData>
                         19220116 21142126 28830174 38487612
                 -0.0349   0.0141   0.0141   0.0141   0.0141
                  0.3491   4.3340   0.5920   0.5920   0.5920
             </tableData>
           </table>
       </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>
           
          <!-- calculated Cldeltar is exactly 0.1 1/rad. Mach effect not yet accounted for... -->
          <table>
            <independentVar lookup="row">velocities/mach</independentVar>
            <tableData>
              0.0    0.1000
              2.0    0.0250
            </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.0100 </value>
       </product>
    </function>

    <function name="aero/moment/Roll_spoilers">
       <description>Roll moment due to spoilers</description>
       <product>
          <property>aero/qbar-psf</property>
          <property>metrics/Sw-sqft</property>
          <property>metrics/bw-ft</property>
          <property>fcs/spoilers-pos-norm</property>
          <property>fcs/left-aileron-pos-rad</property>
          <table>
            <independentVar lookup="row">aero/alpha-rad</independentVar>
            <tableData>
             -0.175   0.0000
              0.0     0.2400
              0.175   0.0000
            </tableData>
          </table>
       </product>
    </function>

  </axis>

  <axis name="YAW">

    <!-- Stall initiator -->
    <!-- <function name="aero/moment/Yaw_alpha">
       <description>Yaw moment due to alpha</description>
       <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <property>metrics/bw-ft</property>
           <property>aero/alpha-rad</property>
           <property>fcs/gear-no-wow</property>
           <table>
             <independentVar lookup="row">aero/beta-rad</independentVar>
             <independentVar lookup="column">aero/Re</independentVar>
             <tableData>
                         19220116 21142126
                 -0.3491  -1.0000   0.0000
                  0.3491   1.0000   0.0000
             </tableData>
           </table>
       </product>
       </function> -->

    <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.2298 </value>
       </product>
    </function>

    <function name="aero/moment/Yaw_roll_rate">
       <description>Yaw 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-rad_sec</property>
           <table>
             <independentVar lookup="row">aero/Re</independentVar>
             <tableData>
                19220116  -0.1739
                21142126  -0.0126
                28830174  -0.0056
                38487612  -0.0031
             </tableData>
           </table>
       </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.2604 </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>
           <value> -0.1450 </value>
       </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.0000 </value>
       </product>
    </function>

  </axis>

 </aerodynamics>

 <external_reactions>
 </external_reactions>

</fdm_config>
