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

<!-- Hughes XF11  : 2008 BARANGER Emmanuel
          Updated : 2014 Mitch HARDER - BARANGER Emmanuel
          Updated : 2020 BARANGER Emmanuel (June)
          Updated : 2024 BARANGER Emmanuel (September)

          sources : https://en.wikipedia.org/wiki/Hughes_XF-11

     wingspan     : 30.90 m                                       (   101 ft 5 in )
     Lenght       : 19.90 m                                       (    65 ft 3 in )
     Height       :  7.09 m                                       (    23 ft 2 in )
     Empty weight : 16800 kg                                      ( 37100 lbs     )
     Max weight   : 26451 kg                                      ( 58315 lbs     )
     Moteur       : 2 Pratt & Whitney R-4360-31 28 Cyl. (3000 ch) (  3000 hp      )
     Vitesse max  : 724 km/h                                      (   391 kts     )
-->
<airplane mass="37100" version="YASIM_VERSION_CURRENT" mtow-lbs="58315">

  <approach speed="78" aoa="2" fuel="0.3">
    <control-setting axis="/controls/engines/engine[0]/throttle"        value="0.3"/>
    <control-setting axis="/controls/engines/engine[0]/mixture"         value="1.0"/>
    <control-setting axis="/controls/engines/engine[0]/propeller-pitch" value="1.0"/>
    <control-setting axis="/controls/engines/engine[0]/boost"           value="0.3"/>

    <control-setting axis="/controls/engines/engine[1]/throttle"        value="0.3"/>
    <control-setting axis="/controls/engines/engine[1]/mixture"         value="1.0"/>
    <control-setting axis="/controls/engines/engine[1]/propeller-pitch" value="1.0"/>
    <control-setting axis="/controls/engines/engine[1]/boost"           value="0.3"/>
    <control-setting axis="/controls/flight/flaps"                      value="1"/>
    <control-setting axis="/controls/gear/gear-down"                    value="1"/>
  </approach>

  <cruise speed="250" alt="10000" fuel="0.3">
    <control-setting axis="/controls/engines/engine[0]/throttle"        value="0.86"/>
    <control-setting axis="/controls/engines/engine[0]/mixture"         value="0.50"/>
    <control-setting axis="/controls/engines/engine[0]/propeller-pitch" value="0.83"/>
    <control-setting axis="/controls/engines/engine[0]/boost"           value="1.00"/>

    <control-setting axis="/controls/engines/engine[1]/throttle"        value="0.86"/>
    <control-setting axis="/controls/engines/engine[1]/mixture"         value="0.50"/>
    <control-setting axis="/controls/engines/engine[1]/propeller-pitch" value="0.83"/>
    <control-setting axis="/controls/engines/engine[1]/boost"           value="1.00"/>
    <control-setting axis="/controls/flight/flaps"                      value="0"/>
    <control-setting axis="/controls/gear/gear-down"                    value="0"/>
  </cruise>

  <cockpit x="3.995" y="0.000" z="0.341"/>

  <!-- Fuselage -->
  <fuselage ax=" 9.968" ay=" 0.000" az="-0.658" bx=" 9.647" by=" 0.000" bz="-0.665" width="0.609" taper="0.40" midpoint="1"/>
  <fuselage ax=" 9.647" ay=" 0.000" az="-0.665" bx=" 9.112" by=" 0.000" bz="-0.665" width="0.904" taper="0.68" midpoint="1"/>
  <fuselage ax=" 9.112" ay=" 0.000" az="-0.665" bx=" 8.192" by=" 0.000" bz="-0.665" width="1.198" taper="0.76" midpoint="1"/>
  <fuselage ax=" 8.192" ay=" 0.000" az="-0.665" bx=" 6.733" by=" 0.000" bz="-0.665" width="1.411" taper="0.85" midpoint="1"/>
  <fuselage ax=" 6.733" ay=" 0.000" az="-0.665" bx=" 5.049" by=" 0.000" bz="-0.665" width="1.590" taper="0.89" midpoint="1"/>
  <fuselage ax=" 5.049" ay=" 0.000" az="-0.665" bx=" 3.738" by=" 0.000" bz="-0.608" width="1.590" taper="1.00" midpoint="1"/>
  <fuselage ax=" 3.738" ay=" 0.000" az="-0.608" bx=" 2.812" by=" 0.000" bz="-0.528" width="1.590" taper="0.90" midpoint="0"/>
  <fuselage ax=" 2.812" ay=" 0.000" az="-0.528" bx=" 1.638" by=" 0.000" bz="-0.440" width="1.431" taper="0.60" midpoint="0"/>
  <fuselage ax=" 1.638" ay=" 0.000" az="-0.440" bx=" 0.867" by=" 0.000" bz="-0.440" width="0.859" taper="0.20" midpoint="0"/>
  <!-- Glass -->
  <fuselage ax=" 5.058" ay=" 0.000" az=" 0.006" bx=" 4.643" by=" 0.000" bz=" 0.038" width="0.758" taper="0.30" midpoint="1"/>
  <fuselage ax=" 4.643" ay=" 0.000" az=" 0.038" bx=" 4.222" by=" 0.000" bz=" 0.038" width="1.031" taper="0.76" midpoint="1"/>
  <fuselage ax=" 4.222" ay=" 0.000" az=" 0.038" bx=" 3.480" by=" 0.000" bz=" 0.038" width="1.031" taper="1.00" midpoint="1"/>
  <fuselage ax=" 3.480" ay=" 0.000" az=" 0.038" bx=" 2.388" by=" 0.000" bz="-0.027" width="1.031" taper="0.75" midpoint="0"/>
  <fuselage ax=" 2.388" ay=" 0.000" az="-0.027" bx=" 1.617" by=" 0.000" bz="-0.073" width="0.762" taper="0.20" midpoint="0"/>

  <!-- moteur gauche -->
  <fuselage ax=" 6.574" ay=" 4.152" az="-0.740" bx=" 6.404" by=" 4.152" bz="-0.740" width="1.410" taper="0.80" midpoint="1"/>
  <fuselage ax=" 6.404" ay=" 4.152" az="-0.740" bx=" 6.270" by=" 4.152" bz="-0.740" width="1.460" taper="0.96" midpoint="1"/>
  <fuselage ax=" 6.270" ay=" 4.152" az="-0.740" bx=" 2.986" by=" 4.152" bz="-0.809" width="1.564" taper="0.93" midpoint="1"/>
  <fuselage ax=" 2.986" ay=" 4.152" az="-0.809" bx="-3.012" by=" 4.152" bz="-0.809" width="1.564" taper="1.00" midpoint="1"/>

  <fuselage ax="-3.012" ay=" 4.152" az="-0.809" bx="-8.256" by=" 4.152" bz="-0.325" width="1.564" taper="0.40" midpoint="0"/>
  <fuselage ax="-8.256" ay=" 4.152" az="-0.325" bx="-9.135" by=" 4.152" bz="-0.104" width="0.626" taper="0.60" midpoint="0"/>
  <fuselage ax="-9.135" ay=" 4.152" az="-0.104" bx="-9.598" by=" 4.152" bz="-0.028" width="0.376" taper="0.60" midpoint="0"/>
  <fuselage ax="-9.598" ay=" 4.152" az="-0.028" bx="-9.980" by=" 4.152" bz="-0.343" width="0.226" taper="0.15" midpoint="0"/>

  <fuselage ax="-8.256" ay=" 4.152" az="-0.457" bx="-9.135" by=" 4.152" bz="-0.457" width="0.626" taper="0.60" midpoint="0"/>
  <fuselage ax="-9.135" ay=" 4.152" az="-0.457" bx="-9.598" by=" 4.152" bz="-0.457" width="0.376" taper="0.60" midpoint="0"/>
  <fuselage ax="-9.598" ay=" 4.152" az="-0.457" bx="-9.980" by=" 4.152" bz="-0.343" width="0.226" taper="0.15" midpoint="0"/>

  <fuselage ax="-3.012" ay=" 4.152" az="-0.809" bx="-8.256" by=" 4.152" bz="-0.747" width="1.564" taper="0.40" midpoint="0"/>
  <fuselage ax="-8.256" ay=" 4.152" az="-0.747" bx="-9.135" by=" 4.152" bz="-0.711" width="0.626" taper="0.60" midpoint="0"/>
  <fuselage ax="-9.135" ay=" 4.152" az="-0.711" bx="-9.598" by=" 4.152" bz="-0.672" width="0.376" taper="0.60" midpoint="0"/>
  <fuselage ax="-9.598" ay=" 4.152" az="-0.672" bx="-9.980" by=" 4.152" bz="-0.343" width="0.226" taper="0.15" midpoint="0"/>

  <!-- moteur droit -->
  <fuselage ax=" 6.574" ay="-4.152" az="-0.740" bx=" 6.404" by="-4.152" bz="-0.740" width="1.410" taper="0.80" midpoint="1"/>
  <fuselage ax=" 6.404" ay="-4.152" az="-0.740" bx=" 6.270" by="-4.152" bz="-0.740" width="1.460" taper="0.96" midpoint="1"/>
  <fuselage ax=" 6.270" ay="-4.152" az="-0.740" bx=" 2.986" by="-4.152" bz="-0.809" width="1.564" taper="0.93" midpoint="1"/>
  <fuselage ax=" 2.986" ay="-4.152" az="-0.809" bx="-3.012" by="-4.152" bz="-0.809" width="1.564" taper="1.00" midpoint="1"/>

  <fuselage ax="-3.012" ay="-4.152" az="-0.809" bx="-8.256" by="-4.152" bz="-0.325" width="1.564" taper="0.40" midpoint="0"/>
  <fuselage ax="-8.256" ay="-4.152" az="-0.325" bx="-9.135" by="-4.152" bz="-0.104" width="0.626" taper="0.60" midpoint="0"/>
  <fuselage ax="-9.135" ay="-4.152" az="-0.104" bx="-9.598" by="-4.152" bz="-0.028" width="0.376" taper="0.60" midpoint="0"/>
  <fuselage ax="-9.598" ay="-4.152" az="-0.028" bx="-9.980" by="-4.152" bz="-0.343" width="0.226" taper="0.15" midpoint="0"/>

  <fuselage ax="-8.256" ay="-4.152" az="-0.457" bx="-9.135" by="-4.152" bz="-0.457" width="0.626" taper="0.60" midpoint="0"/>
  <fuselage ax="-9.135" ay="-4.152" az="-0.457" bx="-9.598" by="-4.152" bz="-0.457" width="0.376" taper="0.60" midpoint="0"/>
  <fuselage ax="-9.598" ay="-4.152" az="-0.457" bx="-9.980" by="-4.152" bz="-0.343" width="0.226" taper="0.15" midpoint="0"/>

  <fuselage ax="-3.012" ay="-4.152" az="-0.809" bx="-8.256" by="-4.152" bz="-0.747" width="1.564" taper="0.40" midpoint="0"/>
  <fuselage ax="-8.256" ay="-4.152" az="-0.747" bx="-9.135" by="-4.152" bz="-0.711" width="0.626" taper="0.60" midpoint="0"/>
  <fuselage ax="-9.135" ay="-4.152" az="-0.711" bx="-9.598" by="-4.152" bz="-0.672" width="0.376" taper="0.60" midpoint="0"/>
  <fuselage ax="-9.598" ay="-4.152" az="-0.672" bx="-9.980" by="-4.152" bz="-0.343" width="0.226" taper="0.15" midpoint="0"/>

  <!-- Aile -->
  <wing x="1.742" y="0" z="-0.379"
        chord="4.244"
        length="15.183"
        taper="0.42"
        dihedral="1"
        camber="0.1"
        sweep="1"
        incidence="1"
        twist="-1">
        <stall     aoa="20" width="1"    peak="1.5"/>
        <flap0   start="0"    end="0.6"  lift="1.4" drag="1.8"/>
        <flap1   start="0.60" end="0.95" lift="1.3" drag="1.1"/>
        <spoiler start="0.48" end="0.87" lift="1.0" drag="31.5"/>

        <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="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-norm"/>

        <control-speed  control="FLAP0"   transition-time="5"/>
  </wing>

  <hstab x="-7.756" y="0.0" z="0.096"
         chord="2.606"
         length="3.919"
         taper="1"
         camber="0.1">
         <stall aoa="18" width="1"    peak="1.5"/>
         <flap0 start="0"  end="0.95" lift="1.5" drag="1.1"/>

         <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="-7.950" y="4.152" z="-0.013"
         chord="3.231"
         length="3.498"
         taper="0.42"
         sweep="4">
         <stall   aoa="16" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.2" drag="1.1"/>

         <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>

  <vstab x="-7.950" y="-4.152" z="-0.013"
         chord="3.231"
         length="3.498"
         taper="0.42"
         sweep="4">
         <stall   aoa="14" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.3" drag="1.1"/>

         <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>

  <!-- Engine Left -->
  <propeller x="6.694" y="4.152" z="-0.744"
             mass="4090"
             moment="25"
             radius="2.437"
             cruise-speed="254"
             cruise-rpm="950"
             cruise-power="2125"
             cruise-alt="5000"
             min-rpm="210"
             max-rpm="1012"
             fine-stop="0.25"
             coarse-stop="4"
             gear-ratio="0.375"
             contra="1">
             <control-input control="ADVANCE" axis="/controls/engines/engine[0]/propeller-pitch"/>
             <actionpt x="7.102" y="4.152" z="-0.744"/>
             <piston-engine eng-power="3000"
                            eng-rpm="2700"
                            displacement="4363"
                            compression="7"
                            turbo-mul="1.75"
                            wastegate-mp="52">
                            <control-input control="THROTTLE" axis="/controls/engines/engine[0]/throttle"/>
                            <control-input control="STARTER"  axis="/controls/engines/engine[0]/starter"/>
                            <control-input control="MAGNETOS" axis="/controls/engines/engine[0]/magnetos"/>
                            <control-input control="MIXTURE"  axis="/controls/engines/engine[0]/mixture"/>
                            <control-input control="BOOST"    axis="/controls/engines/engine[0]/boost"/>
             </piston-engine>
  </propeller>

  <!-- Engine Right -->
  <propeller x="6.694" y="-4.152" z="-0.744"
             mass="4090"
             moment="-25"
             radius="2.437"
             cruise-speed="254"
             cruise-rpm="950"
             cruise-power="2125"
             cruise-alt="5000"
             min-rpm="210"
             max-rpm="1012"
             fine-stop="0.25"
             coarse-stop="4"
             gear-ratio="0.375"
             contra="1">
             <control-input control="ADVANCE" axis="/controls/engines/engine[1]/propeller-pitch"/>
             <actionpt x="7.102" y="-4.152" z="-0.744"/>
             <piston-engine eng-power="3000"
                            eng-rpm="2700"
                            displacement="4363"
                            compression="7"
                            turbo-mul="1.75"
                            wastegate-mp="52">
                            <control-input control="THROTTLE" axis="/controls/engines/engine[1]/throttle"/>
                            <control-input control="STARTER"  axis="/controls/engines/engine[1]/starter"/>
                            <control-input control="MAGNETOS" axis="/controls/engines/engine[1]/magnetos"/>
                            <control-input control="MIXTURE"  axis="/controls/engines/engine[1]/mixture"/>
                            <control-input control="BOOST"    axis="/controls/engines/engine[1]/boost"/>
             </piston-engine>
  </propeller>

  <!-- Roue Avant -->
  <gear x="7.724" y="0.000" z="-3.544"
        compression="0.3"
        spring="1"
        stiction="1">
        <control-input  control="STEER"  axis="/controls/flight/rudder" square="true" src0="-1.0" src1="1.0" dst0="-0.8" dst1="0.8"/>
        <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>

  <!-- Roue gauche -->
  <gear x="1.272" y="4.152" z="-3.417"
        compression="0.4"
        spring="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="5.1"/>
  </gear>

  <!-- Roue droite -->
  <gear x="1.272" y="-4.152" z="-3.417"
        compression="0.4"
        spring="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="5.2"/>
  </gear>

  <!-- http://books.google.com flight manual for the XF-11 shows 2105 gallons fuel capacity,
       plus two 300 gallong drop tanks.

       Left Outboard  500 US gal
       Left Inboard   490 US gal
       Right Inboard  615 US gal
       Right Outboard 500 US gal

  -->
  <tank x="1.752" y=" 7" z="-0.38" capacity="3000"/>

  <tank x="5.352" y=" 0" z="-1.38" capacity="2940"/>
  <tank x="3.352" y=" 0" z="-1.18" capacity="3690"/>

  <tank x="1.752" y="-7" z="-0.38" capacity="3000"/>

  <!-- Mass distribution
       Dilbert : The cg should be about 1/6 chord ahead of the chord center.
                 4.244 / 6     = 0.707
                 1.742 + 0.707 = 2.449
  -->
  <ballast x="9" y="0" z="-0.9" mass="7116"/>

</airplane>
