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

<!-- DH 91 Albatros Emmanuel BARANGER/Pierre GEOFFROY (   2008)
            Updated Emmanuel BARANGER                 (   2014)
     Total revision Emmanuel BARANGER                 (06/2021)
            Updated Emmanuel BARANGER                 (12/2023)
            Updated Emmanuel BARANGER                 (07/2024)

     sources            : https://www.wikiwand.com/en/De_Havilland_Albatross

     Wingspan           : 32.00 m                     (   104 ft 12 in   )
     Lenght             : 21.79 m                     (    71 ft  6 in   )
     Height             :  6.78 m                     (    22 ft  3 in   )
     Weight             :  9662 kg                    ( 21300 lb         )
     Max takeoff weight : 13381 kg                    ( 29500 lb         )
     Engines            : 4 De Havilland Gipsy 12 pistons ( 525 hp each )at 2600 rpm
     Speed max          : 362 km/h                    (   196 kn         )
     Speed cruise       : 340 km/h                    (   180 kn         ) with 77% power at 11000 ft ( 3353 m )
                          311 km/h                    (   168 kn         ) with 65% power at 11000 ft ( 3353 m )
                          322 km/h                    (   174 kn         ) with 65% power at 15000 ft ( 4572 m )
     Ceilling           : 5700 m                      ( 18700 ft         )
     Fuel capacity      :  528 US gal ( 2000 l ) in two under-belly tanks
