<?xml version="1.0" encoding="UTF-8"?>

<!-- Douglas X3 yasim config -->
<!-- Correction par AJ merci à lui -->

<!-- Masse a vide : 7310 kg -->
<airplane mass="16120">

  <!-- Approach configuration -->
  <approach speed="200" aoa="8" fuel="0.2">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.5"/>
    <control-setting axis="/controls/engines/engine[1]/throttle" value="0.5"/>
    <control-setting axis="/controls/flight/flaps" value="1.0"/>
    <control-setting axis="/controls/gear/gear-down" value="1"/>
  </approach>

  <!-- Cruise configuration -->
  <cruise speed="700" alt="30000" fuel="0.8">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.7"/>
    <control-setting axis="/controls/engines/engine[1]/throttle" value="0.7"/>
    <control-setting axis="/controls/flight/flaps" value="0.0"/>
    <control-setting axis="/controls/gear/gear-down" value="0"/>
  </cruise>

  <cockpit x="2.545" y="0.0" z="0.046"/>

  <fuselage ax="9.396" ay="0" az="-0.482" bx="-10.168" by="0" bz="0.312" width="2" taper="0.15" midpoint="0.5"/>

  <wing x="-2.837" y="0.956" z="-0.695" 
        length="2.472" 
        taper="0.46" 
        incidence="0.0" 
        chord="2.730" 
        sweep="10" 
        dihedral="0.0" 
        camber="0.2">
        <stall aoa="20" width="3" peak="1.3"/>
        <flap0 start="0" end="0.6" lift="1.5" drag="1.3"/>
        <flap1 start="0.6" end="1.00" lift="1.3" drag="1.3"/>

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

        <control-output control="FLAP0" side="left" prop="/surface-positions/left-flap-pos-norm"/>
        <control-output control="FLAP0" side="right" prop="/surface-positions/right-flap-pos-norm"/>
        <control-output control="FLAP0" prop="/surface-positions/flap-pos-norm"/>

        <control-output control="FLAP1" side="left" prop="/surface-positions/left-aileron-pos-norm"/>
        <control-output control="FLAP1" side="right" prop="/surface-positions/right-aileron-pos-norm"/>
        <control-output control="FLAP1" prop="/surface-positions/aileron-pos-norm"/>

        <control-speed control="FLAP0" transition-time="10"/>
        <control-speed control="FLAP1" transition-time="0.5"/>

  </wing>

  <hstab x="-8.673" y="0.232" z="0.269" 
         taper="0.44" 
         length="1.900" 
         chord="1.325" 
         sweep="10" 
         effectiveness="2.5"
         dihedral="0.0" 
         camber="0">
         <stall aoa="25" width="4" peak="1.3"/>
         <flap0 start="0" end="1" lift="1.35" drag="1.3"/>
         <control-input axis="/controls/flight/elevator" control="FLAP0" square="false"/>
         <control-input axis="/controls/flight/elevator-trim" control="FLAP0"/>

         <control-output control="FLAP0" side="left" prop="surface-positions/left-elevator-pos-norm"/>
         <control-output control="FLAP0" side="right" prop="surface-positions/right-elevator-pos-norm"/>
         <control-output control="FLAP0" prop="surface-positions/elevator-pos-norm"/>

         <control-speed control="FLAP0" transition-time="1"/>
  </hstab>

  <vstab x="-9.063" y="0" z="0.517" 
         taper="0.4" 
         length="1.6" 
         chord="1.380" 
         effectiveness="9"
         sweep="30">
         <stall aoa="16" width="5" peak="1.5"/>
         <flap0 start="0" end="0.64" lift="1.25" drag="1.2"/>

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

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

         <control-speed control="FLAP0" transition-time="1"/>
  </vstab>
 
  <!-- 2 x Westinghouse J-34s 3370 lbs -> PC 4900 lbs-->
  <jet x="-2.162" y="0.420" z="-0.370" 
       mass="2118" 
       thrust="3370" 
       afterburner="4900">
       <actionpt x="-6.105" y="0.420" z="-0.513"/>
       <control-input axis="/controls/engines/engine[0]/throttle" control="THROTTLE"/>
       <control-input axis="/controls/engines/engine[0]/throttle" src0="0.88" dst0="0.0" src1="1.0" dst1="1.0" control="REHEAT"/>

       <control-output control="REHEAT" prop="engines/engine[0]/afterburner"/>
  </jet>

  <jet x="-2.162" y="-0.420" z="-0.370" 
       mass="2118" 
       thrust="3370" 
       afterburner="4900">
       <actionpt x="-6.105" y="-0.420" z="-0.513"/>
       <control-input axis="/controls/engines/engine[1]/throttle" control="THROTTLE"/>
       <control-input axis="/controls/engines/engine[1]/throttle" src0="0.88" dst0="0.0" src1="1.0" dst1="1.0" control="REHEAT"/>

       <control-output control="REHEAT" prop="engines/engine[1]/afterburner"/>
  </jet>

  <!-- nose -->
  <gear x="3.748" y="0.000" z="-1.940"
        retract-time="7"
        compression="0.44"
        spring="1.1"
        damp="1.4">
        <control-input axis="/controls/flight/rudder" control="STEER" square="false"/>
        <control-input axis="/controls/gear/gear-down" control="EXTEND"/>

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

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

  <!-- left main -->
  <gear x="-2.186" y="0.937" z="-1.940"
        retract-time="7"
        compression="0.72"
        spring="0.85" damp="2">
        <control-input axis="/controls/gear/brake-left" control="BRAKE"/>
        <control-input axis="/controls/gear/brake-parking" control="BRAKE"/>
        <control-input axis="/controls/gear/gear-down" control="EXTEND"/>

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

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

  <!-- right main -->
  <gear x="-2.186" y="-0.937" z="-1.940"
        retract-time="7"
        compression="0.72"
        spring="0.85"
        damp="2">
        <control-input axis="/controls/gear/brake-right" control="BRAKE"/>
        <control-input axis="/controls/gear/brake-parking" control="BRAKE"/>
        <control-input axis="/controls/gear/gear-down" control="EXTEND"/>

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

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

  <!-- tank x="0" y="0" z="0" capacity="0"/ -->
  <tank x="2.8" y="0.0" z="0.0" jet="true" capacity="6922"/>

  <!-- Pilote -->
  <weight x="2.545" y="0.0" z="0.0" size="0.18" mass-prop="sim/weight[0]/weight-lb"/>

  <!-- CG middle of chord x=-2.839 y=0.0 z=-0.692
  <ballast x="-20" y="0" z="-8.88" mass="1000"/ -->

</airplane>
