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

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

 <fileheader>
  <author> David Culp, Petar Jedvaj </author>
  <filecreationdate> 26-08-2012 </filecreationdate>
  <version>1.9.1</version>
  <description> MiG-21bis </description>
 </fileheader>

 <metrics>
   <wingarea  unit="FT2">  247.50 </wingarea>
   <wingspan  unit="FT" >   23.50 </wingspan>
   <wing_incidence>          2.50 </wing_incidence>
   <chord     unit="FT" >   10.53 </chord>
   <htailarea unit="FT2">   49.50 </htailarea>
   <htailarm  unit="FT" >   20.68 </htailarm>
   <vtailarea unit="FT2">   29.70 </vtailarea>
   <vtailarm  unit="FT" >   20.68 </vtailarm>
   <location name="AERORP" unit="IN">
     <x> 297.00 </x>
     <y>   0.00 </y>
     <z>  -3.00 </z>
   </location>
   <location name="EYEPOINT" unit="IN">
     <x> 124.08 </x>
     <y>   0.00 </y>
     <z>  36.00 </z>
   </location>
   <location name="VRP" unit="IN">
     <x>297</x>
     <y>0</y>
     <z>0</z>
   </location>
 </metrics>

 <mass_balance>
   <ixx unit="SLUG*FT2">      8500 </ixx>
   <iyy unit="SLUG*FT2">     42000 </iyy>
   <izz unit="SLUG*FT2">     35000 </izz>
   <ixy unit="SLUG*FT2">         0 </ixy>
   <ixz unit="SLUG*FT2">         0 </ixz>
   <iyz unit="SLUG*FT2">         0 </iyz>
   <emptywt unit="LBS" >     12882 </emptywt>
   
   <location name="CG" unit="IN">
     <x> 297.00 </x>
     <y>   0.00 </y>
     <z>  -4.00 </z>
   </location>
   
   <pointmass name="station1"><!-- left wing outboard pylon -->
      <weight unit="LBS"> 6 </weight>
      <location name="POINTMASS" unit="IN">
          <x>  308 </x>
          <y> -120 </y>
          <z>  -10 </z>
      </location>
   </pointmass>
   
   <pointmass name="station2"><!-- left wing inboard pylon -->
      <weight unit="LBS"> 520 </weight>
      <location name="POINTMASS" unit="IN">
          <x>  300 </x>
          <y> -100 </y>
          <z>  -10 </z>
      </location>
   </pointmass>
   
   <pointmass name="station3"><!-- empty centerline fuel tank -->
      <weight unit="LBS"> 180 </weight>
      <location name="POINTMASS" unit="IN">
          <x>  290 </x>
          <y>    0 </y>
          <z>  -30 </z>
      </location>
   </pointmass>
   
   <pointmass name="station4"><!-- right wing inboard pylon -->
      <weight unit="LBS"> 520 </weight>
      <location name="POINTMASS" unit="IN">
          <x>  300 </x>
          <y>  100 </y>
          <z>  -10 </z>
      </location>
   </pointmass>
   
   <pointmass name="station5"><!-- right wing outboard pylon -->
      <weight unit="LBS"> 6 </weight>
      <location name="POINTMASS" unit="IN">
          <x>  308 </x>
          <y>  120 </y>
          <z>  -10 </z>
      </location>
   </pointmass>
 </mass_balance>

 <ground_reactions>

  <contact type="BOGEY" name="NOSE">
   <location unit="IN">
     <x>  60 </x>
     <y>   0 </y>
     <z> -57 </z>
   </location>
   <static_friction>  0.80 </static_friction>
   <dynamic_friction> 0.50 </dynamic_friction>
   <rolling_friction> 0.02 </rolling_friction>
   <spring_coeff unit="LBS/FT">       7000.00 </spring_coeff>
   <damping_coeff unit="LBS/FT/SEC">  3500.00 </damping_coeff>
   <max_steer unit="DEG"> 65.00 </max_steer>
   <brake_group>NONE</brake_group>
   <retractable>1</retractable>
 </contact>

  <contact type="BOGEY" name="LEFT_MAIN">
   <location unit="IN">
     <x>  310.13 </x>
     <y>  -70.00 </y>
     <z>  -60.00 </z>
   </location>
   <static_friction>  0.80 </static_friction>
   <dynamic_friction> 0.50 </dynamic_friction>
   <rolling_friction> 0.026 </rolling_friction>
   <spring_coeff unit="LBS/FT">      15000.00 </spring_coeff>
   <damping_coeff unit="LBS/FT/SEC">  7200.00 </damping_coeff>
   <brake_group>LEFT</brake_group>
   <retractable>1</retractable>
 </contact>

  <contact type="BOGEY" name="RIGHT_MAIN">
   <location unit="IN">
     <x> 310.13 </x>
     <y>  70.00 </y>
     <z> -60.00 </z>
   </location>
   <static_friction>  0.80 </static_friction>
   <dynamic_friction> 0.50 </dynamic_friction>
   <rolling_friction> 0.026 </rolling_friction>
   <spring_coeff unit="LBS/FT">      15000.00 </spring_coeff>
   <damping_coeff unit="LBS/FT/SEC">  7200.00 </damping_coeff>
   <brake_group>RIGHT</brake_group>
   <retractable>1</retractable>
 </contact>

  <contact type="STRUCTURE" name="LEFT_WING">
    <location unit="IN">
     <x>  322.24 </x>
     <y> -132.00 </y>
     <z>  0 </z>
    </location>
    <static_friction>  0.80 </static_friction>
    <dynamic_friction> 0.50 </dynamic_friction>
    <spring_coeff unit="LBS/FT">      20720.00 </spring_coeff>
    <damping_coeff unit="LBS/FT/SEC"> 14144.00 </damping_coeff>
 </contact>

  <contact type="STRUCTURE" name="RIGHT_WING">
    <location unit="IN">
     <x> 322.24 </x>
     <y> 132.00 </y>
     <z>  0 </z>
    </location>
    <static_friction>  0.80 </static_friction>
    <dynamic_friction> 0.50 </dynamic_friction>
    <spring_coeff unit="LBS/FT">      20720.00 </spring_coeff>
    <damping_coeff unit="LBS/FT/SEC"> 14144.00 </damping_coeff>
 </contact>

  <contact type="STRUCTURE" name="AFT_FUSELAGE">
    <location unit="IN">
     <x> 500 </x>
     <y>   0 </y>
     <z>   0 </z>
    </location>
    <static_friction>  0.80 </static_friction>
    <dynamic_friction> 0.50 </dynamic_friction>
    <spring_coeff unit="LBS/FT">      40000.00 </spring_coeff>
    <damping_coeff unit="LBS/FT/SEC"> 40000.00 </damping_coeff>
 </contact>

  <contact type="STRUCTURE" name="FWD_FUSELAGE">
    <location unit="IN">
     <x>  50 </x>
     <y>   0 </y>
     <z> -20 </z>
    </location>
    <static_friction>  0.80 </static_friction>
    <dynamic_friction> 0.50 </dynamic_friction>
    <spring_coeff unit="LBS/FT">      40000.00 </spring_coeff>
    <damping_coeff unit="LBS/FT/SEC"> 40000.00 </damping_coeff>
 </contact>
 </ground_reactions>

 <propulsion>
   <engine file="Tumansky">
    <location unit="IN">
      <x> 560.40 </x>
      <y>   0.00 </y>
      <z>   0.00 </z>
    </location>
    <feed>0</feed>
    <feed>1</feed>
    <thruster file="direct">
     <location unit="IN">
       <x> 560.40 </x>
       <y>   0.00 </y>
       <z>   0.00 </z>
     </location>
     <orient unit="DEG">
       <pitch> 0.00 </pitch>
       <roll>  0.00 </roll>
       <yaw>   0.00 </yaw>
     </orient>
    </thruster>
  </engine>

  <!-- internal fuel -->
  <tank type="FUEL" number="0">
     <location unit="IN">
       <x> 296.50 </x>
       <y>   0.00 </y>
       <z>   0.00 </z>
     </location>
     <priority>2</priority>
     <density>6.5</density>
     <capacity unit="LBS"> 4603 </capacity>
     <contents unit="LBS"> 4600 </contents>
     <standpipe unit="LBS"> 1000 </standpipe> 
  </tank>

  <!-- external centerline tank -->
  <tank type="FUEL" number="1">
     <location unit="IN">
       <x> 300.00 </x>
       <y>   0.00 </y>
       <z> -30.00 </z>
     </location>
     <density>6.5</density>
     <capacity unit="LBS"> 850 </capacity>
     <contents unit="LBS"> 830 </contents>
  </tank>

  <dump-rate unit="LBS/MIN"> 1500 </dump-rate>
 </propulsion>

 <system file="Gear"/> 
 <system file="Flaps"/> 
 <system file="Speedbrakes"/>
 <system file="FCS-Pitch"/>
 <system file="FCS-Roll"/>
 <system file="FCS-Yaw"/>
 <system file="Alpha-Buffet"/>
 <system file="Chute"/>
 <system file="Dump"/>
 <system file="Armament"/>
 <system file="Canopy"/>
 <system file="Particles"/>

 <flight_control name="none"/>

 <aerodynamics>

        <function name="aero/function/kCDge">
            <description>Change_in_drag_due_to_ground_effect</description>
            <product>
                  <table>
                      <independentVar>aero/h_b-mac-ft</independentVar>
                      <tableData>
                          0.0000	0.0480
                          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
                      </tableData>
                  </table>
            </product>
        </function>

        <function name="aero/function/kCLge">
            <description>Change_in_lift_due_to_ground_effect</description>
            <product>
                  <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>


  <axis name="LIFT">

    <function name="aero/coefficient/CLalpha">
      <description>Lift_due_to_alpha</description>
      <product>
          <property>aero/qbar-psf</property>
          <property>metrics/Sw-sqft</property>
          <property>aero/function/kCLge</property>
          <table>
            <independentVar lookup="row">aero/alpha-rad</independentVar>
            <tableData>
              -0.20 -0.620
               0.00  0.030
               0.26  0.880
               0.60  0.448
            </tableData>
          </table>
      </product>
    </function>

    <function name="aero/coefficient/dCLflap">
       <description>Delta_Lift_due_to_flaps</description>
       <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <table>
             <independentVar lookup="row">fcs/flap-pos-norm</independentVar>
             <tableData>
               0.00  0.00
               0.50  0.40
               1.00  0.70
             </tableData>
           </table>
       </product>
    </function>

    <function name="aero/coefficient/CLde">
       <description>Lift_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.2</value>
       </product>
    </function>

    <function name="aero/coefficient/buffet">
       <description>Buffet at high alpha</description>
         <product>
           <property>aero/alpha_buffet/sine_wave</property>
           <property>aero/alpha_buffet/strength</property>
         </product>
    </function>

  </axis>

  <axis name="DRAG">

    <function name="aero/coefficient/CD0">
       <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    1.500
             -0.26    0.025
              0.00    0.020
              0.26    0.025
              1.57    1.500
            </tableData>
          </table>
       </product>
    </function>

    <function name="aero/coefficient/CDi">
       <description>Induced_drag</description>
         <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <property>aero/cl-squared</property>
           <property>aero/function/kCDge</property>
           <value>0.14</value>
         </product>
    </function>

    <function name="aero/coefficient/CDmach">
       <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.81      0.000
                1.10      0.018
                1.40      0.011
                1.80      0.005
                2.20      0.003
            </tableData>
          </table>
        </product>
    </function>

    <function name="aero/coefficient/CDflap">
       <description>Drag_due_to_flaps</description>
         <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <table>
             <independentVar lookup="row">fcs/flap-pos-norm</independentVar>
             <tableData>
               0.00  0.00
               0.50  0.025
               1.00  0.08
             </tableData>
           </table>
         </product>
    </function>

    <function name="aero/coefficient/CDgear">
       <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.04</value>
         </product>
    </function>

    <function name="aero/coefficient/CDsb">
       <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.03</value>
         </product>
    </function>

    <function name="aero/coefficient/CDbeta">
       <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.230
              -0.26    0.050
               0.00    0.000
               0.26    0.050
               1.57    1.230
            </tableData>
          </table>
       </product>
    </function>

    <function name="aero/coefficient/CDde">
       <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.05</value>
       </product>
    </function>

    <function name="aero/coefficient/CDbc">
       <description>Drag_due_to_braking_chute</description>
         <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <property>systems/chute/unfurl-norm</property>
           <value>0.63</value>
         </product>
    </function>

  </axis>

  <axis name="SIDE">

    <function name="aero/coefficient/CYb">
       <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/coefficient/Clb">
       <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.01</value>
       </product>
    </function>

    <function name="aero/coefficient/Clp">
       <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/coefficient/Clr">
       <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/coefficient/Clda">
       <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>
          <table>
            <independentVar lookup="row">velocities/mach</independentVar>
            <tableData>
              0.0    0.11
              2.0    0.04
            </tableData>
          </table>
       </product>
    </function>

    <function name="aero/coefficient/Cldr">
       <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.03</value>
       </product>
    </function>

  </axis>

  <axis name="PITCH">

    <function name="aero/coefficient/Cmalpha">
       <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.3</value>
       </product>
    </function>

    <function name="aero/coefficient/Cmde">
       <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.600
              2.0     -0.200
            </tableData>
          </table>
       </product>
    </function>

    <function name="aero/coefficient/Cmq">
       <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>-18</value>
       </product>
    </function>

    <function name="aero/coefficient/Cmadot">
       <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>-9</value>
       </product>
    </function>

  </axis>

  <axis name="YAW">

    <function name="aero/coefficient/Cnb">
       <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.12</value>
       </product>
    </function>

    <function name="aero/coefficient/Cnr">
       <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.19</value>
       </product>
    </function>

    <function name="aero/coefficient/Cndr">
       <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.08</value>
       </product>
    </function>

  </axis>

 </aerodynamics>

</fdm_config>