<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="http://jsbsim.sourceforge.net/JSBSim.xsl"?>
<fdm_config name="Boeing B-17G" 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 0.9, refined by Jon Berndt </author>
    <filecreationdate> 2008-12-22 </filecreationdate>
    <version>$Revision: 1.8 $</version>
    <description> Models a Boeing B-17G. </description>
      <note>
        This model was created using publicly available data, publicly available
        technical reports, textbooks, and guesses. It contains no proprietary or
        restricted data. If this model has been validated at all, it would be
        only to the extent that it seems to "fly right", and that it possibly
        complies with published, publicly known, performance data (maximum speed,
        endurance, etc.). Thus, this model is meant for educational and entertainment
        purposes only.

        This simulation model is not endorsed by the manufacturer. This model is not
        to be sold.
      </note>
  </fileheader>

  <!--
  File:     Boeing B-17G.xml
  Inputs:
    name:          Boeing B-17G
    type:          multi-engine prop transport
    max weight:    65500.0 lb
    wing span:     103.75 ft
    length:        74.33 ft
    wing area:     1420 sq-ft
    gear type:     taildragger
    retractable?:  yes
    # engines:     4
    engine type:   piston
    engine layout: wings
    yaw damper?    no
    Structural frame origin at nose

  Outputs:
    wing loading:  46.13 lb/sq-ft
    CL-alpha:      4.9 per radian
    CL-0:          0.24
    CL-max:        1.4
    CD-0:          0.025
    K:             0.039
  -->

  <metrics>
    <wingarea  unit="FT2"> 1420.00 </wingarea>
    <wingspan  unit="FT" >  103.75 </wingspan>
    <wing_incidence>          2.00 </wing_incidence>
    <chord     unit="FT" >   13.69 </chord>
    <location name="AERORP" unit="FT">
      <x>  22.50 </x>
      <y>   0.00 </y>
      <z>   0.00 </z>
    </location>
    <location name="EYEPOINT" unit="FT">
      <x> 11.0 </x>
      <y> -2.0 </y>
      <z>  3.5 </z>
    </location>
    <location name="VRP" unit="FT">
      <x> 0.0 </x>
      <y> 0.0 </y>
      <z> 0.0 </z>
    </location>
  </metrics>

  <mass_balance>
    <ixx unit="SLUG*FT2">    400000 </ixx>
    <iyy unit="SLUG*FT2">    250000 </iyy>
    <izz unit="SLUG*FT2">    600000 </izz>
    <emptywt unit="LBS" >     36100 </emptywt>
    <location name="CG" unit="FT">
      <x> 22.0 </x>
      <y>  0.0 </y>
      <z> -0.5 </z>
    </location>
  </mass_balance>

  <ground_reactions>

    <contact type="BOGEY" name="LEFT_MAIN">
      <location unit="FT">
        <x>  20.9 </x>
        <y> -10.0 </y>
        <z>  -8.5 </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">      30000.00 </spring_coeff>
      <damping_coeff unit="LBS/FT/SEC">  3000.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="FT">
        <x> 20.9 </x>
        <y> 10.0 </y>
        <z> -8.5 </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">      30000.00 </spring_coeff>
      <damping_coeff unit="LBS/FT/SEC">  3000.00 </damping_coeff>
      <max_steer unit="DEG">0</max_steer>
      <brake_group>RIGHT</brake_group>
      <retractable>1</retractable>
    </contact>

    <contact type="BOGEY" name="TAIL">
      <location unit="FT">
        <x> 52.5 </x>
        <y>   0.00 </y>
        <z> -4.75 </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">      6500.0 </spring_coeff>
      <damping_coeff unit="LBS/FT/SEC"> 650.00 </damping_coeff>
      <max_steer unit="DEG"> 5.00 </max_steer>
      <brake_group>NONE</brake_group>
      <retractable>1</retractable>
    </contact>

    <contact type="STRUCTURE" name="LEFT_WING">
      <location unit="FT">
        <x>  24.0 </x>
        <y> -51.9 </y>
        <z>   1.9 </z>
      </location>
      <static_friction>  0.80 </static_friction>
      <dynamic_friction> 0.50 </dynamic_friction>
      <spring_coeff unit="LBS/FT">      65500.00 </spring_coeff>
      <damping_coeff unit="LBS/FT/SEC"> 13100.00 </damping_coeff>
    </contact>

    <contact type="STRUCTURE" name="RIGHT_WING">
      <location unit="FT">
        <x> 24.0 </x>
        <y> 51.9 </y>
        <z>  1.9 </z>
      </location>
      <static_friction>  0.80 </static_friction>
      <dynamic_friction> 0.50 </dynamic_friction>
      <spring_coeff unit="LBS/FT">      65500.00 </spring_coeff>
      <damping_coeff unit="LBS/FT/SEC"> 13100.00 </damping_coeff>
    </contact>

  </ground_reactions>

  <propulsion>

    <engine file="R-1820-97"> <!-- Engine 0 (left outboard) -->
      <location unit="FT">
        <x>  10.1 </x>
        <y> -21.6 </y>
        <z>  -0.4 </z>
      </location>
      <feed>0</feed>
      <feed>1</feed>
      <feed>2</feed>
      <feed>3</feed>
      <feed>4</feed>
      <feed>9</feed>
      <thruster file="propHS139v">
        <location unit="FT">
          <x>  10.1 </x>
          <y> -21.6 </y>
          <z>  -0.4 </z>
        </location>
        <orient unit="DEG">
          <roll>0</roll>
          <pitch>0</pitch>
          <yaw>0</yaw>
        </orient>
      </thruster>
    </engine>

    <engine file="R-1820-97"> <!-- Engine 1 (left inboard) -->
      <location unit="FT">
        <x>  8.6 </x>
        <y> -10.0 </y>
        <z> -0.7 </z>
      </location>
      <feed>5</feed>
      <feed>6</feed>
      <feed>7</feed>
      <feed>8</feed>
      <feed>10</feed>
      <feed>11</feed>
      <thruster file="propHS139v">
        <location unit="FT">
          <x>   8.6 </x>
          <y> -10.0 </y>
          <z>  -0.7 </z>
        </location>
        <orient unit="DEG">
          <roll>0</roll>
          <pitch>0</pitch>
          <yaw>0</yaw>
        </orient>
      </thruster>
    </engine>

    <engine file="R-1820-97"> <!-- Engine 2 (right inboard) -->
      <location unit="FT">
        <x>  8.6 </x>
        <y> 10.0 </y>
        <z> -0.7 </z>
      </location>
      <feed>12</feed>
      <feed>13</feed>
      <feed>15</feed>
      <feed>16</feed>
      <feed>17</feed>
      <feed>18</feed>
      <thruster file="propHS139v">
        <location unit="FT">
          <x>  8.6 </x>
          <y> 10.0 </y>
          <z> -0.7 </z>
        </location>
        <orient unit="DEG">
          <roll>0</roll>
          <pitch>0</pitch>
          <yaw>0</yaw>
        </orient>
      </thruster>
    </engine>

    <engine file="R-1820-97"> <!-- Engine 3 (right outboard) -->
      <location unit="FT">
        <x> 10.1 </x>
        <y> 21.6 </y>
        <z> -0.4 </z>
      </location>
      <feed>14</feed>
      <feed>19</feed>
      <feed>20</feed>
      <feed>21</feed>
      <feed>22</feed>
      <feed>23</feed>
      <thruster file="propHS139v">
        <location unit="FT">
          <x> 10.1 </x>
          <y> 21.6 </y>
          <z> -0.4 </z>
        </location>
        <orient unit="DEG">
          <roll>0</roll>
          <pitch>0</pitch>
          <yaw>0</yaw>
        </orient>
      </thruster>
    </engine>

    <!-- Left side tanks -->
    
    <tank type="FUEL" number="0">
      <description> B-17 Pilot's Manual "Left Outboard Tank 1" (54 US Gallons) </description>
      <location unit="FT">
        <x>  24.7 </x>
        <y> -45.8 </y>
        <z>   2.0 </z>
      </location>
      <capacity unit="LBS"> 328 </capacity>
      <contents unit="LBS"> 328 </contents>
    </tank>

    <tank type="FUEL" number="1">
      <description> B-17 Pilot's Manual "Left Outboard Tank 2" (54 US Gallons) </description>
      <location unit="FT">
        <x>  24.7 </x>
        <y> -43.8 </y>
        <z>   2.0 </z>
      </location>
      <capacity unit="LBS"> 328 </capacity>
      <contents unit="LBS"> 328 </contents>
    </tank>

    <tank type="FUEL" number="2">
      <description> B-17 Pilot's Manual "Left Outboard Tank 3" (54 US Gallons) </description>
      <location unit="FT">
        <x>  24.7 </x>
        <y> -41.9 </y>
        <z>   2.0 </z>
      </location>
      <capacity unit="LBS"> 328 </capacity>
      <contents unit="LBS"> 328 </contents>
    </tank>

    <tank type="FUEL" number="3">
      <description> B-17 Pilot's Manual "Left Outboard Tank 4" (54 US Gallons) </description>
      <location unit="FT">
        <x>  24.7 </x>
        <y> -40.0 </y>
        <z>   2.0 </z>
      </location>
      <capacity unit="LBS"> 328 </capacity>
      <contents unit="LBS"> 328 </contents>
    </tank>

    <tank type="FUEL" number="4">
      <description> B-17 Pilot's Manual "Left Outboard Tank 5" (54 US Gallons) </description>
      <location unit="FT">
        <x>  24.7 </x>
        <y> -37.7 </y>
        <z>   2.0 </z>
      </location>
      <capacity unit="LBS"> 328 </capacity>
      <contents unit="LBS"> 328 </contents>
    </tank>

    <tank type="FUEL" number="5">
      <description> B-17 Pilot's Manual "Left Inboard Tank 6" (67.5 US Gallons) </description>
      <location unit="FT">
        <x>  24.7 </x>
        <y> -35.8 </y>
        <z>   2.0 </z>
      </location>
      <capacity unit="LBS"> 410 </capacity>
      <contents unit="LBS"> 410 </contents>
    </tank>

    <tank type="FUEL" number="6">
      <description> B-17 Pilot's Manual "Left Inboard Tank 7" (67.5 US Gallons) </description>
      <location unit="FT">
        <x>  24.7 </x>
        <y> -33.9 </y>
        <z>   2.0 </z>
      </location>
      <capacity unit="LBS"> 410 </capacity>
      <contents unit="LBS"> 410 </contents>
    </tank>

    <tank type="FUEL" number="7">
      <description> B-17 Pilot's Manual "Left Inboard Tank 8" (67.5 US Gallons) </description>
      <location unit="FT">
        <x>  24.7 </x>
        <y> -32.0 </y>
        <z>   2.0 </z>
      </location>
      <capacity unit="LBS"> 410 </capacity>
      <contents unit="LBS"> 410 </contents>
    </tank>

    <tank type="FUEL" number="8">
      <description> B-17 Pilot's Manual "Left Inboard Tank 9" (67.5 US Gallons) </description>
      <location unit="FT">
        <x>  24.7 </x>
        <y> -30.1 </y>
        <z>   2.0 </z>
      </location>
      <capacity unit="LBS"> 410 </capacity>
      <contents unit="LBS"> 410 </contents>
    </tank>

    <tank type="FUEL" number="9">
      <description> B-17 Pilot's Manual "Left Outboard Engine tank" (425 US Gallons) </description>
      <location unit="FT">
        <x>  22.4 </x>
        <y> -25.8 </y>
        <z>   1.0 </z>
      </location>
      <capacity unit="LBS"> 2581 </capacity>
      <contents unit="LBS"> 2581 </contents>
    </tank>

    <tank type="FUEL" number="10">
      <description> B-17 Pilot's Manual "Left Inboard Engine tank" (213 US Gallons) </description>
      <location unit="FT">
        <x>  22.4 </x>
        <y> -14.3 </y>
        <z>   1.0 </z>
      </location>
      <capacity unit="LBS"> 1293 </capacity>
      <contents unit="LBS"> 1293 </contents>
    </tank>

    <tank type="FUEL" number="11">
      <description> B-17 Pilot's Manual "Left Inboard Engine 2 Feeder tank" (212 US Gallons) </description>
      <location unit="FT">
        <x>  25.0 </x>
        <y> -14.3 </y>
        <z>   1.0 </z>
      </location>
      <capacity unit="LBS"> 1287 </capacity>
      <contents unit="LBS"> 1287 </contents>
    </tank>

    <!-- Right side tanks -->

    <tank type="FUEL" number="12">
      <description> B-17 Pilot's Manual "Right Inboard Engine Feeder tank" (212 US Gallons) </description>
      <location unit="FT">
        <x> 25.0 </x>
        <y> 14.3 </y>
        <z>  1.0 </z>
      </location>
      <capacity unit="LBS"> 1287 </capacity>
      <contents unit="LBS"> 1287 </contents>
    </tank>

    <tank type="FUEL" number="13">
      <description> B-17 Pilot's Manual "Right Inboard Engine tank" (213 US Gallons) </description>
      <location unit="FT">
        <x> 22.4 </x>
        <y> 14.3 </y>
        <z>  1.0 </z>
      </location>
      <capacity unit="LBS"> 1293 </capacity>
      <contents unit="LBS"> 1293 </contents>
    </tank>

    <tank type="FUEL" number="14">
      <description> B-17 Pilot's Manual "Right Outboard Engine tank" (425 US Gallons) </description>
      <location unit="FT">
        <x> 22.4 </x>
        <y> 25.8 </y>
        <z>  1.0 </z>
      </location>
      <capacity unit="LBS"> 2581 </capacity>
      <contents unit="LBS"> 2581 </contents>
    </tank>

    <tank type="FUEL" number="15">
      <description> B-17 Pilot's Manual "Right Inboard Tank 9" (67.5 US Gallons) </description>
      <location unit="FT">
        <x> 24.7 </x>
        <y> 30.1 </y>
        <z>  2.0 </z>
      </location>
      <capacity unit="LBS"> 410 </capacity>
      <contents unit="LBS"> 410 </contents>
    </tank>

    <tank type="FUEL" number="16">
      <description> B-17 Pilot's Manual "Rightt Inboard Tank 8" (67.5 US Gallons) </description>
      <location unit="FT">
        <x> 24.7 </x>
        <y> 32.0 </y>
        <z>  2.0 </z>
      </location>
      <capacity unit="LBS"> 410 </capacity>
      <contents unit="LBS"> 410 </contents>
    </tank>

    <tank type="FUEL" number="17">
      <description> B-17 Pilot's Manual "Right Inboard Tank 7" (67.5 US Gallons) </description>
      <location unit="FT">
        <x> 24.7 </x>
        <y> 33.9 </y>
        <z>  2.0 </z>
      </location>
      <capacity unit="LBS"> 410 </capacity>
      <contents unit="LBS"> 410 </contents>
    </tank>

    <tank type="FUEL" number="18">
      <description> B-17 Pilot's Manual "Right Inboard Tank 6" (67.5 US Gallons) </description>
      <location unit="FT">
        <x> 24.7 </x>
        <y> 35.8 </y>
        <z>  2.0 </z>
      </location>
      <capacity unit="LBS"> 410 </capacity>
      <contents unit="LBS"> 410 </contents>
    </tank>


    <tank type="FUEL" number="19">
      <description> B-17 Pilot's Manual "Right Outboard Tank 5" (54 US Gallons) </description>
      <location unit="FT">
        <x> 24.7 </x>
        <y> 37.7 </y>
        <z>  2.0 </z>
      </location>
      <capacity unit="LBS"> 328 </capacity>
      <contents unit="LBS"> 328 </contents>
    </tank>


    <tank type="FUEL" number="20">
      <description> B-17 Pilot's Manual "Right Outboard Tank 4" (54 US Gallons) </description>
      <location unit="FT">
        <x> 24.7 </x>
        <y> 40.0 </y>
        <z>  2.0 </z>
      </location>
      <capacity unit="LBS"> 328 </capacity>
      <contents unit="LBS"> 328 </contents>
    </tank>

    <tank type="FUEL" number="21">
      <description> B-17 Pilot's Manual "Right Outboard Tank 3" (54 US Gallons) </description>
      <location unit="FT">
        <x> 24.7 </x>
        <y> 41.9 </y>
        <z>  2.0 </z>
      </location>
      <capacity unit="LBS"> 328 </capacity>
      <contents unit="LBS"> 328 </contents>
    </tank>

    <tank type="FUEL" number="22">
      <description> B-17 Pilot's Manual "Right Outboard Tank 2" (54 US Gallons) </description>
      <location unit="FT">
        <x> 24.7 </x>
        <y> 43.8 </y>
        <z>  2.0 </z>
      </location>
      <capacity unit="LBS"> 328 </capacity>
      <contents unit="LBS"> 328 </contents>
    </tank>

    <tank type="FUEL" number="23">
      <description> B-17 Pilot's Manual "Right Outboard Tank 1" (54 US Gallons) </description>
      <location unit="FT">
        <x> 24.7 </x>
        <y> 45.8 </y>
        <z>  2.0 </z>
      </location>
      <capacity unit="LBS"> 328 </capacity>
      <contents unit="LBS"> 328 </contents>
    </tank>

  </propulsion>

  <flight_control name="FCS: Boeing B-17G">

    <channel name="Pitch">
      <summer name="Pitch Trim Sum">
        <input>fcs/elevator-cmd-norm</input>
        <input>fcs/pitch-trim-cmd-norm</input>
        <clipto>
          <min> -1 </min>
          <max>  1 </max>
        </clipto>
      </summer>

      <aerosurface_scale name="Elevator Control">
        <input>fcs/pitch-trim-sum</input>
        <range>
          <min> -0.35 </min>
          <max>  0.35 </max>
        </range>
        <output>fcs/elevator-pos-rad</output>
      </aerosurface_scale>

      <aerosurface_scale name="elevator normalization">
        <input>fcs/elevator-pos-rad</input>
        <domain>
          <min> -0.35 </min>
          <max>  0.35 </max>
        </domain>
        <range>
          <min> -1 </min>
          <max>  1 </max>
        </range>
        <output>fcs/elevator-pos-norm</output>
      </aerosurface_scale>

    </channel>

    <channel name="Roll">
      <summer name="Roll Trim Sum">
        <input>fcs/aileron-cmd-norm</input>
        <input>fcs/roll-trim-cmd-norm</input>
        <clipto>
          <min> -1 </min>
          <max>  1 </max>
        </clipto>
      </summer>

      <aerosurface_scale name="Left Aileron Control">
        <input>fcs/roll-trim-sum</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/roll-trim-sum</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="Yaw">
      <summer name="Rudder Command Sum">
        <input>fcs/rudder-cmd-norm</input>
        <input>fcs/yaw-trim-cmd-norm</input>
        <clipto>
          <min> -0.35 </min>
          <max>  0.35 </max>
        </clipto>
      </summer>

      <aerosurface_scale name="Rudder Control">
        <input>fcs/rudder-command-sum</input>
        <range>
          <min> -0.35 </min>
          <max>  0.35 </max>
        </range>
        <output>fcs/rudder-pos-rad</output>
      </aerosurface_scale>

      <aerosurface_scale name="rudder normalization">
        <input>fcs/rudder-pos-rad</input>
        <domain>
          <min> -0.35 </min>
          <max>  0.35 </max>
        </domain>
        <range>
          <min> -1 </min>
          <max>  1 </max>
        </range>
        <output>fcs/rudder-pos-norm</output>
      </aerosurface_scale>

    </channel>

    <channel name="Flaps">
      <kinematic name="Flaps Control">
        <input>fcs/flap-cmd-norm</input>
        <traverse>
          <setting>
            <position>  0 </position>
            <time>      0 </time>
          </setting>
          <setting>
            <position> 15 </position>
            <time>      4 </time>
          </setting>
          <setting>
            <position> 30 </position>
            <time>      3 </time>
          </setting>
        </traverse>
        <output>fcs/flap-pos-deg</output>
      </kinematic>

      <aerosurface_scale name="flap normalization">
        <input>fcs/flap-pos-deg</input>
        <domain>
          <min>  0 </min>
          <max> 30 </max>
        </domain>
        <range>
          <min> 0 </min>
          <max> 1 </max>
        </range>
        <output>fcs/flap-pos-norm</output>
      </aerosurface_scale>

    </channel>

    <channel name="Landing Gear">
      <kinematic name="Gear Control">
        <input>gear/gear-cmd-norm</input>
        <traverse>
          <setting>
            <position> 0 </position>
            <time>     0 </time>
          </setting>
          <setting>
            <position> 1 </position>
            <time>     5 </time>
          </setting>
        </traverse>
        <output>gear/gear-pos-norm</output>
      </kinematic>

    </channel>

    <channel name="Speedbrake">
      <kinematic name="Speedbrake Control">
        <input>fcs/speedbrake-cmd-norm</input>
        <traverse>
          <setting>
            <position> 0 </position>
            <time>     0 </time>
          </setting>
          <setting>
            <position> 1 </position>
            <time>     1 </time>
          </setting>
        </traverse>
        <output>fcs/speedbrake-pos-norm</output>
      </kinematic>

    </channel>

  </flight_control>

  <aerodynamics>

    <function name="aero/angle/right_wing_tip_alpha">
      <description>
         This parameter calculates the angle of attack at the right wingtip,
         accounting for the motion of the wing at that point away from the CG.
      </description>
      <atan2>
        <sum>
          <property>velocities/w-fps</property>
          <product>
            <property>velocities/p-aero-rad_sec</property>
            <value>50</value>
          </product>
        </sum>
        <difference>
          <property>velocities/u-fps</property>
          <product>
            <property>velocities/r-aero-rad_sec</property>
            <value>50</value>
          </product>
        </difference>
      </atan2>
    </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>
          <table>
            <independentVar lookup="row">aero/alpha-rad</independentVar>
            <tableData>
              -0.20 -0.740
              0.00 0.240
              0.24    1.400
              0.60 0.704
            </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>
          <property>fcs/flap-pos-deg</property>
          <value> 0.02000 </value>
        </product>
      </function>

      <function name="aero/coefficient/dCLsb">
        <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</value>
        </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>
          <property>fcs/elevator-pos-rad</property>
          <value>0.2</value>
        </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.033
              0.00    0.025
              0.26    0.033
              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>
          <value>0.039</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.7      0.000
              1.10      0.023
              1.80      0.015
            </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>
          <property>fcs/flap-pos-deg</property>
          <value> 0.00117 </value>
        </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.023</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.025</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>
          <property>fcs/elevator-pos-norm</property>
          <value>0.04</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.1</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.150
              2.0    0.050
            </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.01</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.4</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     -1.000
              2.0     -0.250
            </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>-22</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>-8</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.15</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.1</value>
        </product>
      </function>

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

    </axis>

  </aerodynamics>

  <output name="JSBoutB17.csv" type="CSV" rate="120">
    <rates> ON </rates>
    <velocities> ON </velocities>
    <forces> ON </forces>
    <moments> ON </moments>
    <position> ON </position>
    <propulsion> ON </propulsion>
    <aerosurfaces> ON </aerosurfaces>
    <fcs> OFF </fcs>
    <massprops> ON </massprops>
    <ground_reactions> ON </ground_reactions>
    <property> aero/angle/right_wing_tip_alpha </property>
  </output>
  
</fdm_config>
