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

<!-- Handley Page H.P.42 : BARANGER Emmanuel (2009)
                  Update : BARANGER Emmanuel (2016)
                  Update : BARANGER Emmanuel (03/2021)
                  Update : BARANGER Emmanuel (03/2025)

                 Sources : https://www.wikiwand.com/en/Handley_Page_H.P.42

     Wingspan           : 40.00 m    ( 130.0 ft )
     Lenght             : 28.09 m    (  92.2 ft )
     Height             :  8.20 m    (  27.0 ft )
     Empty mass         :  8047 kg   ( 17740 lb )
     Max takeoff weight : 12701 kg   ( 28000 lb )
     Powerplant         : 4 Bristol Jupiter XIF 9-cylinder air-cooled radial piston engines ( 490 hp each )
     Cruise speed       :   160 km/h (    87 kt )
     Maximum speed      :   190 km/h (   100 kt )
-->
<airplane mass="17740" version="YASIM_VERSION_CURRENT" mtow-lbs="28000">

  <approach speed="33" aoa="4" fuel="0.2">
    <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[1]/throttle" value="0.3"/>
    <control-setting axis="/controls/engines/engine[1]/mixture"  value="1"/>

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

    <control-setting axis="/controls/engines/engine[3]/throttle" value="0.3"/>
    <control-setting axis="/controls/engines/engine[3]/mixture"  value="1"/>
  </approach>

  <cruise speed="87" alt="5000" fuel="0.8">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.8"/>
    <control-setting axis="/controls/engines/engine[0]/mixture"  value="0.3"/>

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

    <control-setting axis="/controls/engines/engine[2]/throttle" value="0.8"/>
    <control-setting axis="/controls/engines/engine[2]/mixture"  value="0.3"/>

    <control-setting axis="/controls/engines/engine[3]/throttle" value="0.8"/>
    <control-setting axis="/controls/engines/engine[3]/mixture"  value="0.3"/>
  </cruise>

  <!-- Pilot -->
  <cockpit x="12.506" y="0.0" z="-0.592"/>

  <!-- Cabine -->
  <fuselage ax=" 13.451" ay=" 0.000" az="-1.263" bx=" 12.753" by=" 0.000" bz="-0.731" width="1.209" taper="0.40" midpoint="1"/>
  <fuselage ax=" 13.098" ay=" 0.000" az="-0.731" bx=" 10.663" by=" 0.000" bz="-0.731" width="1.380" taper="0.70" midpoint="1"/>
  <!-- Fuselage up -->
  <fuselage ax=" 14.037" ay=" 0.000" az="-1.461" bx=" 13.946" by=" 0.000" bz="-1.461" width="0.463" taper="0.20" midpoint="1"/>
  <fuselage ax=" 13.946" ay=" 0.000" az="-1.461" bx=" 13.855" by=" 0.000" bz="-1.461" width="0.662" taper="0.70" midpoint="1"/>
  <fuselage ax=" 13.855" ay=" 0.000" az="-1.461" bx=" 13.488" by=" 0.000" bz="-1.461" width="1.062" taper="0.62" midpoint="1"/>
  <fuselage ax=" 13.488" ay=" 0.000" az="-1.461" bx=" 12.287" by=" 0.000" bz="-1.461" width="1.943" taper="0.55" midpoint="1"/>
  <fuselage ax=" 12.287" ay=" 0.000" az="-1.236" bx=" 10.646" by=" 0.000" bz="-1.236" width="2.388" taper="0.80" midpoint="1"/>
  <fuselage ax=" 10.646" ay=" 0.000" az="-1.236" bx=" -3.115" by=" 0.000" bz="-1.236" width="2.388" taper="1.00" midpoint="1"/>
  <fuselage ax=" -3.115" ay=" 0.000" az="-1.236" bx=" -8.387" by=" 0.000" bz="-0.741" width="2.388" taper="0.70" midpoint="0"/>
  <fuselage ax=" -8.387" ay=" 0.000" az="-0.741" bx="-13.240" by=" 0.000" bz="-0.341" width="1.668" taper="0.20" midpoint="0"/>
  <!-- Fuselage down -->
  <fuselage ax=" 14.037" ay=" 0.000" az="-1.636" bx=" 13.946" by=" 0.000" bz="-1.636" width="0.463" taper="0.20" midpoint="1"/>
  <fuselage ax=" 13.946" ay=" 0.000" az="-1.636" bx=" 13.855" by=" 0.000" bz="-1.636" width="0.662" taper="0.70" midpoint="1"/>
  <fuselage ax=" 13.855" ay=" 0.000" az="-1.636" bx=" 13.488" by=" 0.000" bz="-1.636" width="1.062" taper="0.62" midpoint="1"/>
  <fuselage ax=" 13.527" ay=" 0.000" az="-1.635" bx=" 12.287" by=" 0.000" bz="-1.578" width="1.943" taper="0.55" midpoint="1"/>
  <fuselage ax=" 12.287" ay=" 0.000" az="-1.578" bx=" 10.646" by=" 0.000" bz="-1.578" width="2.388" taper="0.80" midpoint="1"/>
  <fuselage ax=" 10.646" ay=" 0.000" az="-1.578" bx=" -3.115" by=" 0.000" bz="-1.578" width="2.388" taper="1.00" midpoint="1"/>
  <fuselage ax=" -2.913" ay=" 0.000" az="-1.578" bx=" -8.387" by=" 0.000" bz="-0.741" width="2.388" taper="0.70" midpoint="0"/>
  <!-- Engine left down -->
  <fuselage ax="  6.213" ay=" 3.844" az="-0.948" bx="  6.106" by=" 3.844" bz="-0.948" width="0.946" taper="0.80" midpoint="1"/>
  <fuselage ax="  6.106" ay=" 3.844" az="-0.948" bx="  5.728" by=" 3.844" bz="-0.948" width="0.946" taper="1.00" midpoint="1"/>
  <fuselage ax="  5.728" ay=" 3.844" az="-0.948" bx="  5.417" by=" 3.844" bz="-0.948" width="1.223" taper="0.77" midpoint="1"/>
  <fuselage ax="  5.417" ay=" 3.844" az="-0.948" bx="  3.944" by=" 3.844" bz="-0.948" width="1.223" taper="1.00" midpoint="1"/>
  <fuselage ax="  3.944" ay=" 3.844" az="-0.948" bx="  2.129" by=" 3.844" bz="-0.948" width="1.223" taper="0.10" midpoint="0"/>
  <!-- Engine left up -->
  <fuselage ax="  6.213" ay=" 1.903" az=" 2.481" bx="  6.106" by=" 1.903" bz=" 2.481" width="0.946" taper="0.80" midpoint="1"/>
  <fuselage ax="  6.106" ay=" 1.903" az=" 2.481" bx="  5.728" by=" 1.903" bz=" 2.481" width="0.946" taper="1.00" midpoint="1"/>
  <fuselage ax="  5.728" ay=" 1.903" az=" 2.481" bx="  5.417" by=" 1.903" bz=" 2.481" width="1.223" taper="0.77" midpoint="1"/>
  <fuselage ax="  5.417" ay=" 1.903" az=" 2.481" bx="  2.834" by=" 1.903" bz=" 2.481" width="1.223" taper="1.00" midpoint="1"/>
  <fuselage ax="  2.834" ay=" 1.903" az=" 2.481" bx="  1.019" by=" 1.903" bz=" 2.481" width="1.223" taper="0.10" midpoint="0"/>
  <!-- Engine right up -->
  <fuselage ax="  6.213" ay="-1.903" az=" 2.481" bx="  6.106" by="-1.903" bz=" 2.481" width="0.946" taper="0.80" midpoint="1"/>
  <fuselage ax="  6.106" ay="-1.903" az=" 2.481" bx="  5.728" by="-1.903" bz=" 2.481" width="0.946" taper="1.00" midpoint="1"/>
  <fuselage ax="  5.728" ay="-1.903" az=" 2.481" bx="  5.417" by="-1.903" bz=" 2.481" width="1.223" taper="0.77" midpoint="1"/>
  <fuselage ax="  5.417" ay="-1.903" az=" 2.481" bx="  2.834" by="-1.903" bz=" 2.481" width="1.223" taper="1.00" midpoint="1"/>
  <fuselage ax="  2.834" ay="-1.903" az=" 2.481" bx="  1.019" by="-1.903" bz=" 2.481" width="1.223" taper="0.10" midpoint="0"/>
  <!-- Engine right down -->
  <fuselage ax="  6.213" ay="-3.844" az="-0.948" bx="  6.106" by="-3.844" bz="-0.948" width="0.946" taper="0.80" midpoint="1"/>
  <fuselage ax="  6.106" ay="-3.844" az="-0.948" bx="  5.728" by="-3.844" bz="-0.948" width="0.946" taper="1.00" midpoint="1"/>
  <fuselage ax="  5.728" ay="-3.844" az="-0.948" bx="  5.417" by="-3.844" bz="-0.948" width="1.223" taper="0.77" midpoint="1"/>
  <fuselage ax="  5.417" ay="-3.844" az="-0.948" bx="  3.944" by="-3.844" bz="-0.948" width="1.223" taper="1.00" midpoint="1"/>
  <fuselage ax="  3.944" ay="-3.844" az="-0.948" bx="  2.129" by="-3.844" bz="-0.948" width="1.223" taper="0.10" midpoint="0"/>

  <wing x="3.077" y="0" z="2.8"
        chord="5"
        length="20"
        taper="1"
        dihedral="1.5"
        incidence="3"
        camber="0.005">
        <stall   aoa="20" width="1" peak="1.5"/>
        <flap0 start="0.49" end="1" lift="1.3" drag="1.1"/>

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

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

  <wing x="3.543" y="0" z="-0.492"
        append="1"
        chord="4"
        length="3.966"
        taper="1"
        dihedral="-10"
        incidence="3"
        camber="0.005">
        <stall aoa="20" width="1" peak="1.5"/>
  </wing>

  <wing x="3.543" y="3.90575" z="-1.18069"
        append="1"
        chord="4"
        length="10.444"
        taper="1"
        dihedral="3"
        incidence="3"
        camber="0.005">
        <stall aoa="20" width="1" peak="1.5"/>
  </wing>

  <hstab x="-12.593" y="0" z="0.210"
         chord="2.25"
         length="3.613"
         taper="1">
         <stall   aoa="18" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.7" 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>

  <hstab x="-12.593" y="0" z="3.020"
         chord="2.25"
         length="3.613"
         taper="1">
         <stall   aoa="18" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.7" 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="-12.648" y="0" z="0.185"
         chord="2.343"
         length="2.825"
         taper="1">
         <stall   aoa="16" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.2" 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>

  <vstab x="-12.648" y="2.309" z="0.185"
         chord="2.343"
         length="2.825"
         taper="1">
         <stall   aoa="16" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.2" 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>

  <vstab x="-12.648" y="-2.309" z="0.185"
         chord="2.343"
         length="2.825"
         taper="1">
         <stall   aoa="16" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.2" 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>

  <!-- Informations Wikipedia

       Engines : Bristol 'Jupiter'
               : 490 ch
               : 9 cylinders
               : Displacement 1752.8 (28.7 l)
               : Masse 730 lb (330 kg)
               : Cruise RPM 1600
               : Compression 5:1
  -->
  <!-- Left down -->
  <propeller x="5.878" y="3.844" z="-0.948"
             mass="730"
             moment="25"
             radius="1.7"
             cruise-speed="87"
             cruise-rpm="1575"
             cruise-power="470"
             cruise-alt="5000">
             <actionpt x="6.435" y="3.844" z="-0.948"/>
             <piston-engine eng-power="490"
                            eng-rpm="1575"
                            displacement="1752.8"
                            compression="5">
                            <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 up -->
  <propeller x="5.878" y="1.903" z="2.502"
             mass="730"
             moment="25"
             radius="1.7"
             cruise-speed="87"
             cruise-rpm="1575"
             cruise-power="470"
             cruise-alt="5000">
             <actionpt x="6.435" y="1.903" z="2.502"/>
             <piston-engine eng-power="490"
                            eng-rpm="1575"
                            displacement="1752.8"
                            compression="5">
                            <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 up -->
  <propeller x="5.878" y="-1.903" z="2.502"
             mass="730"
             moment="25"
             radius="1.7"
             cruise-speed="87"
             cruise-rpm="1575"
             cruise-power="470"
             cruise-alt="5000">
             <actionpt x="6.435" y="-1.903" z="2.502"/>
             <piston-engine eng-power="490"
                            eng-rpm="1575"
                            displacement="1752.8"
                            compression="5">
                            <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 down -->
  <propeller x="5.878" y="-3.844" z="-0.948"
             mass="730"
             moment="25"
             radius="1.7"
             cruise-speed="87"
             cruise-rpm="1575"
             cruise-power="470"
             cruise-alt="5000">
             <actionpt x="6.435" y="-3.844" z="-0.948"/>
             <piston-engine eng-power="490"
                            eng-rpm="1575"
                            displacement="1752.8"
                            compression="5">
                            <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>

  <gear x="4.805" y="4.348" z="-3.899"
        compression="0.2"
        spring="6"
        damp="2"
        stiction="1">
        <control-input control="BRAKE" axis="/controls/gear/brake-left"/>
        <control-input control="BRAKE" axis="/controls/gear/brake-parking"/>
  </gear>

  <gear x="4.805" y="-4.348" z="-3.899"
        compression="0.2"
        spring="6"
        damp="2"
        stiction="1">
        <control-input control="BRAKE" axis="/controls/gear/brake-right"/>
        <control-input control="BRAKE" axis="/controls/gear/brake-parking"/>
  </gear>

  <gear x="-13.662" y="0" z="-1.127"
        compression="0.1"
        spring="6"
        damp="2"
        stiction="1">
        <control-input  control="STEER" axis="/controls/flight/rudder" src0="-1.0" src1="1.0" dst0="0.5" dst1="-0.5"/>
  </gear>

  <tank x="3.077" y=" 6" z="-1.1" capacity="600"/>
  <tank x="3.077" y="-6" z="-1.1" capacity="600"/>

  <!-- Mass distribution
       Dilbert : The cg should be about 1/6 chord ahead of the chord center.
       5.000 / 6     = 0.833
       3.077 + 0.833 = 3.910
  -->
  <ballast x="4.4" y="0" z="-2.72" mass="5000"/>

</airplane>
