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

<!-- BAe 125 make with Melchior's script : BARANGER Emmanuel (   2012)
                                 Updated : BARANGER Emmanuel (10/2021)

     source          : http://en.wikipedia.org/wiki/British_Aerospace_125

     Wingspan        : 47 ft 0 in ( 14.33 m  )
     Lenght          : 50 ft 6 in ( 15.39 m  )
     Height          : 17 ft 3 in (  5.26 m  )
     Empty mass      :   12530 lb (  5683 kg )
     Engine          : 2 × Rolls-Royce Viper 601-22 turbojets ( 3750 lbf each )
     Cruise speed    : 403 kt ( 747 km/h ) at 39000 ft ( Econ cruise )
     Maximum cruise  : 454 kt ( 840 km/h ) at 28000 ft ( Max cruise  )
-->
<airplane mass="12530" version="YASIM_VERSION_CURRENT" mtow-lbs="16000">

  <approach speed="100" aoa="4" fuel="1">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.2"/>
    <control-setting axis="/controls/engines/engine[1]/throttle" value="0.2"/>
    <control-setting axis="/controls/flight/flaps"               value="1.0"/>
    <control-setting axis="/controls/gear/gear-down"             value="1.0"/>
  </approach>

  <cruise speed="403" alt="19500" fuel="1.0">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.8"/>
    <control-setting axis="/controls/engines/engine[1]/throttle" value="0.8"/>
    <control-setting axis="/controls/flight/flaps"               value="0.0"/>
    <control-setting axis="/controls/gear/gear-down"             value="0.0"/>
  </cruise>

  <cockpit x="4.815" y="0.275" z="0.163"/>

  <!-- Fuselage -->
  <fuselage ax=" 7.693" ay=" 0.000" az="-0.937" bx=" 7.485" by=" 0.000" bz="-0.937" width="0.407" taper="0.30" midpoint="1"/>

  <!-- Left -->
  <fuselage ax=" 7.485" ay=" 0.000" az="-0.937" bx=" 7.077" by=" 0.056" bz="-0.903" width="0.716" taper="0.56" midpoint="1"/>
  <fuselage ax=" 7.077" ay=" 0.056" az="-0.903" bx=" 6.117" by=" 0.155" bz="-0.804" width="1.146" taper="0.62" midpoint="1"/>
  <fuselage ax=" 6.117" ay=" 0.155" az="-0.804" bx=" 4.731" by=" 0.139" bz="-0.586" width="1.604" taper="0.70" midpoint="1"/>

  <!-- Right -->
  <fuselage ax=" 7.485" ay=" 0.000" az="-0.937" bx=" 7.077" by="-0.056" bz="-0.903" width="0.716" taper="0.56" midpoint="1"/>
  <fuselage ax=" 7.077" ay="-0.056" az="-0.903" bx=" 6.117" by="-0.155" bz="-0.804" width="1.146" taper="0.62" midpoint="1"/>
  <fuselage ax=" 6.117" ay="-0.155" az="-0.804" bx=" 4.731" by="-0.139" bz="-0.586" width="1.604" taper="0.70" midpoint="1"/>

  <fuselage ax=" 5.814" ay=" 0.000" az="-0.406" bx=" 4.731" by=" 0.000" bz="-0.406" width="1.920" taper="0.30" midpoint="1"/>
  <fuselage ax=" 4.731" ay=" 0.000" az="-0.406" bx="-1.128" by=" 0.000" bz="-0.406" width="1.920" taper="1.00" midpoint="1"/>
  <fuselage ax="-1.128" ay=" 0.000" az="-0.406" bx="-2.583" by=" 0.000" bz="-0.406" width="1.920" taper="0.82" midpoint="0"/>
  <fuselage ax="-2.583" ay=" 0.000" az="-0.406" bx="-5.793" by=" 0.000" bz="-0.406" width="1.574" taper="0.20" midpoint="0"/>

  <!-- Moteur gauche -->
  <fuselage ax="-1.169" ay=" 1.484" az="-0.479" bx="-1.238" by=" 1.484" bz="-0.479" width="0.734" taper="0.80" midpoint="1"/>
  <fuselage ax="-1.238" ay=" 1.484" az="-0.479" bx="-2.564" by=" 1.350" bz="-0.479" width="0.814" taper="0.90" midpoint="1"/>
  <fuselage ax="-2.564" ay=" 1.350" az="-0.479" bx="-3.890" by=" 1.216" bz="-0.479" width="0.814" taper="0.50" midpoint="0"/>

  <!-- Moteur droite -->
  <fuselage ax="-1.169" ay="-1.484" az="-0.479" bx="-1.238" by="-1.484" bz="-0.479" width="0.734" taper="0.80" midpoint="1"/>
  <fuselage ax="-1.238" ay="-1.484" az="-0.479" bx="-2.564" by="-1.350" bz="-0.479" width="0.814" taper="0.90" midpoint="1"/>
  <fuselage ax="-2.564" ay="-1.350" az="-0.479" bx="-3.890" by="-1.216" bz="-0.479" width="0.814" taper="0.50" midpoint="0"/>

  <wing x="0.514" y="0" z="-1.366"
        chord="3.488"
        length="7.4"
        taper="0.32"
        sweep="16"
        dihedral="3.5"
        camber="0.01">
        <stall     aoa="20" width="1"    peak="1.5"/>
        <spoiler start="0.27" end="0.64" lift="1.3" drag="1.5"/>
        <flap0   start="0.15" end="0.65" lift="1.3" drag="1.5"/>
        <flap1   start="0.65" end="1.00" lift="1.2" drag="1.1"/>

        <control-input  control="SPOILER" axis="/controls/flight/spoilers"/>
        <control-input  control="FLAP0"   axis="/controls/flight/flaps"/>
        <control-input  control="FLAP1"   axis="/controls/flight/aileron"                  split="true" square="true"/>
        <control-input  control="FLAP1"   axis="/controls/flight/aileron-trim"             split="true"/>

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

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

  <hstab x="-6.170" y="0" z="1.720"
         chord="2.1"
         length="3.15"
         taper="0.54"
         sweep="16"
         dihedral="0.0">
         <stall   aoa="18" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.3" 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="-4.086" y="0" z="-0.318"
         chord="3.575"
         length="4.14"
         taper="0.32"
         sweep="47">
         <stall   aoa="16"  width="1"   peak="1.5"/>
         <flap0 start="0.058" end="0.6" 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>

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

                 name              : Armstrong Siddeley Viper
                 type              : Turbojet
                 power cruise      : 3750 lbf at 13800 rpm
                 weight            : 549 lb ( 249 kg )
  -->
  <jet x="-2.474" y="1.380" z="-0.495"
       mass="549"
       thrust="3750"
       tsfc="0.576">
       <actionpt x="-3.568" y="1.229" z="-0.495"/>
       <control-input  control="THROTTLE"       axis="/controls/engines/engine[0]/throttle"/>
       <control-input  control="REVERSE_THRUST" axis="/controls/engines/engine[0]/reverser"/>

       <control-output control="REVERSE_THRUST" prop="/surface-positions/reverser-norm"/>

       <control-speed  control="REVERSE_THRUST" transition-time="1.5"/>
  </jet>

  <jet x="-2.474" y="-1.380" z="-0.495"
       mass="549"
       thrust="3750"
       tsfc="0.576">
       <actionpt x="-3.568" y="-1.229" z="-0.495"/>
       <control-input  control="THROTTLE"       axis="/controls/engines/engine[1]/throttle"/>
       <control-input  control="REVERSE_THRUST" axis="/controls/engines/engine[1]/reverser"/>

       <control-output control="REVERSE_THRUST" prop="/surface-positions/reverser-norm"/>

       <control-speed  control="REVERSE_THRUST" transition-time="1.5"/>
  </jet>

  <!-- Undercarriage -->
  <!-- nose -->
  <gear x="5.271" y="0" z="-2.548"
        compression="0.30"
        spring="1"
        damp="2" >
        <control-input  control="STEER"  axis="/controls/flight/rudder" src0="-1.0" src1="1.0" dst0="-0.1" dst1="0.1"/>
        <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="6"/>
  </gear>

  <!-- left main -->
  <gear x="-0.367" y="1.501" z="-2.616"
        compression="0.30"
        spring="1"
        damp="2" >
        <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[1]/position-norm"/>

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

  <!-- right main -->
  <gear x="-0.367" y="-1.501" z="-2.616"
        compression="0.30"
        spring="1"
        damp="2" >
        <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[2]/position-norm"/>

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

  <!-- Internal tanks
       2*280 liter wings
  -->
  <tank x="-0.168" y="-2.3" z="-1.232" jet="true" capacity="1250"/>
  <tank x="-0.138" y=" 2.3" z="-1.232" jet="true" capacity="1250"/>

  <!-- Mass placement -->
  <ballast x="7" y="0.0" z="-1" mass="2000"/>

</airplane>

