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

<!-- Caproni Ca3 : Emmanuel BARANGER    2013
         Updated : Emmanuel BARANGER    2016
         Updated : Emmanuel BARANGER 06/2023

       source    : https://www.wikiwand.com/en/Caproni_Ca.3

       wingspan           : 22.74 m  (   74 ft 7 in )
       lenght             : 11.05 m  (   36 ft 3 in )
       height             :   3.7 m  (   12 ft 2 in )
       weight             :  2300 kg ( 5071 lb      )
       Max takeoff weight :  3800 kg ( 8378 lb      )
       engines            : 3 x Isotta-Fraschini V.4B 6-cyl. water-cooled in-line piston engines ( 150 hp each )
       max speed          : 137 km/h (   74 kn      )
-->
<airplane mass="5071" version="YASIM_VERSION_CURRENT" mtow-lbs="8378">

  <approach speed="40" aoa="2" fuel="0.3">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.4"/>
    <control-setting axis="/controls/engines/engine[0]/mixture"  value="1"/>
    <control-setting axis="/controls/engines/engine[1]/throttle" value="0.4"/>
    <control-setting axis="/controls/engines/engine[1]/mixture"  value="1"/>
    <control-setting axis="/controls/engines/engine[2]/throttle" value="0.4"/>
    <control-setting axis="/controls/engines/engine[2]/mixture"  value="1"/>
  </approach>

  <cruise speed="120" alt="7000" fuel="0.7">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="1"/>
    <control-setting axis="/controls/engines/engine[0]/mixture"  value="1"/>
    <control-setting axis="/controls/engines/engine[1]/throttle" value="1"/>
    <control-setting axis="/controls/engines/engine[1]/mixture"  value="1"/>
    <control-setting axis="/controls/engines/engine[2]/throttle" value="1"/>
    <control-setting axis="/controls/engines/engine[2]/mixture"  value="1"/>
  </cruise>

  <cockpit x="4.608" y="0.270" z="0.585"/>

  <fuselage ax=" 5.423" ay=" 0.000" az=" 0.002" bx=" 4.810" by=" 0.000" bz="-0.089" width="1.057" taper="0.60" midpoint="1"/>
  <fuselage ax=" 4.810" ay=" 0.000" az="-0.089" bx=" 4.472" by=" 0.000" bz="-0.154" width="1.181" taper="0.90" midpoint="1"/>
  <fuselage ax=" 4.472" ay=" 0.000" az="-0.154" bx=" 2.810" by=" 0.000" bz="-0.154" width="1.198" taper="0.98" midpoint="1"/>
  <fuselage ax=" 2.810" ay=" 0.000" az="-0.154" bx=" 0.788" by=" 0.000" bz="-0.058" width="1.198" taper="0.78" midpoint="0"/>
  <fuselage ax=" 0.788" ay=" 0.000" az="-0.058" bx=" 0.116" by=" 0.000" bz="-0.058" width="0.933" taper="0.40" midpoint="0"/>

  <fuselage ax=" 3.146" ay=" 2.090" az="-0.007" bx=" 2.953" by=" 2.090" bz="-0.095" width="0.500" taper="0.30" midpoint="1"/>
  <fuselage ax=" 2.953" ay=" 2.090" az="-0.095" bx=" 2.756" by=" 2.090" bz="-0.186" width="0.500" taper="0.80" midpoint="0"/>
  <fuselage ax=" 2.842" ay=" 2.090" az="-0.117" bx="-3.921" by=" 2.095" bz=" 0.022" width="0.500" taper="0.30" midpoint="0"/>

  <fuselage ax=" 3.146" ay="-2.090" az="-0.007" bx=" 2.953" by="-2.090" bz="-0.095" width="0.500" taper="0.30" midpoint="1"/>
  <fuselage ax=" 2.953" ay="-2.090" az="-0.095" bx=" 2.756" by="-2.090" bz="-0.186" width="0.500" taper="0.80" midpoint="0"/>
  <fuselage ax=" 2.842" ay="-2.090" az="-0.117" bx="-3.921" by="-2.095" bz=" 0.022" width="0.500" taper="0.30" midpoint="0"/>

  <wing x="1.909" y="0" z="1.534"
        chord="2.191"
        length="11.323"
        taper="1"
        camber="0.005">
        <stall aoa="20" width="1" peak="1.5"/>
        <flap1 start="0.67" end="1" lift="1.2" drag="1.2"/>

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

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

  <mstab x="1.909" y="0" z="-0.499"
         chord="2.191"
         length="11.323"
         taper="1">
         <stall aoa="20" width="1" peak="1.5"/>
         <flap1 start="0.67" end="1" lift="1.2" drag="1.2"/>

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

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

  <hstab x="-3.994" y="0" z="0.199"
         chord="1.648"
         length="3.943"
         taper="1">
         <stall aoa="18" width="1" peak="1.5"/>
         <flap0 start="0" end="1" lift="1.2" drag="1.2"/>

         <control-input axis="/controls/flight/elevator" control="FLAP0" effectiveness="0.3"/>
         <control-input axis="/controls/flight/elevator-trim" control="FLAP0"/>

         <control-output control="FLAP0" prop="/surface-positions/elevator-pos-norm"/>
  </hstab>

  <vstab x="-4.382" y="2.163" z="0.215"
         chord="2.231"
         length="1.303"
         taper="1">
         <stall aoa="16" width="1" peak="1.5"/>
         <flap0 start="0" end="1" lift="1.4" drag="1.2"/>

         <control-input axis="/controls/flight/rudder" control="FLAP0" invert="true"/>
         <control-input axis="/controls/flight/rudder-trim" control="FLAP0" invert="true"/>

         <control-output control="FLAP0" prop="/surface-positions/rudder-pos-norm"/>
  </vstab>

  <vstab x="-4.382" y="0" z="0.215"
         chord="2.231"
         length="1.303"
         taper="1">
         <stall aoa="16" width="1" peak="1.5"/>
         <flap0 start="0" end="1" lift="1.4" drag="1.2"/>

         <control-input axis="/controls/flight/rudder" control="FLAP0" invert="true"/>
         <control-input axis="/controls/flight/rudder-trim" control="FLAP0" invert="true"/>

         <control-output control="FLAP0" prop="/surface-positions/rudder-pos-norm"/>
  </vstab>

  <vstab x="-4.382" y="-2.163" z="0.215"
         chord="2.231"
         length="1.303"
         taper="1">
         <stall aoa="16" width="1" peak="1.5"/>
         <flap0 start="0" end="1" lift="1.4" drag="1.2"/>

         <control-input axis="/controls/flight/rudder" control="FLAP0" invert="true"/>
         <control-input axis="/controls/flight/rudder-trim" control="FLAP0" invert="true"/>

         <control-output control="FLAP0" prop="/surface-positions/rudder-pos-norm"/>
  </vstab>

  <!-- Engines

    source             : http://en.wikipedia.org/wiki/Isotta-Fraschini_V.4B

    name               : Isotta Fraschini V.4
    type               : Six-cylinder, water-cooled, in-line piston engine
    power              :  150 hp a 1800 rpm
    weight             :  264 kg ( 584 lb   )
    displacement       : 14.3 L  ( 874 in 3 )
  -->
  <!-- Moteur gauche -->
  <propeller x="2.314" y="2.090" z="0.236"
             mass="584"
             moment="15"
             radius="1.16"
             cruise-power="140"
             cruise-speed="120"
             cruise-rpm="1400"
             cruise-alt="7000"
             contra="1">
             <actionpt x="3.253" y="2.090" z="-0.007"/>
             <piston-engine eng-rpm="1800"
                            eng-power="150"
                            displacement="874">
                            <control-input axis="/controls/engines/engine[0]/throttle" control="THROTTLE"/>
                            <control-input axis="/controls/engines/engine[0]/starter" control="STARTER"/>
                            <control-input axis="/controls/engines/engine[0]/magnetos" control="MAGNETOS"/>
                            <control-input axis="/controls/engines/engine[0]/mixture" control="MIXTURE"/>
             </piston-engine>
  </propeller>

  <!-- Moteur droite -->
  <propeller x="2.314" y="-2.090" z="0.236"
             mass="584"
             moment="15"
             radius="1.16"
             cruise-power="140"
             cruise-speed="120"
             cruise-rpm="1400"
             cruise-alt="7000"
             contra="1">
             <actionpt x="3.25399" y="-2.090" z="-0.007"/>
             <piston-engine eng-rpm="1800"
                            eng-power="150"
                            displacement="874">
                            <control-input axis="/controls/engines/engine[1]/throttle" control="THROTTLE"/>
                            <control-input axis="/controls/engines/engine[1]/starter" control="STARTER"/>
                            <control-input axis="/controls/engines/engine[1]/magnetos" control="MAGNETOS"/>
                            <control-input axis="/controls/engines/engine[1]/mixture" control="MIXTURE"/>
             </piston-engine>
  </propeller>

  <!-- Moteur centrale -->
  <propeller x="0.797" y="0" z="0.325"
             mass="584"
             moment="15"
             radius="1.16"
             cruise-power="140"
             cruise-speed="120"
             cruise-rpm="1400"
             cruise-alt="7000"
             contra="-1">
             <actionpt x="0.076" y="0" z="0"/>
             <piston-engine eng-rpm="1800"
                            eng-power="150"
                            displacement="874">
                            <control-input axis="/controls/engines/engine[2]/throttle" control="THROTTLE"/>
                            <control-input axis="/controls/engines/engine[2]/starter" control="STARTER"/>
                            <control-input axis="/controls/engines/engine[2]/magnetos" control="MAGNETOS"/>
                            <control-input axis="/controls/engines/engine[2]/mixture" control="MIXTURE"/>
             </piston-engine>
  </propeller>

  <!-- Roues avants 0 -->
  <gear x="4.96293" y="0" z="-1.73879"
        compression="0.1"
        sfric="0.8"
        dfric="1"
        damp="0.8"
        stiction="1">
  </gear>

  <!-- Roues gauches 1 -->
  <gear x="2.28505" y="2.1542" z="-1.85393"
        compression="0.1"
        sfric="0.8"
        dfric="1"
        damp="0.8"
        stiction="1">
        <control-input control="BRAKE" axis="/controls/gear/brake-parking"/>
        <control-input control="BRAKE" axis="/controls/gear/brake-left"/>
        <control-input control="STEER" axis="/sim/gears/toe-left"/>
  </gear>

  <!-- Roues droites 2 -->
  <gear x="2.28505" y="-2.1542" z="-1.85393"
        compression="0.1"
        sfric="0.8"
        dfric="1"
        damp="0.8"
        stiction="1">
        <control-input control="BRAKE" axis="/controls/gear/brake-parking"/>
        <control-input control="BRAKE" axis="/controls/gear/brake-right"/>
        <control-input control="STEER" axis="/sim/gears/toe-right"/>
  </gear>

  <!-- Patte de queue gauche 3 -->
  <gear x="-4.35608" y="2.07421" z="-0.67245"
        compression="0.1"
        sfric="0.8"
        dfric="1"
        damp="0.8"
        stiction="1">
  </gear>

  <!-- Patte de queue droite 4 -->
  <gear x="-4.35608" y="-2.07421" z="-0.67245"
        compression="0.1"
        sfric="0.8"
        dfric="1"
        damp="0.8"
        stiction="1">
  </gear>

  <!-- Patte gauche d'ailes 5 -->
  <gear x="1.16479" y="10.51234" z="-1.12406"
        compression="0.1"
        sfric="0.8"
        dfric="1"
        damp="0.8"
        stiction="1">
  </gear>

  <!-- Patte droite d'ailes 6 -->
  <gear x="1.16479" y="-10.51234" z="-1.12406"
        compression="0.1"
        sfric="0.8"
        dfric="1"
        damp="0.8"
        stiction="1">
  </gear>

  <tank x=" 1.677" y=" 2.080" z="0.602" capacity="620"/>
  <tank x=" 1.492" y=" 0.683" z="0.342" capacity="620"/>
  <tank x=" 1.492" y="-0.683" z="0.342" capacity="620"/>
  <tank x=" 1.677" y="-2.080" z="0.602" capacity="620"/>

    <!-- Mass distribution
         Dilbert : The cg should be about 1/6 chord ahead of the chord center.
         2.191 / 6     = 0.365
         1.909 + 0.365 = 2.274
    -->
  <ballast x="4.6" y="0" z="-0.6" mass="1510"/>

</airplane>
