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

<!-- Caravelle yasim : BARANGER Emmanuel 02/2020
             updated : BARANGER Emmanuel 12/2020
             updated : BARANGER Emmanuel 08/2023

  sources       : https://en.wikipedia.org/wiki/Sud_Aviation_Caravelle

  wingspan      : 34.30 m  ( 112.53 ft )
  lenght        : 36.24 m  ( 118.90 ft )
  weight        :  9.01 m  (  29.56 ft )
  Empty mass    : 22200 kg (  48943 lb )
  Powerplant    : 2 Rolls-Royce Avon Mk.527 turbojet engines ( 11400 lb) thrust each
  Max weight    : 46000 kg ( 101413 lb )
  Maximum speed : 805 km/h (    435 kt )
-->
<airplane mass="48943" version="YASIM_VERSION_CURRENT" mtow-lbs="101413">

  <!-- Approach configuration -->
  <approach speed="120" aoa="2" fuel="0.3">
    <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"/>
    <control-setting axis="/controls/gear/gear-down"             value="1"/>
  </approach>

  <!-- Cruise configuration -->
  <cruise speed="380" alt="35000" fuel="0.8">
    <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"/>
    <control-setting axis="/controls/gear/gear-down"             value="0"/>
  </cruise>

  <cockpit x="16.598" y="0.384" z="0.494"/>

  <fuselage ax=" 18.119" ay=" 0.000" az="-0.319" bx=" 16.705" by=" 0.000" bz="-0.173" width="1.985" taper="0.15" midpoint="1"/>
  <fuselage ax=" 16.705" ay=" 0.000" az="-0.173" bx=" 15.317" by=" 0.000" bz="-0.004" width="2.768" taper="0.71" midpoint="1"/>
  <fuselage ax=" 15.441" ay=" 0.000" az="-0.004" bx=" 12.539" by=" 0.000" bz=" 0.060" width="3.203" taper="0.85" midpoint="1"/>
  <fuselage ax=" 12.539" ay=" 0.000" az=" 0.060" bx=" -6.989" by=" 0.000" bz=" 0.066" width="3.203" taper="1.00" midpoint="1"/>
  <fuselage ax=" -6.989" ay=" 0.000" az=" 0.066" bx="-11.131" by=" 0.000" bz=" 0.355" width="3.203" taper="0.80" midpoint="0"/>
  <fuselage ax="-11.131" ay=" 0.000" az=" 0.355" bx="-16.044" by=" 0.000" bz=" 0.764" width="2.562" taper="0.40" midpoint="0"/>
  <fuselage ax="-16.044" ay=" 0.000" az=" 0.764" bx="-17.490" by=" 0.000" bz=" 0.834" width="1.025" taper="0.15" midpoint="0"/>

  <!-- Engine Left -->
  <fuselage ax=" -5.147" ay=" 2.652" az=" 0.440" bx=" -5.576" by=" 2.652" bz=" 0.440" width="1.195" taper="0.68" midpoint="1"/>
  <fuselage ax=" -5.576" ay=" 2.652" az=" 0.440" bx=" -6.157" by=" 2.652" bz=" 0.440" width="1.447" taper="0.83" midpoint="1"/>
  <fuselage ax=" -6.157" ay=" 2.652" az=" 0.440" bx=" -8.008" by=" 2.652" bz=" 0.440" width="1.447" taper="0.88" midpoint="0"/>
  <fuselage ax=" -8.008" ay=" 2.652" az=" 0.440" bx=" -9.740" by=" 2.652" bz=" 0.440" width="1.273" taper="0.70" midpoint="0"/>
  <fuselage ax=" -9.740" ay=" 2.652" az=" 0.440" bx="-10.797" by=" 2.652" bz=" 0.440" width="0.891" taper="0.55" midpoint="0"/>

  <!-- Engine Right -->
  <fuselage ax=" -5.147" ay="-2.652" az=" 0.440" bx=" -5.576" by="-2.652" bz=" 0.440" width="1.195" taper="0.68" midpoint="1"/>
  <fuselage ax=" -5.576" ay="-2.652" az=" 0.440" bx=" -6.157" by="-2.652" bz=" 0.440" width="1.447" taper="0.83" midpoint="1"/>
  <fuselage ax=" -6.157" ay="-2.652" az=" 0.440" bx=" -8.008" by="-2.652" bz=" 0.440" width="1.447" taper="0.88" midpoint="0"/>
  <fuselage ax=" -8.008" ay="-2.652" az=" 0.440" bx=" -9.740" by="-2.652" bz=" 0.440" width="1.273" taper="0.70" midpoint="0"/>
  <fuselage ax=" -9.740" ay="-2.652" az=" 0.440" bx="-10.797" by="-2.652" bz=" 0.440" width="0.891" taper="0.55" midpoint="0"/>

  <wing x="1.728" y="0" z="-1"
        chord="7.206"
        length="18.4"
        taper=".47"
        sweep="21"
        dihedral="2"
        camber="0.005">
        <stall   aoa="20"      width="1"    peak="1.5"/>
        <slat    start="0.12"  end="1"      aoa="2"    drag="1.2"/>
        <flap0   start="0.12"  end="0.655"  lift="1.6" drag="1.8"/>
        <flap1   start="0.655" end="1"      lift="1.2" drag="1.1"/>
        <spoiler start="0.405" end="0.53"   lift="0.3" drag="3"/>

        <control-input  control="SLAT"    axis="/surface-positions/flap-pos-norm"/>
        <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-input  control="SPOILER" axis="/controls/flight/spoilers"/>

        <control-output control="SLAT"    prop="/surface-positions/slats"/>
        <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="SPOILER" prop="/surface-positions/speedbrake-pos-norm"/>

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

  <hstab x="-14.095" y="0" z="2.734"
         chord="4.504"
         length="6"
         taper=".46"
         sweep="29"
         dihedral="1">
         <stall   aoa="18" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.5" 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="-13.207" y="0.00" z="1.473"
         chord="6.393"
         length="5.5"
         taper="0.30"
         sweep="32">
         <stall   aoa="16" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.3" 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             : https://en.wikipedia.org/wiki/Rolls-Royce_Avon

                 name               : Rolls-Royce Avon
                 type               : turbojet
                 power max.         : 12690 lbf dry, 16360 lbf with reheat
                 Compression ratio  : 5.2:1
                 weight             : 2890 lb ( 1310 kg )
                 Displacement       : 115 cu in (1.9 L)
  -->
  <jet x="-7.967" y="2.652"  z="0.440"
       mass="2890"
       thrust="12690"
       tsfc="0.65"
       epr="5.66">
       <actionpt x="-10.791" y="2.652"  z="0.440"/>
       <control-input control="THROTTLE" axis="/controls/engines/engine[0]/throttle"/>
  </jet>

  <jet x="-7.967" y="-2.652"  z="0.440"
       mass="2890"
       thrust="12690"
       tsfc="0.65"
       epr="5.66">
       <actionpt x="-10.791" y="-2.652"  z="0.440"/>
       <control-input control="THROTTLE" axis="/controls/engines/engine[1]/throttle"/>
  </jet>

  <!-- nose -->
  <gear x="12.296"  y="0.00" z="-2.652"
        compression="0.75"
        spring="0.7"
        damp="4"
        stiction="1">
        <control-input  control="STEER"  axis="/controls/flight/rudder" square="true"/>
        <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="7"/>
  </gear>

  <gear x="-0.505" y="2.885" z="-2.836"
        compression="1.1"
        spring="1.8"
        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[1]/position-norm"/>

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

  <gear x="-0.505" y="-2.885" z="-2.836"
        compression="1.1"
        spring="1.8"
        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[2]/position-norm"/>

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

  <!-- 2667.778 ga us = 17900 lbs -->
  <tank x=" 1" y=" 6" z="-0.8" jet="true" capacity="17900"/>
  <tank x=" 1" y="-6" z="-0.8" jet="true" capacity="17900"/>

  <!-- Mass distribution
       Dilbert : The cg should be about 1/6 chord ahead of the chord center.
                 7.206 / 6     = 1.201
                 1.728 + 1.201 = 2.929
  -->
  <ballast x="16" y="0" z="-1" mass="17360"/>

</airplane>
