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

<!-- FW 189 Uhu    : BARANGER Emmanuel (08/2022)

     Sources       : https://www.wikiwand.com/en/Focke-Wulf_Fw_189_Uhu

     Wingspan      :  18.4 m           ( 60.00 ft  4 in )
     Length        :  11.9 m           ( 39.00 ft  1 in )
     Height        :   3.1 m           ( 10.00 ft  2 in )
     Empty weight  :  2690 kg          (  5930 lb       )
     Gross weight  :  3950 kg          (  8708 lb       )
     Engines       : 2 Argus As 410A-1 V-12 inverted air-cooled piston engines ( 459 hp each )
     Maximum speed :   344 km/h        (   186 kn       ) at 2500 m ( 8202 ft )
     Cruise speed  :   317 km/h        (   171 kn       )
     Landing speed :   120 km/h        (    65 kn       )
-->
<airplane mass="5930" version="YASIM_VERSION_CURRENT" mtow-lbs="8708">

  <approach speed="65" 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="171" 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="1.791" y="0.3" z="1.023"/>

  <!-- Fuselage -->
  <fuselage ax=" 3.290" ay=" 0.000" az=" 0.586" bx=" 2.995" by=" 0.000" bz=" 0.586" width="1.183" taper="0.60" midpoint="1"/>
  <fuselage ax=" 2.995" ay=" 0.000" az=" 0.586" bx=" 2.133" by=" 0.000" bz=" 0.683" width="1.373" taper="0.86" midpoint="1"/>
  <fuselage ax=" 2.133" ay=" 0.000" az=" 0.683" bx=" 0.621" by=" 0.000" bz=" 0.683" width="1.373" taper="1.00" midpoint="1"/>
  <fuselage ax=" 0.621" ay=" 0.000" az=" 0.683" bx="-0.299" by=" 0.000" bz=" 0.683" width="1.373" taper="0.80" midpoint="0"/>
  <fuselage ax="-0.299" ay=" 0.000" az=" 0.683" bx="-1.515" by=" 0.000" bz=" 0.683" width="1.098" taper="0.74" midpoint="0"/>
  <fuselage ax="-1.515" ay=" 0.000" az=" 0.683" bx="-2.773" by=" 0.000" bz=" 0.625" width="0.812" taper="0.10" midpoint="0"/>

  <!-- Cockpit -->
  <fuselage ax=" 2.599" ay=" 0.000" az=" 0.601" bx=" 1.822" by=" 0.000" bz=" 0.988" width="1.373" taper="0.86" midpoint="1"/>
  <fuselage ax=" 2.134" ay=" 0.000" az=" 0.920" bx=" 1.129" by=" 0.000" bz=" 0.920" width="1.373" taper="1.00" midpoint="1"/>
  <fuselage ax=" 1.432" ay=" 0.000" az=" 0.988" bx=" 0.655" by=" 0.000" bz=" 0.601" width="1.373" taper="0.86" midpoint="0"/>

  <!-- Engine left -->
  <fuselage ax=" 3.487" ay=" 2.143" az=" 0.183" bx=" 3.198" by=" 2.143" bz=" 0.183" width="0.770" taper="0.70" midpoint="1"/>
  <fuselage ax=" 3.198" ay=" 2.143" az=" 0.183" bx=" 1.770" by=" 2.143" bz=" 0.183" width="0.770" taper="1.00" midpoint="1"/>
  <fuselage ax=" 1.770" ay=" 2.143" az=" 0.183" bx="-3.690" by=" 2.143" bz=" 0.183" width="0.770" taper="0.80" midpoint="0"/>
  <fuselage ax="-3.690" ay=" 2.143" az=" 0.183" bx="-6.871" by=" 2.143" bz=" 0.183" width="0.610" taper="0.20" midpoint="0"/>

  <fuselage ax=" 3.487" ay=" 2.143" az="-0.042" bx=" 3.198" by=" 2.143" bz="-0.042" width="0.770" taper="0.70" midpoint="1"/>
  <fuselage ax=" 3.198" ay=" 2.143" az="-0.042" bx=" 1.770" by=" 2.143" bz="-0.042" width="0.770" taper="1.00" midpoint="1"/>
  <fuselage ax=" 1.770" ay=" 2.143" az="-0.042" bx="-3.690" by=" 2.143" bz=" 0.183" width="0.770" taper="0.80" midpoint="0"/>

  <!-- Engine right -->
  <fuselage ax=" 3.487" ay="-2.143" az=" 0.183" bx=" 3.198" by="-2.143" bz=" 0.183" width="0.770" taper="0.70" midpoint="1"/>
  <fuselage ax=" 3.198" ay="-2.143" az=" 0.183" bx=" 1.770" by="-2.143" bz=" 0.183" width="0.770" taper="1.00" midpoint="1"/>
  <fuselage ax=" 1.770" ay="-2.143" az=" 0.183" bx="-3.690" by="-2.143" bz=" 0.183" width="0.770" taper="0.80" midpoint="0"/>
  <fuselage ax="-3.690" ay="-2.143" az=" 0.183" bx="-6.871" by="-2.143" bz=" 0.183" width="0.610" taper="0.20" midpoint="0"/>

  <fuselage ax=" 3.487" ay="-2.143" az="-0.042" bx=" 3.198" by="-2.143" bz="-0.042" width="0.770" taper="0.70" midpoint="1"/>
  <fuselage ax=" 3.198" ay="-2.143" az="-0.042" bx=" 1.770" by="-2.143" bz="-0.042" width="0.770" taper="1.00" midpoint="1"/>
  <fuselage ax=" 1.770" ay="-2.143" az="-0.042" bx="-3.690" by="-2.143" bz=" 0.183" width="0.770" taper="0.80" midpoint="0"/>

  <!-- Wing -->
  <wing x="0.511" y="0" z="0.362"
        chord="2.812"
        length="2.139"
        taper="1"
        camber="0.003">
        <stall   aoa="20" width="1"   peak="1.5"/>
        <flap0 start="0"    end="0.8" 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="0.511" y="2.139" z="0.362"
        append="1"
        chord="2.812"
        length="7.150"
        taper="0.3"
        dihedral="5"
        sweep="8"
        camber="0.005">
        <stall   aoa="20" width="1"    peak="1.5"/>
        <flap0 start="0.07" end="0.40" lift="1.2" drag="2.2"/>
        <flap1 start="0.40" end="0.90" 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="-7.072" y="0" z="0.698"
         chord="1.44"
         length="2.141"
         taper="1">
         <stall   aoa="18" width="1"    peak="1.5"/>
         <flap0 start="0"    end="0.85" 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="-7.258" y="2.146" z="0.117"
         chord="1.497"
         length="1.707"
         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="-7.258" y="-2.146" z="0.117"
         chord="1.497"
         length="1.707"
         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://www.wikiwand.com/en/Argus_As_410A-1

                 name              : Argus As 410
                 type              : 12-cylinder air-cooled inverted V engine
                 power             : 459 hp for takeoff at 3100 rpm (1 minute) at sea level
                                   : 350 hp at 2820 rpm (  5 minutes ) at sea level
                                   : 325 hp at 2820 rpm ( 30 minutes ) at sea level
                                   : 311 hp at 2820 rpm ( max. continuous / cruise ) at sea level
                 weight            : 315 kg ( 694 lb ) dry, unequipped
                                   : 336 kg ( 741 lb ) wet, equipped
                 compression       : 6.4:1
                 Displacement      : 11.949 l ( 729.2 in3 )
  -->
  <!-- Left  -->
  <propeller x="2.815" y="2.143" z="0.183"
             mass="694"
             radius="1.30"
             moment="2.5"
             cruise-alt="13000"
             cruise-power="311"
             cruise-speed="171"
             cruise-rpm="2820"
             min-rpm="250"
             max-rpm="3100"
             contra="1">
             <actionpt x="3.675" y="2.143" z="0.261"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[0]/propeller-pitch"/>
             <piston-engine eng-power="459"
                            eng-rpm="3100"
                            displacement="729.2"
                            compression="6.4">
                            <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="2.815" y="-2.143" z="0.183"
             mass="694"
             radius="1.30"
             moment="2.5"
             cruise-alt="13000"
             cruise-power="311"
             cruise-speed="171"
             cruise-rpm="2820"
             min-rpm="250"
             max-rpm="3100"
             contra="1">
             <actionpt x="3.675" y="-2.143" z="0.261"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[1]/propeller-pitch"/>
             <piston-engine eng-power="459"
                            eng-rpm="3100"
                            displacement="729.2"
                            compression="6.4">
                            <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="1.628" y="2.150" z="-1.933"
        compression="0.3"
        spring="0.85"
        damp="1.4"
        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[0]/position-norm"/>

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

  <!-- Right wheel 1 -->
  <gear x="1.628" y="-2.150" z="-1.933"
        compression="0.3"
        spring="0.85"
        damp="1.4"
        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[1]/position-norm"/>

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

  <!-- Rear wheel 2 -->
  <gear x="-6.867" y="0" z="-0.457"
        compression="0.1"
        spring="0.8"
        damp="2"
        stiction="1">
        <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="0.54" y=" 1.65" z="0.35" capacity="2000"/>
  <tank x="0.54" y="-1.65" z="0.35" capacity="2000"/>

  <!-- Mass distribution
       Dilbert : The cg should be about 1/6 chord ahead of the chord center.
                 2.812 / 6     = 0.468
                 0.511 + 0.510 = 0.979
  -->
  <ballast x="3.2" y="0" z="0.6" mass="1318"/>

</airplane>
