<?xml version="1.0" encoding="ISO-8859-1"?>

<!--Grumman EA-6B Prowler : BARANGER Emmanuel ( 04/2023 )
                  Updated : BARANGER Emmanuel ( 05/2023 )

    sources               : https://www.wikiwand.com/en/Northrop%20Grumman%20EA-6B%20Prowler

    Wingspan              :  16    m    ( 53 ft        )
    Lenght                :  18.24 m    ( 59 ft 10 in  )
    Height                :   5.08 m    ( 16 ft  8 in  )
    Empty mass            :  14134 kg   (    31160 lb  )
    Max takeoff weight    :  27896 kg   (    61500 lb  )
    Engines               : 2 Pratt & Whitney J52-P-408A turbojet engines, 10400 lbf thrust each
    Cruise speed          :    774 km/h (      418 kn  )
    Maximum speed         :   1048 km/h (      566 kn  )
-->
<airplane mass="31160" version="YASIM_VERSION_CURRENT" mtow-lbs="61500">

      <!-- Approach configuration -->
      <approach          speed="97" aoa="4"                          fuel="0.3">
        <control-setting axis="/controls/engines/engine[0]/throttle" value="0.20"/>

        <control-setting axis="/controls/engines/engine[1]/throttle" value="0.20"/>

        <control-setting axis="/controls/flight/flaps"               value="1.00"/>
        <control-setting axis="/controls/gear/gear-down"             value="1.00"/>
      </approach>

      <!-- Cruise configuration -->
      <cruise            speed="418" alt="30000"                     fuel="0.7">
        <control-setting axis="/controls/engines/engine[0]/throttle" value="0.80"/>

        <control-setting axis="/controls/engines/engine[1]/throttle" value="0.80"/>

        <control-setting axis="/controls/flight/flaps"               value="0.00"/>
        <control-setting axis="/controls/flight/spoilers"            value="0.00"/>
        <control-setting axis="/controls/gear/gear-down"             value="0.00"/>
      </cruise>

      <cockpit x=" 5.750" y="0.300" z="0.900"/>

      <!-- Fuselage up -->
      <fuselage ax=" 7.409" ay=" 0.000" az=" 0.076" bx=" 6.420" by=" 0.000" bz=" 0.421" width="1.147" taper="0.40" midpoint="1"/>
      <fuselage ax=" 6.420" ay=" 0.000" az=" 0.421" bx=" 5.710" by=" 0.000" bz=" 0.635" width="1.275" taper="0.90" midpoint="1"/>
      <fuselage ax=" 5.900" ay=" 0.000" az=" 0.599" bx=" 4.788" by=" 0.000" bz=" 0.621" width="1.417" taper="0.90" midpoint="1"/>
      <fuselage ax=" 4.845" ay=" 0.000" az=" 0.621" bx=" 3.260" by=" 0.000" bz=" 0.515" width="1.417" taper="1.00" midpoint="1"/>
      <fuselage ax=" 3.310" ay=" 0.000" az=" 0.515" bx=" 0.631" by=" 0.000" bz=" 0.121" width="1.417" taper="1.00" midpoint="1"/>
      <fuselage ax=" 0.639" ay=" 0.000" az=" 0.075" bx="-2.438" by=" 0.000" bz=" 0.146" width="1.551" taper="0.75" midpoint="0"/>
      <fuselage ax="-2.433" ay=" 0.000" az=" 0.148" bx="-5.437" by=" 0.000" bz=" 0.224" width="1.163" taper="0.60" midpoint="0"/>
      <fuselage ax="-5.433" ay=" 0.000" az=" 0.221" bx="-7.774" by=" 0.000" bz=" 0.216" width="0.696" taper="0.20" midpoint="0"/>

      <!-- Fuselage center -->
      <fuselage ax=" 8.744" ay=" 0.000" az="-0.617" bx=" 8.665" by=" 0.000" bz="-0.595" width="0.270" taper="0.05" midpoint="1"/>
      <fuselage ax=" 8.667" ay=" 0.000" az="-0.593" bx=" 8.446" by=" 0.000" bz="-0.530" width="0.677" taper="0.40" midpoint="1"/>
      <fuselage ax=" 8.487" ay=" 0.000" az="-0.520" bx=" 8.109" by=" 0.000" bz="-0.460" width="0.946" taper="0.68" midpoint="1"/>
      <fuselage ax=" 8.109" ay=" 0.000" az="-0.460" bx=" 7.361" by=" 0.000" bz="-0.341" width="1.302" taper="0.73" midpoint="1"/>
      <fuselage ax=" 7.452" ay=" 0.000" az="-0.341" bx=" 5.452" by=" 0.000" bz="-0.305" width="1.551" taper="0.83" midpoint="1"/>
      <fuselage ax=" 5.452" ay=" 0.000" az="-0.305" bx=" 1.648" by=" 0.000" bz="-0.305" width="1.551" taper="1.00" midpoint="1"/>
      <fuselage ax=" 1.648" ay=" 0.000" az="-0.305" bx="-2.438" by=" 0.000" bz="-0.234" width="1.551" taper="0.75" midpoint="0"/>
      <fuselage ax="-2.438" ay=" 0.000" az="-0.234" bx="-5.437" by=" 0.000" bz="-0.055" width="1.163" taper="0.60" midpoint="0"/>
      <fuselage ax="-5.437" ay=" 0.000" az="-0.055" bx="-7.774" by=" 0.000" bz=" 0.071" width="0.696" taper="0.20" midpoint="0"/>

      <!-- Fuselage down -->
      <fuselage ax=" 8.744" ay=" 0.000" az="-0.617" bx=" 8.574" by=" 0.000" bz="-0.755" width="0.270" taper="0.05" midpoint="1"/>
      <fuselage ax=" 8.667" ay=" 0.000" az="-0.725" bx=" 8.437" by=" 0.000" bz="-0.714" width="0.677" taper="0.40" midpoint="1"/>
      <fuselage ax=" 8.487" ay=" 0.000" az="-0.689" bx=" 8.061" by=" 0.000" bz="-0.702" width="0.946" taper="0.68" midpoint="1"/>
      <fuselage ax=" 8.109" ay=" 0.000" az="-0.700" bx=" 7.354" by=" 0.000" bz="-0.632" width="1.302" taper="0.73" midpoint="1"/>
      <fuselage ax=" 7.450" ay=" 0.000" az="-0.621" bx=" 5.452" by=" 0.000" bz="-0.535" width="1.551" taper="0.83" midpoint="1"/>
      <fuselage ax=" 5.452" ay=" 0.000" az="-0.535" bx=" 1.648" by=" 0.000" bz="-0.535" width="1.551" taper="1.00" midpoint="1"/>
      <fuselage ax=" 1.699" ay=" 0.000" az="-0.529" bx="-2.438" by=" 0.000" bz="-0.234" width="1.551" taper="0.75" midpoint="0"/>

      <!-- Engine left -->
      <fuselage ax=" 5.428" ay=" 0.623" az="-0.774" bx=" 4.055" by=" 0.416" bz="-0.694" width="1.551" taper="0.40" midpoint="1"/>
      <fuselage ax=" 4.165" ay=" 0.416" az="-0.694" bx=" 1.648" by=" 0.416" bz="-0.694" width="1.551" taper="1.00" midpoint="1"/>
      <fuselage ax=" 1.648" ay=" 0.416" az="-0.694" bx="-1.309" by=" 0.622" bz="-0.335" width="1.551" taper="0.40" midpoint="0"/>

      <!-- Engine right -->
      <fuselage ax=" 5.428" ay="-0.623" az="-0.774" bx=" 4.055" by="-0.416" bz="-0.694" width="1.551" taper="0.40" midpoint="1"/>
      <fuselage ax=" 4.165" ay="-0.416" az="-0.694" bx=" 1.648" by="-0.416" bz="-0.694" width="1.551" taper="1.00" midpoint="1"/>
      <fuselage ax=" 1.648" ay="-0.416" az="-0.694" bx="-1.309" by="-0.622" bz="-0.335" width="1.551" taper="0.40" midpoint="0"/>

      <wing x="1.294" y="0.000" z="0.175"
            chord    = "4.699"
            length   = "8.5"
            taper    = "0.25"
            sweep    = "21"
            dihedral = "-1.5"
            camber   = "0.005">
            <stall     aoa="20" width="1"    peak="1.5"/>
            <slat      aoa="30" start="0.40" end="1"    drag="1.5"/>
            <flap0   start="0.15" end="0.86" lift="1.9" drag="2.0"/>
            <flap1   start="0.15" end="0.86" lift="1.2" drag="1.2"/>
            <spoiler start="0.80" end="1.00" lift="1.0" drag="20"/>

            <control-input  control="SLAT"    axis="/controls/flight/flaps"/>
            <control-input  control="FLAP0"   axis="/controls/flight/flaps"/>
            <control-input  control="FLAP1"   axis="/controls/flight/aileron"                  split="true"/>
            <control-input  control="FLAP1"   axis="/controls/flight/aileron-trim"             split="true"/>
            <control-input  control="SPOILER" axis="/controls/flight/spoilers"/>

            <control-output control="SLAT"    prop="/surface-positions/slat-pos-norm"/>
            <control-output control="FLAP0"   prop="/surface-positions/flap-pos-norm"/>
            <control-output control="FLAP1"   prop="/surface-positions/left-aileron-pos-norm"  side="left"/>
            <control-output control="FLAP1"   prop="/surface-positions/right-aileron-pos-norm" side="right"/>
            <control-output control="SPOILER" prop="/surface-positions/speedbrake-pos-norm"    invert="true"/>

            <control-speed  control="SLAT"    transition-time="2"/>
            <control-speed  control="FLAP0"   transition-time="3"/>
            <control-speed  control="SPOILER" transition-time="2"/>
      </wing>

      <hstab x="-6.275" y="0.000" z="0.214"
             chord  = "2.15"
             length = "3.10"
             taper  = "0.45"
             sweep  = "26">
             <stall   aoa="18" width="1" peak="1.5"/>
             <flap0 start="0" end="1" lift="1.5" drag="1.2"/>

             <control-input  control="FLAP0" axis="/controls/flight/elevator"/>
             <control-input  control="FLAP0" axis="/controls/flight/elevator-trim"/>

             <control-output control="FLAP0" prop="/surface-positions/elevator-pos-norm"/>
      </hstab>

      <vstab x="-6.737" y="0.000" z="-0.2"
             taper  = "0.5"
             length = "2.77"
             chord  = "3.59"
             sweep  = "16">
             <stall   aoa="16" width="1" peak="1.5"/>
             <flap0 start="0"    end="1" lift="1.2" drag="1.2"/>

             <control-input  control="FLAP0" axis="/controls/flight/rudder"      invert="true"/>
             <control-input  control="FLAP0" axis="/controls/flight/rudder-trim" invert="true"/>

             <control-output control="FLAP0" prop="/surface-positions/rudder-pos-norm"/>
      </vstab>

      <!-- Engines   source            : https://www.wikiwand.com/en/Pratt_&_Whitney_J52-P-408A

                     name              : Pratt & Whitney J52-P-408
                     type              : turbojet
                     Compressor        : axial flow, 5-stage LP, 7-stage HP
                     thrust            : 11200 lbf
                     weight            :  2318 lb ( 1052 kg )
      -->
      <jet x="2.799" y=" 0.504" z="-0.319"
           mass   = "2318"
           thrust = "11200"
           tsfc   = "0.371"
           egt    = "950">
           <actionpt x="-1.300" y="0.834" z="-0.359"/>

           <control-input axis="/controls/engines/engine[0]/throttle" control="THROTTLE"/>
      </jet>

      <jet x="2.799" y="-0.504" z="-0.319"
           mass   = "2318"
           thrust = "11200"
           tsfc   = "0.371"
           egt    = "950">
           <actionpt x="-1.300" y="-0.834" z="-0.359"/>

           <control-input axis="/controls/engines/engine[1]/throttle" control="THROTTLE"/>
      </jet>

      <!-- nose -->
      <gear x="5.469" y=" 0.000" z="-2.335"
            compression = "0.2"
            spring      = "2"
            damp        = "1"
            stiction    = "1">
            <control-input  control="STEER"  axis="/controls/flight/rudder" src0="-1.0" src1="1.0" dst0="-0.7" dst1="0.7"/>
            <control-input  control="EXTEND" axis="/controls/gear/gear-down"/>

            <control-output control="EXTEND" prop="/gear/gear[0]/position-norm"/>

            <control-speed  control="EXTEND" transition-time="5"/>
      </gear>

      <!-- left main -->
      <gear x="0.176" y=" 1.616" z="-2.338"
            compression = "0.2"
            spring      = "2"
            damp        = "1"
            stiction    = "1">
            <control-input  control="BRAKE"  axis="/controls/gear/brake-left"/>
            <control-input  control="BRAKE"  axis="/controls/gear/brake-parking"/>
            <control-input  control="EXTEND" axis="/controls/gear/gear-down"/>

            <control-output control="EXTEND" prop="gear/gear[1]/position-norm"/>

            <control-speed  control="EXTEND" transition-time="6"/>
      </gear>

      <!-- right main -->
      <gear x="0.176" y="-1.616" z="-2.338"
            compression = "0.2"
            spring      = "2"
            damp        = "1"
            stiction    = "1">
            <control-input  control="BRAKE"  axis="/controls/gear/brake-right"/>
            <control-input  control="BRAKE"  axis="/controls/gear/brake-parking"/>
            <control-input  control="EXTEND" axis="/controls/gear/gear-down"/>

            <control-output control="EXTEND" prop="gear/gear[2]/position-norm"/>

            <control-speed  control="EXTEND" transition-time="7"/>
      </gear>

      <!-- Internal tanks 1933 US Gal in 2 tank ( 966.5 each )-->
      <!-- 2*966.5 US Gal = 2*6500 lbs = 2*3660 liter -->
      <tank x="1.517" y=" 3.496" z="-0.805" jet="true" capacity="6495"/>
      <tank x="1.517" y="-3.496" z="-0.805" jet="true" capacity="6495"/>

      <!-- External wings tanks 300 Gal US each -->
      <!-- 2*300 US Gal = 2*2016 lbs = 2*550 liter-->
      <tank x="1.517" y=" 2.299" z="-0.775" jet="true" capacity="2016"/>
      <tank x="1.517" y="-2.299" z="-0.775" jet="true" capacity="2016"/>

      <!-- external loads -->
      <weight x=" 1.517" y=" 2.299" z="-0.812"  size="1.000" mass-prop="sim/weight[0]/weight-lb"/> <!-- Left int  -->
      <weight x=" 1.517" y="-2.299" z="-0.812"  size="1.000" mass-prop="sim/weight[1]/weight-lb"/> <!-- Right int -->
      <weight x=" 0.927" y=" 0.000" z="-1.657"  size="1.000" mass-prop="sim/weight[2]/weight-lb"/> <!-- Center    -->
      <weight x=" 0.900" y=" 3.380" z="-0.650"  size="1.000" mass-prop="sim/weight[3]/weight-lb"/> <!-- Left ext  -->
      <weight x=" 0.900" y="-3.380" z="-0.650"  size="1.000" mass-prop="sim/weight[4]/weight-lb"/> <!-- Right ext -->

      <launchbar x="5.708" y="0.000" z="-2.066"
                 length = "0.2">
                 <control-input control="LEXTEND" axis="/controls/gear/launchbar"/>
                 <control-speed control="LEXTEND" transition-time="1"/>
      </launchbar>

      <!-- Deck landing hook -->
      <hook x="-3.382" y="0.000" z="-0.582"
            length     = "1.9"
            down-angle = "60"
            up-angle   = "-7">
            <control-input control="HEXTEND" axis="/controls/gear/tailhook"/>
            <control-speed control="HEXTEND" transition-time="4"/>
      </hook>

      <!-- Mass distribution
           Dilbert : The cg should be about 1/6 chord ahead of the chord center.
           4.699 / 6     = 0.783
           1.294 + 0.783 = 2.077
      -->
      <ballast x="7.640" y="0.000" z="-1.100" mass="7246"/>

</airplane>
