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

<!-- Westland Whirlwind   : BARANGER Emmanuel (2012)
                updated   : BARANGER Emmanuel (2013 April)
                updated   : BARANGER Emmanuel (2013 Fevruary)

     Sources              : http://en.wikipedia.org/wiki/Westland_Whirlwind_(fighter)

     Wingspan             :  45 ft 0 in   ( 13.72 m  )
     Length               :  32 ft 3 in   (  9.83 m  )
     Height               :  11 ft 0 in   (  3.35 m  )
     Empty weight         :     8310 lb   (  3777 kg )
     Max takeoff weight   :    11445 lb   (  5191 kg )
     Engine               : 2 x Rolls-Royce Peregrine I liquid-cooled V12 engine ( 885 hp each )
     Max speed            :      580 km/h ( 313 kts  )
-->
<airplane mass="8310" version="YASIM_VERSION_CURRENT" mtow-lbs="11445">

  <approach speed="60" aoa="4" fuel="0.3">
    <control-setting axis="/controls/engines/engine[0]/throttle"        value="0.3"/>
    <control-setting axis="/controls/engines/engine[0]/mixture"         value="1"/>
    <control-setting axis="/controls/engines/engine[0]/boost"           value="0.1"/>
    <control-setting axis="/controls/engines/engine[0]/propeller-pitch" value="1"/>

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

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

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

    <control-setting axis="/controls/engines/engine[1]/throttle"        value="0.7"/>
    <control-setting axis="/controls/engines/engine[1]/mixture"         value="1"/>
    <control-setting axis="/controls/engines/engine[1]/boost"           value="1"/>
    <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="1.10736" y="0" z="0.58"/>

  <!-- Fuselage -->
  <fuselage ax=" 4.315" ay=" 0.000" az="-0.284" bx=" 4.193" by=" 0.000" bz="-0.273" width="0.331" taper="0.30" midpoint="1"/>
  <fuselage ax=" 4.193" ay=" 0.000" az="-0.273" bx=" 3.672" by=" 0.000" bz="-0.249" width="0.716" taper="0.48" midpoint="1"/>
  <fuselage ax=" 3.672" ay=" 0.000" az="-0.249" bx=" 2.933" by=" 0.000" bz="-0.204" width="0.947" taper="0.76" midpoint="1"/>
  <fuselage ax=" 2.933" ay=" 0.000" az="-0.204" bx=" 2.047" by=" 0.000" bz="-0.147" width="1.055" taper="0.90" midpoint="1"/>
  <fuselage ax=" 2.047" ay=" 0.000" az="-0.147" bx="-0.824" by=" 0.000" bz="-0.088" width="1.055" taper="1.00" midpoint="1"/>
  <fuselage ax="-0.824" ay=" 0.000" az="-0.088" bx="-4.191" by=" 0.000" bz=" 0.168" width="1.055" taper="0.30" midpoint="0"/>
  <fuselage ax="-0.824" ay=" 0.000" az="-0.088" bx="-4.191" by=" 0.000" bz="-0.165" width="1.055" taper="0.30" midpoint="0"/>

  <!-- Cockpit -->
  <fuselage ax=" 1.992" ay=" 0.000" az=" 0.205" bx=" 1.516" by=" 0.000" bz=" 0.418" width="0.716" taper="0.48" midpoint="1"/>
  <fuselage ax=" 1.657" ay=" 0.000" az=" 0.385" bx=" 1.128" by=" 0.000" bz=" 0.418" width="0.716" taper="1.00" midpoint="1"/>
  <fuselage ax=" 1.171" ay=" 0.000" az=" 0.418" bx=" 0.085" by=" 0.000" bz=" 0.340" width="0.716" taper="0.20" midpoint="0"/>

  <!-- Left Engine -->
  <fuselage ax=" 4.649" ay=" 1.945" az="-0.777" bx=" 4.127" by=" 1.945" bz="-0.777" width="0.720" taper="0.10" midpoint="1"/>
  <fuselage ax=" 4.127" ay=" 1.945" az="-0.777" bx=" 3.386" by=" 1.945" bz="-0.777" width="0.947" taper="0.76" midpoint="1"/>
  <fuselage ax=" 3.386" ay=" 1.945" az="-0.777" bx=" 2.387" by=" 1.945" bz="-0.777" width="0.947" taper="1.00" midpoint="1"/>
  <fuselage ax=" 2.387" ay=" 1.945" az="-0.777" bx=" 0.532" by=" 1.945" bz="-0.672" width="0.947" taper="0.20" midpoint="0"/>

  <fuselage ax=" 4.127" ay=" 1.945" az="-0.777" bx=" 3.391" by=" 1.945" bz="-0.863" width="0.947" taper="0.76" midpoint="1"/>
  <fuselage ax=" 3.449" ay=" 1.945" az="-0.863" bx=" 2.387" by=" 1.945" bz="-0.863" width="0.947" taper="1.00" midpoint="1"/>
  <fuselage ax=" 2.387" ay=" 1.945" az="-0.863" bx=" 0.532" by=" 1.945" bz="-0.842" width="0.947" taper="0.20" midpoint="0"/>

  <!-- Right Engine -->
  <fuselage ax=" 4.649" ay="-1.945" az="-0.777" bx=" 4.127" by="-1.945" bz="-0.777" width="0.720" taper="0.10" midpoint="1"/>
  <fuselage ax=" 4.127" ay="-1.945" az="-0.777" bx=" 3.386" by="-1.945" bz="-0.777" width="0.947" taper="0.76" midpoint="1"/>
  <fuselage ax=" 3.386" ay="-1.945" az="-0.777" bx=" 2.387" by="-1.945" bz="-0.777" width="0.947" taper="1.00" midpoint="1"/>
  <fuselage ax=" 2.387" ay="-1.945" az="-0.777" bx=" 0.532" by="-1.945" bz="-0.672" width="0.947" taper="0.20" midpoint="0"/>

  <fuselage ax=" 4.127" ay="-1.945" az="-0.777" bx=" 3.391" by="-1.945" bz="-0.863" width="0.947" taper="0.76" midpoint="1"/>
  <fuselage ax=" 3.449" ay="-1.945" az="-0.863" bx=" 2.387" by="-1.945" bz="-0.863" width="0.947" taper="1.00" midpoint="1"/>
  <fuselage ax=" 2.387" ay="-1.945" az="-0.863" bx=" 0.532" by="-1.945" bz="-0.842" width="0.947" taper="0.20" midpoint="0"/>

  <wing x="1.97816" y="0" z="-0.45796"
        chord="1.900"
        length="6.883"
        taper="0.45"
        sweep="-2"
        dihedral="2"
        camber="0.005">
        <stall   aoa="20" width="1"    peak="1.5"/>
        <flap0 start="0.08" end="0.52" lift="1.5" drag="2.0"/>
        <flap1 start="0.54" end="0.94" lift="1.2" drag="1.1"/>

        <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" side="left"  prop="/surface-positions/left-aileron-pos-norm"/>
        <control-output control="FLAP1" side="right" prop="/surface-positions/right-aileron-pos-norm"/>

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

  <hstab x="-4.05484" y="0" z="1.39904"
         chord="1.320"
         length="2.402"
         taper="0.80">
         <stall   aoa="18" width="1" peak="1.2"/>
         <flap0 start="0"    end="1" lift="1.4" 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="-3.87745" y="0" z="-0.31018"
         chord="1.709"
         length="2.54"
         taper="0.60"
         sweep="5">
         <stall aoa="16" width="1" peak="1.2"/>
         <flap0 start="0"  end="1" lift="1.4" 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>

  <!-- Engines   source            : http://en.wikipedia.org/wiki/Rolls-Royce_Peregrine

                 name              : Rolls-Royce Peregrine
                 type              : 12-cylinder supercharged liquid-cooled 60-degree Vee aircraft piston engine
                 power cruise      : 885 hp at 3000 rpm, +9 psi boost
                 weight            : 1140 lb ( 517 kg )
                 compression       : 6:1
                 Displacement      : 1296 in cub (21.2 L)
  -->
  <!-- Moteur gauche -->
  <propeller x="3.8" y="1.94571" z="-0.79675"
             mass="1140"
             moment="20"
             radius="1.5365"
             cruise-power="800"
             cruise-speed="300"
             cruise-rpm="3000"
             cruise-alt="19000">
             <actionpt x="4.23493" y="1.94571" z="-0.77724"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[0]/propeller-pitch"/>
             <piston-engine eng-rpm="3400"
                            eng-power="885"
                            displacement="1296"
                            compression="6">
                            <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>

  <!-- Moteur droit -->
  <propeller x="3.8" y="-1.94571" z="-0.79675"
             mass="1140"
             moment="-20"
             radius="1.5365"
             cruise-power="800"
             cruise-speed="300"
             cruise-rpm="3000"
             cruise-alt="19000">
             <actionpt x="4.23493" y="-1.94571" z="-0.77724"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[1]/propeller-pitch"/>
             <piston-engine eng-rpm="3400"
                            eng-power="885"
                            displacement="1296"
                            compression="6">
                            <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>

  <gear x="2.67608" y="1.93905" z="-2.46862"
        compression="0.4"
        spring="1.8"
        damp="0.03"
        on-solid="1" >
        <control-input  control="BRAKE"  axis="/controls/gear/brake-parking"/>
        <control-input  control="BRAKE"  axis="/controls/gear/brake-left"/>
        <control-input  control="EXTEND" axis="/controls/gear/gear-down"/>

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

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

  <gear x="2.67608" y="-1.93905" z="-2.46862"
        compression="0.4"
        spring="1.8"
        damp="0.03"
        on-solid="1" >
        <control-input  control="BRAKE"  axis="/controls/gear/brake-parking"/>
        <control-input  control="BRAKE"  axis="/controls/gear/brake-right"/>
        <control-input  control="EXTEND" axis="/controls/gear/gear-down"/>

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

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

  <!-- Tail wheel -->
  <gear x="-3.43357" y="0" z="-0.79654"
        compression="0.15"
        spring="0.8"
        on-solid="1"
        sfric="1"
        dfric="1">
        <control-input  control="STEER"  axis="/controls/flight/rudder" 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[2]/position-norm"/>

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

  <tank x="2.5" y=" 2" z="-0.5" capacity="1200"/>
  <tank x="2.0" y=" 0" z="-0.5" capacity=" 600"/>
  <tank x="2.5" y="-2" z="-0.5" capacity="1200"/>

</airplane>