-->
<airplane mass="21300" version="YASIM_VERSION_CURRENT" mtow-kg="29500">

  <approach speed="75" aoa="4" fuel="0.2">
    <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="1"/>

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

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

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

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

  <cruise speed="180" alt="11000" fuel="0.8">
    <control-setting axis="/controls/engines/engine[0]/throttle"        value="0.77"/>
    <control-setting axis="/controls/engines/engine[0]/mixture"         value="0.8"/>
    <control-setting axis="/controls/engines/engine[0]/propeller-pitch" value="0.5"/>

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

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

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

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

  <cockpit x="8.624" y="0.538" z="1.174"/>

  <!-- Fuselage -->
  <!-- Noze -->
  <fuselage ax=" 10.888" ay=" 0.000" az=" 0.283" bx=" 10.601" by=" 0.000" bz=" 0.283" width="0.709" taper="0.10" midpoint="1"/>
  <fuselage ax=" 10.601" ay=" 0.000" az=" 0.283" bx=" 10.091" by=" 0.000" bz=" 0.304" width="1.275" taper="0.55" midpoint="1"/>
  <!-- Left -->
  <fuselage ax=" 10.091" ay=" 0.000" az=" 0.304" bx="  9.323" by=" 0.094" bz=" 0.304" width="1.739" taper="0.72" midpoint="1"/>
  <fuselage ax="  9.323" ay=" 0.094" az=" 0.304" bx="  7.929" by=" 0.150" bz=" 0.304" width="2.201" taper="0.80" midpoint="1"/>
  <fuselage ax="  7.929" ay=" 0.150" az=" 0.304" bx="  5.907" by=" 0.214" bz=" 0.221" width="2.427" taper="0.90" midpoint="1"/>
  <fuselage ax="  5.907" ay=" 0.214" az=" 0.221" bx="  0.394" by=" 0.214" bz=" 0.221" width="2.427" taper="1.00" midpoint="1"/>
  <fuselage ax="  0.394" ay=" 0.214" az=" 0.221" bx=" -2.959" by=" 0.000" bz=" 0.450" width="2.427" taper="0.84" midpoint="0"/>
  <!-- Right -->
  <fuselage ax=" 10.091" ay=" 0.000" az=" 0.304" bx="  9.323" by="-0.094" bz=" 0.304" width="1.739" taper="0.72" midpoint="1"/>
  <fuselage ax="  9.323" ay="-0.094" az=" 0.304" bx="  7.929" by="-0.150" bz=" 0.304" width="2.201" taper="0.80" midpoint="1"/>
  <fuselage ax="  7.929" ay="-0.150" az=" 0.304" bx="  5.907" by="-0.214" bz=" 0.221" width="2.427" taper="0.90" midpoint="1"/>
  <fuselage ax="  5.907" ay="-0.214" az=" 0.221" bx="  0.394" by="-0.214" bz=" 0.221" width="2.427" taper="1.00" midpoint="1"/>
  <fuselage ax="  0.394" ay="-0.214" az=" 0.221" bx=" -2.959" by=" 0.000" bz=" 0.450" width="2.427" taper="0.84" midpoint="0"/>
  <!-- Tail -->
  <fuselage ax=" -2.959" ay=" 0.000" az=" 0.450" bx=" -6.551" by=" 0.000" bz=" 0.398" width="2.035" taper="0.70" midpoint="0"/>
  <fuselage ax=" -6.551" ay=" 0.000" az=" 0.398" bx=" -9.543" by=" 0.000" bz=" 0.303" width="1.425" taper="0.52" midpoint="0"/>
  <fuselage ax=" -9.543" ay=" 0.000" az=" 0.303" bx="-10.520" by=" 0.000" bz=" 0.268" width="0.741" taper="0.60" midpoint="0"/>
  <fuselage ax="-10.520" ay=" 0.000" az=" 0.268" bx="-10.894" by=" 0.000" bz=" 0.268" width="0.445" taper="0.10" midpoint="0"/>
  <!-- Leftg up -->
  <fuselage ax="  9.365" ay=" 0.094" az=" 0.728" bx="  8.903" by=" 0.094" bz=" 0.752" width="1.845" taper="0.40" midpoint="1"/>
  <fuselage ax="  8.903" ay=" 0.094" az=" 0.728" bx="  7.847" by=" 0.150" bz=" 0.784" width="2.200" taper="0.84" midpoint="1"/>
  <fuselage ax="  7.929" ay=" 0.150" az=" 0.784" bx="  5.813" by=" 0.214" bz=" 0.879" width="2.427" taper="0.90" midpoint="1"/>
  <fuselage ax="  5.907" ay=" 0.214" az=" 0.886" bx="  0.394" by=" 0.214" bz=" 0.672" width="2.427" taper="1.00" midpoint="1"/>
  <fuselage ax="  0.394" ay=" 0.214" az=" 0.672" bx=" -2.959" by=" 0.000" bz=" 0.450" width="2.427" taper="0.84" midpoint="0"/>
  <!-- Right up -->
  <fuselage ax="  9.365" ay="-0.094" az=" 0.728" bx="  8.903" by="-0.094" bz=" 0.752" width="1.845" taper="0.40" midpoint="1"/>
  <fuselage ax="  8.903" ay="-0.094" az=" 0.728" bx="  7.847" by="-0.150" bz=" 0.784" width="2.200" taper="0.84" midpoint="1"/>
  <fuselage ax="  7.929" ay="-0.150" az=" 0.784" bx="  5.813" by="-0.214" bz=" 0.879" width="2.427" taper="0.90" midpoint="1"/>
  <fuselage ax="  5.907" ay="-0.214" az=" 0.886" bx="  0.394" by="-0.214" bz=" 0.672" width="2.427" taper="1.00" midpoint="1"/>
  <fuselage ax="  0.394" ay="-0.214" az=" 0.672" bx=" -2.959" by=" 0.000" bz=" 0.450" width="2.427" taper="0.84" midpoint="0"/>

  <!-- Left exterior engine -->
  <fuselage ax="  6.229" ay=" 6.179" az="-0.123" bx="  5.942" by=" 6.179" bz="-0.123" width="0.537" taper="0.10" midpoint="1"/>
  <fuselage ax="  5.942" ay=" 6.179" az="-0.123" bx="  5.208" by=" 6.179" bz="-0.123" width="0.940" taper="0.58" midpoint="1"/>
  <fuselage ax="  5.208" ay=" 6.179" az="-0.123" bx="  4.356" by=" 6.179" bz="-0.123" width="1.079" taper="0.88" midpoint="1"/>
  <fuselage ax="  4.356" ay=" 6.179" az="-0.123" bx="  3.096" by=" 6.179" bz="-0.123" width="1.079" taper="0.84" midpoint="0"/>
  <fuselage ax="  3.096" ay=" 6.179" az="-0.123" bx="  2.029" by=" 6.179" bz="-0.123" width="0.906" taper="0.60" midpoint="0"/>
  <fuselage ax="  2.029" ay=" 6.179" az="-0.123" bx="  1.760" by=" 6.179" bz="-0.123" width="0.544" taper="0.10" midpoint="0"/>

  <!-- Left interior engine -->
  <fuselage ax="  6.599" ay=" 3.075" az="-0.438" bx="  6.312" by=" 3.075" bz="-0.438" width="0.537" taper="0.10" midpoint="1"/>
  <fuselage ax="  6.312" ay=" 3.075" az="-0.438" bx="  5.578" by=" 3.075" bz="-0.438" width="0.940" taper="0.58" midpoint="1"/>
  <fuselage ax="  5.578" ay=" 3.075" az="-0.438" bx="  4.726" by=" 3.075" bz="-0.438" width="1.079" taper="0.88" midpoint="1"/>
  <fuselage ax="  4.726" ay=" 3.075" az="-0.438" bx="  3.466" by=" 3.075" bz="-0.438" width="1.079" taper="0.84" midpoint="0"/>
  <fuselage ax="  3.466" ay=" 3.075" az="-0.438" bx="  2.399" by=" 3.075" bz="-0.438" width="0.906" taper="0.60" midpoint="0"/>
  <fuselage ax="  2.399" ay=" 3.075" az="-0.438" bx="  2.130" by=" 3.075" bz="-0.438" width="0.544" taper="0.10" midpoint="0"/>

  <!-- Right interior engine -->
  <fuselage ax="  6.599" ay="-3.075" az="-0.438" bx="  6.312" by="-3.075" bz="-0.438" width="0.537" taper="0.10" midpoint="1"/>
  <fuselage ax="  6.312" ay="-3.075" az="-0.438" bx="  5.578" by="-3.075" bz="-0.438" width="0.940" taper="0.58" midpoint="1"/>
  <fuselage ax="  5.578" ay="-3.075" az="-0.438" bx="  4.726" by="-3.075" bz="-0.438" width="1.079" taper="0.88" midpoint="1"/>
  <fuselage ax="  4.726" ay="-3.075" az="-0.438" bx="  3.466" by="-3.075" bz="-0.438" width="1.079" taper="0.84" midpoint="0"/>
  <fuselage ax="  3.466" ay="-3.075" az="-0.438" bx="  2.399" by="-3.075" bz="-0.438" width="0.906" taper="0.60" midpoint="0"/>
  <fuselage ax="  2.399" ay="-3.075" az="-0.438" bx="  2.130" by="-3.075" bz="-0.438" width="0.544" taper="0.10" midpoint="0"/>

  <!-- Left exterior engine -->
  <fuselage ax="  6.229" ay="-6.179" az="-0.123" bx="  5.942" by="-6.179" bz="-0.123" width="0.537" taper="0.10" midpoint="1"/>
  <fuselage ax="  5.942" ay="-6.179" az="-0.123" bx="  5.208" by="-6.179" bz="-0.123" width="0.940" taper="0.58" midpoint="1"/>
  <fuselage ax="  5.208" ay="-6.179" az="-0.123" bx="  4.356" by="-6.179" bz="-0.123" width="1.079" taper="0.88" midpoint="1"/>
  <fuselage ax="  4.356" ay="-6.179" az="-0.123" bx="  3.096" by="-6.179" bz="-0.123" width="1.079" taper="0.84" midpoint="0"/>
  <fuselage ax="  3.096" ay="-6.179" az="-0.123" bx="  2.029" by="-6.179" bz="-0.123" width="0.906" taper="0.60" midpoint="0"/>
  <fuselage ax="  2.029" ay="-6.179" az="-0.123" bx="  1.760" by="-6.179" bz="-0.123" width="0.544" taper="0.10" midpoint="0"/>

  <wing x="2.181" y="0.000" z="-0.407"
        chord    = "4.777"
        length   = "15.998"
        taper    = "0.40"
        sweep    = "-2.5"
        dihedral = "3.5"
        camber   = "0.005">
        <stall   aoa="20"  width="1"    peak="1.5"/>
        <flap0 start="0.11"  end="0.52" lift="1.4" drag="1.3"/>
        <flap1 start="0.52"  end="0.88" lift="1.2" 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="3"/>
  </wing>

  <hstab x="-9.212" y="0.000" z="0.480"
         chord    = "2.778"
         length   = "4.287"
         taper    = "0.65"
         sweep    = "2.5"
         dihedral = "4">
         <stall   aoa="18" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.2" 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>

  <vstab x="-9.507" y="4.290" z="-0.285"
         chord  = "2"
         length = "3.105"
         taper  = "0.7"
         sweep  = "5">
         <stall   aoa="16" width="1" peak="1.4"/>
         <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="-9.507" y="-4.290" z="-0.285"
         chord  = "2"
         length = "3.105"
         taper  = "0.7"
         sweep  = "5">
         <stall   aoa="16" width="1" peak="1.4"/>
         <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/De_Havilland_Gipsy_Twelve

                 Name              : de Havilland Gipsy Twelve
                 Type              : Inverted 60 degree V-12 inline piston engine
                 Displacement      : 1121.3 cu in (18.3 L)
                 Power cruise      :  425 hp at 2450 rpm ( at 0 psi boost, five minutes maximum)
                 Weight            : 1058 lb (480 kg)
                 Compression       : 6:1
  takeoff-power = "325"
  takeoff-rpm   = "1733"
  fine-stop     = "0.8"
  -->
  <!-- Rotations : 0 Left  Exterior sens anti horaire
                   1 Left  Interior sens anti horaire
                   2 Right Interior sens anti horaire
                   3 Right Exterior sens anti horaire
  -->
  <!-- Left exterior -->
  <propeller x="4.043" y="6.178" z="-0.105"
             mass          = "1058"
             moment        = "5"
             radius        = "1.6"
             cruise-power  = "400"
             cruise-speed  = "180"
             cruise-rpm    = "2400"
             cruise-alt    = "11000">
             <actionpt x="6.045" y="6.178" z="-0.123"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[0]/propeller-pitch"/>
             <piston-engine eng-rpm      = "2600"
                            eng-power    = "425"
                            displacement = "1121"
                            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"/>
             </piston-engine>
  </propeller>

  <!-- Left interior -->
  <propeller x="4.317" y="3.075" z="-0.438"
             mass          = "1058"
             moment        = "5"
             radius        = "1.6"
             cruise-power  = "400"
             cruise-speed  = "180"
             cruise-rpm    = "2400"
             cruise-alt    = "11000">
             <actionpt x="6.421" y="3.075" z="-0.415"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[1]/propeller-pitch"/>
             <piston-engine eng-rpm="2600"
                            eng-power="445"
                            displacement="1121"
                            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"/>
             </piston-engine>
  </propeller>

  <!-- Right interior -->
  <propeller x="4.317" y="-3.075" z="-0.438"
             mass          = "1058"
             moment        = "5"
             radius        = "1.6"
             cruise-power  = "400"
             cruise-speed  = "180"
             cruise-rpm    = "2400"
             cruise-alt    = "11000">
             <actionpt x="6.421" y="-3.075" z="-0.415"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[2]/propeller-pitch"/>
             <piston-engine eng-rpm      = "2600"
                            eng-power    = "425"
                            displacement = "1121"
                            compression  = "6">
                            <control-input control="THROTTLE" axis="/controls/engines/engine[2]/throttle"/>
                            <control-input control="STARTER"  axis="/controls/engines/engine[2]/starter"/>
                            <control-input control="MAGNETOS" axis="/controls/engines/engine[2]/magnetos"/>
                            <control-input control="MIXTURE"  axis="/controls/engines/engine[2]/mixture"/>
             </piston-engine>
  </propeller>

  <!-- Right exterior -->
  <propeller x="4.043" y="-6.178" z="-0.105"
             mass          = "1058"
             moment        = "5"
             radius        = "1.6"
             cruise-power  = "400"
             cruise-speed  = "180"
             cruise-rpm    = "2400"
             cruise-alt    = "11000">
             <actionpt x="6.045" y="-6.178" z="-0.123"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[3]/propeller-pitch"/>
             <piston-engine eng-rpm      = "2600"
                            eng-power    = "425"
                            displacement = "1121"
                            compression  = "6">
                            <control-input control="THROTTLE" axis="/controls/engines/engine[3]/throttle"/>
                            <control-input control="STARTER"  axis="/controls/engines/engine[3]/starter"/>
                            <control-input control="MAGNETOS" axis="/controls/engines/engine[3]/magnetos"/>
                            <control-input control="MIXTURE"  axis="/controls/engines/engine[3]/mixture"/>
             </piston-engine>
  </propeller>

  <!-- Left wheel -->
  <gear x="3.706" y="2.545" z="-3.136"
        compression ="0.3"
        spring      ="8"
        damp        ="6"
        stiction    ="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-input  control="STEER"  axis="/sim/gears/toe-left"/>

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

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

  <!-- Right wheel -->
  <gear x="3.706" y="-2.545" z="-3.136"
        compression ="0.3"
        spring      ="8"
        damp        ="6"
        stiction    ="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-input  control="STEER"  axis="/sim/gears/toe-right"/>

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

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

  <!-- Tail wheel -->
  <gear x="-10.476" y="0" z="-0.841"
        compression = "0.1"
        spring      ="8"
        damp        ="6"
        stiction    = "1">
        <control-input control="STEER"     axis="/controls/flight/rudder" src0="-1" src1="1" dst0="0.8" dst1="-0.8"/>
  </gear>

  <tank x="2.181" y=" 5.000" z="0.400" capacity="1584"/>
  <tank x="2.181" y="-5.000" z="0.400" capacity="1584"/>

  <!-- Mass distribution
       Dilbert : The cg should be about 1/6 chord ahead of the chord center.
                 4.777 / 6     = 0.796
                 2.181 + 0.796 = 2.977
  -->
  <ballast x="10.670" y="0.000" z="0.100" mass="2304"/>

</airplane>
