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

<!-- Fokker T5     : BARANGER Emmanuel (01/2020)
           Updated : BARANGER Emmanuel (07/2022)

     Sources       : https://en.wikipedia.org/wiki/Fokker_T.V

     Wingspan      : 21.00 m           ( 68.00 ft 11 in )
     Length        : 16.00 m           ( 52.00 ft  6 in )
     Height        :  4.20 m           ( 13.00 ft  9 in )
     Empty weight  :  4650 kg          ( 10251 lb       )
     Max weight    :  7650 kg          ( 16865 lb       )
     Enginesr      : 2 Bristol Pegasus XXVI 9-cylinder air-cooled radial piston engines, (930 hp each)
     Maximum speed :   417 km/h        (   225 kn       )
     Cruise speed  :   335 km/h        (   181 kn       )
-->
<airplane mass="10251" version="YASIM_VERSION_CURRENT" mtow-lbs="16865">

  <approach speed="80" aoa="3" fuel="0.3">
    <control-setting axis="/controls/engines/engine[0]/throttle"        value="0.2"/>
    <control-setting axis="/controls/engines/engine[0]/mixture"         value="1"/>
    <control-setting axis="/controls/engines/engine[0]/propeller-pitch" value="0.77"/>

    <control-setting axis="/controls/engines/engine[1]/throttle"        value="0.2"/>
    <control-setting axis="/controls/engines/engine[1]/mixture"         value="1"/>
    <control-setting axis="/controls/engines/engine[1]/propeller-pitch" value="0.77"/>

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

  <cruise speed="181" alt="15000" fuel="0.7">
    <control-setting axis="/controls/engines/engine[0]/throttle"        value="0.8"/>
    <control-setting axis="/controls/engines/engine[0]/mixture"         value="0.8"/>
    <control-setting axis="/controls/engines/engine[0]/propeller-pitch" value="1"/>

    <control-setting axis="/controls/engines/engine[1]/throttle"        value="0.8"/>
    <control-setting axis="/controls/engines/engine[1]/mixture"         value="0.8"/>
    <control-setting axis="/controls/engines/engine[1]/propeller-pitch" value="1"/>

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

  <cockpit x="5.271" y="0.3" z="1.023"/>

  <!-- Fuselage -->
  <fuselage ax=" 7.997" ay=" 0.000" az="-0.417" bx=" 7.702" by=" 0.000" bz="-0.417" width="1.183" taper="0.60" midpoint="1"/>
  <fuselage ax=" 7.702" ay=" 0.000" az="-0.417" bx=" 6.299" by=" 0.000" bz="-0.354" width="1.387" taper="0.85" midpoint="1"/>
  <fuselage ax=" 6.299" ay=" 0.000" az="-0.417" bx=" 0.000" by=" 0.000" bz="-0.417" width="1.387" taper="1.00" midpoint="1"/>
  <fuselage ax=" 0.000" ay=" 0.000" az="-0.417" bx="-4.386" by=" 0.000" bz=" 0.088" width="1.387" taper="1.00" midpoint="1"/>
  <fuselage ax="-4.386" ay=" 0.000" az=" 0.088" bx="-6.477" by=" 0.000" bz=" 0.426" width="1.387" taper="0.70" midpoint="0"/>
  <fuselage ax="-6.477" ay=" 0.000" az=" 0.426" bx="-7.986" by=" 0.000" bz=" 0.657" width="0.971" taper="0.10" midpoint="0"/>

  <fuselage ax=" 7.997" ay=" 0.000" az=" 0.211" bx=" 7.702" by=" 0.000" bz=" 0.211" width="1.183" taper="0.60" midpoint="1"/>
  <fuselage ax=" 7.702" ay=" 0.000" az=" 0.211" bx=" 6.299" by=" 0.000" bz=" 0.144" width="1.387" taper="0.85" midpoint="1"/>
  <fuselage ax=" 6.299" ay=" 0.000" az=" 0.144" bx=" 0.000" by=" 0.000" bz=" 0.144" width="1.387" taper="1.00" midpoint="1"/>
  <fuselage ax=" 0.000" ay=" 0.000" az=" 0.144" bx="-4.386" by=" 0.000" bz=" 0.592" width="1.387" taper="1.00" midpoint="1"/>
  <fuselage ax="-4.386" ay=" 0.000" az=" 0.592" bx="-6.477" by=" 0.000" bz=" 0.725" width="1.387" taper="0.70" midpoint="0"/>
  <fuselage ax="-6.477" ay=" 0.000" az=" 0.725" bx="-7.986" by=" 0.000" bz=" 0.657" width="0.971" taper="0.10" midpoint="0"/>

  <!-- cockpit -->
  <fuselage ax=" 6.265" ay=" 0.000" az=" 0.590" bx=" 5.484" by=" 0.000" bz=" 0.950" width="0.74" taper="0.6" midpoint="1"/>
  <fuselage ax=" 5.484" ay=" 0.000" az=" 0.950" bx="-4.365" by=" 0.000" bz=" 0.898" width="0.74" taper="1.0" midpoint="1"/>

  <!-- Engine left -->
  <fuselage ax=" 5.879" ay=" 2.649" az="-0.239" bx=" 5.787" by=" 2.649" bz="-0.239" width="1.51" taper="0.7" midpoint="1"/>
  <fuselage ax=" 5.787" ay=" 2.649" az="-0.239" bx=" 5.016" by=" 2.649" bz="-0.239" width="1.51" taper="1.0" midpoint="1"/>
  <fuselage ax=" 5.016" ay=" 2.649" az="-0.239" bx=" 2.069" by=" 2.649" bz="-0.239" width="1.51" taper="0.8" midpoint="0"/>
  <fuselage ax=" 2.069" ay=" 2.649" az="-0.239" bx=" 0.352" by=" 2.649" bz="-0.239" width="1.20" taper="0.2" midpoint="0"/>

  <!-- Engine right -->
  <fuselage ax=" 5.879" ay="-2.649" az="-0.239" bx=" 5.787" by="-2.649" bz="-0.239" width="1.51" taper="0.7" midpoint="1"/>
  <fuselage ax=" 5.787" ay="-2.649" az="-0.239" bx=" 5.016" by="-2.649" bz="-0.239" width="1.51" taper="1.0" midpoint="1"/>
  <fuselage ax=" 5.016" ay="-2.649" az="-0.239" bx=" 2.069" by="-2.649" bz="-0.239" width="1.51" taper="0.8" midpoint="0"/>
  <fuselage ax=" 2.069" ay="-2.649" az="-0.239" bx=" 0.352" by="-2.649" bz="-0.239" width="1.20" taper="0.2" midpoint="0"/>

  <!-- Wing -->
  <wing x="2.319" y="0" z="-0.085"
        chord="4.025"
        length="3.186"
        taper="1"
        camber="0.001">
        <stall   aoa="20" width="1" peak="3"/>
        <flap0 start="0.23" end="1" lift="1.2" drag="2.2"/>

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

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

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

  <wing x="2.319" y="3.186" z="-0.085"
        append="1"
        chord="4.025"
        length="7.430"
        taper="0.5"
        dihedral="6"
        sweep="2"
        camber="0.001">
        <stall   aoa="20" width="1"    peak="3"/>
        <flap0 start="0.00" end="0.42" lift="1.2" drag="2.2"/>
        <flap1 start="0.42" end="0.89" lift="1.4" drag="1.2"/>

        <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-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-speed  control="FLAP0" transition-time="5"/>
  </wing>

  <!-- Elevator -->
  <hstab x="-5.658" y="0" z="1.193"
         chord="2.070"
         length="3.217"
         taper="0.8"
         sweep="4">
         <stall   aoa="18" width="1"    peak="1.1"/>
         <flap0 start="0.21" end="0.89" lift="1.4" 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>

  <!-- Ruder -->
  <vstab x="-6.001" y="3.240" z="0.117"
         chord="1.497"
         length="1.909"
         taper="0.7">
         <stall   aoa="16" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.4" 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>

  <vstab x="-6.001" y="-3.240" z="0.117"
         chord="1.497"
         length="1.909"
         taper="0.7">
         <stall   aoa="16" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.4" 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://en.wikipedia.org/wiki/Bristol_Pegasus

                 name              : Bristol Pegasus
                 type              : 9-cylinder, single-row, supercharged, air-cooled radial engine
                 power             : 965 hp  at 2475 rpm for takeoff at sea level
                                   : 835 hp  at 2250 rpm at 8500 ft (2590 m), maximum continuous climb power
                 weight            : 966 lb   ( 438 kg )
                 compression       : 6.25:1
                 Displacement      : 1753 in3 ( 28.7 L )
  -->
  <!-- Left  -->
  <propeller x="4.423" y="2.649" z="-0.239"
             mass="966"
             radius="1.566"
             moment="2.5"
             cruise-alt="15000"
             cruise-power="590"
             cruise-speed="200"
             cruise-rpm="2750"
             min-rpm="250"
             max-rpm="2750"
             contra="1">
             <actionpt x="6.185" y="2.649" z="-0.239"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[0]/propeller-pitch"/>
             <piston-engine eng-power="636"
                            eng-rpm="2750"
                            displacement="1519"
                            compression="6.1">
                            <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"/>
             </piston-engine>
  </propeller>

  <!-- Right-->
  <propeller x="4.423" y="-2.649" z="-0.239"
             mass="966"
             radius="1.566"
             moment="2.5"
             cruise-alt="15000"
             cruise-power="590"
             cruise-speed="200"
             cruise-rpm="2750"
             min-rpm="250"
             max-rpm="2750"
             contra="1">
             <actionpt x="6.185" y="-2.649" z="-0.239"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[1]/propeller-pitch"/>
             <piston-engine eng-power="636"
                            eng-rpm="2750"
                            displacement="1519"
                            compression="6.1">
                            <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"/>
             </piston-engine>
  </propeller>

  <!-- Left wheel 0 -->
  <gear x="4.09844" y="2.62925" z="-2.64304"
        compression="0.3"
        retract-time="5"
        spring="0.8"
        damp="4.2"
        sfric="0.6"
        dfric="0.8">
        <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[0]/position-norm"/>

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

  <!-- Right wheel 1 -->
  <gear x="4.09844" y="-2.62925" z="-2.64304"
        compression="0.3"
        retract-time="5"
        spring="0.8"
        damp="4.2"
        sfric="0.6"
        dfric="0.8">
        <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[1]/position-norm"/>

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

  <!-- Rear wheel 2 -->
  <gear x="-6.00731" y="0" z="-0.82557"
        compression="0.1"
        sfric="0.3"
        dfric="0.5">
  </gear>

  <tank x="3.14" y=" 3.65" z="-0.019" capacity="2000"/>
  <tank x="3.14" y="-3.65" z="-0.019" capacity="2000"/>

  <!-- Mass distribution
       Dilbert : The cg should be about 1/6 chord ahead of the chord center.
                 4.025 / 6     = 0.670
                 2.319 + 0.510 = 2.989
  -->
  <ballast x="7.2" y="0" z="-0.7" mass="1822"/>

</airplane>
