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

<!-- Aquila A 210 - Emmanuel BARANGER - 11/2024

     sources            : https://www.wikiwand.com/en/articles/Aquila_A_210

     Wingspan           : 10.30 m    (   33 ft 10 in ) excluding winglets
     lenght             :  7.30 m    (   23 ft 11 in )
     height             :  2.30 m    (    7 ft  7 in )
     Empty mass         :   500 kg   ( 1102 lb       )
     Max takeoff weight :   750 kg   ( 1653 lb       )
     Engine             : 1 Rotax 912 S3 flat four air and water cooled piston ( 98.6 hp )
     Maximum speed      :   241 km/h (  130 kn       )
     Cruise speed       :   191 km/h (  103 kn       ) at 55% power
     Stall speed        :    80 km/h ( , 43 kn       ) flaps down
     Propellers         : 2-bladed MT-Propeller MTV-21-A/175-05 hydraulically variable pitch, 1.66 m ( 5 ft 5 in ) diameter
     Fuel quantity      : 2x60 lts == 2x15.85 US Gal
-->
<airplane mass="1102" version="YASIM_VERSION_CURRENT" mtow-kg="1653">

  <!-- Approach configuration -->
  <approach speed="43" aoa="2" fuel="0.2">
    <control-setting axis="/controls/engines/engine[0]/throttle"        value="0.2"/>
    <control-setting axis="/controls/engines/engine[0]/mixture"         value="1.0"/>
    <control-setting axis="/controls/engines/engine[0]/propeller-pitch" value="1.0"/>

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

  <!-- Cruise configuration -->
  <cruise speed="103" alt="5000" fuel="1.0">
    <control-setting axis="/controls/engines/engine[0]/throttle"        value="0.75"/>
    <control-setting axis="/controls/engines/engine[0]/mixture"         value="0.80"/>
    <control-setting axis="/controls/engines/engine[0]/propeller-pitch" value="0.50"/>

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

  <cockpit x="1.267" y="0.240" z="0.407"/>

  <!-- Bol d'hélice -->
  <fuselage ax=" 3.652" ay=" 0.000" az=" 0.002" bx=" 3.586" by=" 0.000" bz=" 0.002" width="0.089" taper="0.10" midpoint="1"/>
  <fuselage ax=" 3.586" ay=" 0.000" az=" 0.002" bx=" 3.474" by=" 0.000" bz=" 0.002" width="0.207" taper="0.44" midpoint="1"/>
  <fuselage ax=" 3.474" ay=" 0.000" az=" 0.002" bx=" 3.332" by=" 0.000" bz=" 0.002" width="0.304" taper="0.68" midpoint="1"/>

  <!-- Up left side -->
  <fuselage ax=" 3.292" ay=" 0.072" az=" 0.050" bx=" 3.121" by=" 0.158" bz=" 0.033" width="0.351" taper="0.50" midpoint="1"/>
  <fuselage ax=" 3.170" ay=" 0.155" az=" 0.045" bx=" 2.946" by=" 0.178" bz=" 0.017" width="0.430" taper="0.72" midpoint="1"/>
  <fuselage ax=" 2.946" ay=" 0.175" az=" 0.017" bx=" 2.174" by=" 0.217" bz="-0.016" width="0.622" taper="0.70" midpoint="1"/>
  <fuselage ax=" 2.174" ay=" 0.217" az="-0.016" bx=" 1.838" by=" 0.217" bz="-0.016" width="0.740" taper="0.84" midpoint="1"/>
  <fuselage ax=" 1.838" ay=" 0.217" az="-0.016" bx=" 0.915" by=" 0.217" bz="-0.016" width="0.740" taper="1.00" midpoint="1"/>
  <fuselage ax=" 0.967" ay=" 0.217" az="-0.016" bx=" 0.295" by=" 0.119" bz="-0.016" width="0.740" taper="0.84" midpoint="0"/>
  <fuselage ax=" 0.295" ay=" 0.119" az="-0.016" bx="-0.397" by=" 0.055" bz="-0.031" width="0.622" taper="0.80" midpoint="0"/>
  <fuselage ax="-0.397" ay=" 0.055" az="-0.031" bx="-3.462" by=" 0.000" bz="-0.104" width="0.494" taper="0.10" midpoint="0"/>

  <!-- Down left side -->
  <fuselage ax=" 3.292" ay=" 0.072" az="-0.104" bx=" 3.121" by=" 0.158" bz="-0.121" width="0.351" taper="0.50" midpoint="1"/>
  <fuselage ax=" 3.170" ay=" 0.155" az="-0.109" bx=" 2.946" by=" 0.178" bz="-0.137" width="0.430" taper="0.72" midpoint="1"/>
  <fuselage ax=" 2.946" ay=" 0.175" az="-0.137" bx=" 2.174" by=" 0.217" bz="-0.170" width="0.622" taper="0.70" midpoint="1"/>
  <fuselage ax=" 2.174" ay=" 0.217" az="-0.170" bx=" 1.838" by=" 0.217" bz="-0.170" width="0.740" taper="0.84" midpoint="1"/>
  <fuselage ax=" 1.838" ay=" 0.217" az="-0.170" bx=" 0.915" by=" 0.217" bz="-0.170" width="0.740" taper="1.00" midpoint="1"/>
  <fuselage ax=" 0.967" ay=" 0.217" az="-0.170" bx=" 0.295" by=" 0.119" bz="-0.170" width="0.740" taper="0.84" midpoint="0"/>
  <fuselage ax=" 0.295" ay=" 0.119" az="-0.170" bx="-0.397" by=" 0.055" bz="-0.124" width="0.622" taper="0.80" midpoint="0"/>
  <fuselage ax="-0.397" ay=" 0.055" az="-0.124" bx="-3.462" by=" 0.000" bz="-0.109" width="0.494" taper="0.10" midpoint="0"/>

  <!-- Up right side -->
  <fuselage ax=" 3.292" ay="-0.072" az=" 0.050" bx=" 3.121" by="-0.158" bz=" 0.033" width="0.351" taper="0.50" midpoint="1"/>
  <fuselage ax=" 3.170" ay="-0.155" az=" 0.045" bx=" 2.946" by="-0.178" bz=" 0.017" width="0.430" taper="0.72" midpoint="1"/>
  <fuselage ax=" 2.946" ay="-0.175" az=" 0.017" bx=" 2.174" by="-0.217" bz="-0.016" width="0.622" taper="0.70" midpoint="1"/>
  <fuselage ax=" 2.174" ay="-0.217" az="-0.016" bx=" 1.838" by="-0.217" bz="-0.016" width="0.740" taper="0.84" midpoint="1"/>
  <fuselage ax=" 1.838" ay="-0.217" az="-0.016" bx=" 0.915" by="-0.217" bz="-0.016" width="0.740" taper="1.00" midpoint="1"/>
  <fuselage ax=" 0.967" ay="-0.217" az="-0.016" bx=" 0.295" by="-0.119" bz="-0.016" width="0.740" taper="0.84" midpoint="0"/>
  <fuselage ax=" 0.295" ay="-0.119" az="-0.016" bx="-0.397" by="-0.055" bz="-0.031" width="0.622" taper="0.80" midpoint="0"/>
  <fuselage ax="-0.397" ay="-0.055" az="-0.031" bx="-3.462" by="-0.000" bz="-0.104" width="0.494" taper="0.10" midpoint="0"/>

  <!-- Down right side -->
  <fuselage ax=" 3.292" ay="-0.072" az="-0.104" bx=" 3.121" by="-0.158" bz="-0.121" width="0.351" taper="0.50" midpoint="1"/>
  <fuselage ax=" 3.170" ay="-0.155" az="-0.109" bx=" 2.946" by="-0.178" bz="-0.137" width="0.430" taper="0.72" midpoint="1"/>
  <fuselage ax=" 2.946" ay="-0.175" az="-0.137" bx=" 2.174" by="-0.217" bz="-0.170" width="0.622" taper="0.70" midpoint="1"/>
  <fuselage ax=" 2.174" ay="-0.217" az="-0.170" bx=" 1.838" by="-0.217" bz="-0.170" width="0.740" taper="0.84" midpoint="1"/>
  <fuselage ax=" 1.838" ay="-0.217" az="-0.170" bx=" 0.915" by="-0.217" bz="-0.170" width="0.740" taper="1.00" midpoint="1"/>
  <fuselage ax=" 0.967" ay="-0.217" az="-0.170" bx=" 0.295" by="-0.119" bz="-0.170" width="0.740" taper="0.84" midpoint="0"/>
  <fuselage ax=" 0.295" ay="-0.119" az="-0.170" bx="-0.397" by="-0.055" bz="-0.124" width="0.622" taper="0.80" midpoint="0"/>
  <fuselage ax="-0.397" ay="-0.055" az="-0.124" bx="-3.462" by="-0.000" bz="-0.109" width="0.494" taper="0.10" midpoint="0"/>

  <!-- cabin Left -->
  <fuselage ax=" 2.121" ay=" 0.170" az=" 0.049" bx=" 1.575" by=" 0.170" bz=" 0.156" width="0.824" taper="0.60" midpoint="1"/>
  <fuselage ax=" 1.575" ay=" 0.170" az=" 0.156" bx=" 0.936" by=" 0.170" bz=" 0.294" width="0.824" taper="0.80" midpoint="0"/>
  <fuselage ax=" 1.063" ay=" 0.170" az=" 0.274" bx="-0.129" by=" 0.170" bz=" 0.068" width="0.705" taper="0.50" midpoint="0"/>

  <!-- cabin Right -->
  <fuselage ax=" 2.121" ay="-0.170" az=" 0.049" bx=" 1.575" by="-0.170" bz=" 0.156" width="0.824" taper="0.60" midpoint="1"/>
  <fuselage ax=" 1.575" ay="-0.170" az=" 0.156" bx=" 0.936" by="-0.170" bz=" 0.294" width="0.824" taper="0.80" midpoint="0"/>
  <fuselage ax=" 1.063" ay="-0.170" az=" 0.274" bx="-0.129" by="-0.170" bz=" 0.068" width="0.705" taper="0.50" midpoint="0"/>

  <wing x="1.219" y="0" z="-0.44"
        chord     = "1.219"
        length    = "3.298"
        taper     = "0.88"
        dihedral  = "3"
        incidence = "1"
        sweep     = "-0.5"
        camber    = "0.005">
        <stall   aoa="18" width="1" peak="1.5"/>
        <flap0 start="0.17" end="1" lift="1.2" drag="1.6"/>

        <control-input  control="FLAP0" axis="/controls/flight/flaps"/>

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

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

  <wing x="1.244" y="3.293" z="-0.266"
        append="1"
        chord="1.072"
        length="1.160"
        taper="0.72"
        dihedral="4"
        incidence="1"
        sweep="6">
        <stall   aoa="18" width="1" peak="1.5"/>
        <flap1 start="0"    end="1" lift="1.2" drag="1.2"/>

        <control-input  control="FLAP1" axis="/controls/flight/aileron"      split="true"/>
        <control-input  control="FLAP1" axis="/controls/flight/aileron-trim" 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"/>

        <control-speed  control="FLAP1" transition-time="0.01"/>
  </wing>

  <wing x="1.121" y="4.443" z="-0.187"
        append    = "1"
        chord     = "0.771"
        length    = "0.760"
        taper     = "0.44"
        dihedral  = "4"
        incidence = "1"
        sweep     = "16">
        <stall   aoa="18" width="1"   peak="1.5"/>
        <flap1 start="0"    end="0.8" lift="1.2" drag="1.2"/>

        <control-input  control="FLAP1" axis="/controls/flight/aileron"      split="true"/>
        <control-input  control="FLAP1" axis="/controls/flight/aileron-trim" 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"/>

        <control-speed  control="FLAP1" transition-time="0.01"/>
  </wing>

  <wing x="0.910" y="5.171" z="-0.139"
        append   = "1"
        chord    = "0.339"
        length   = "0.36"
        taper    = "0.34"
        dihedral = "80"
        sweep    = "34">
        <stall   aoa="18" width="1"    peak="1.5"/>
  </wing>

  <hstab x="-2.857" y="0" z="0.130"
        chord  = "0.817"
        length = "1.502"
        taper  = "0.70"
        sweep  = "2">
        <stall   aoa="16" 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="-2.725" y="0" z="-0.086"
        chord  = "1.441"
        length = "1.380"
        taper  = "0.40"
        sweep  = "26">
        <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/rudder"      invert="true"/>
        <control-input  control="FLAP0" axis="/controls/flight/rudder-trim" invert="true"/>

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

  <!--  Rotax 912

                source       : https://www.wikiwand.com/en/articles/Rotax_912

                Type         : four-cylinder, four-stroke liquid / air-cooled engine with opposed cylinders
                Power output :  100  hp at 5800 rpm
                weight       :  60    kg  ( 132.3 lb  )
                Displacement : 1211.2 cm3 ( 73.91 in3 )
                Compression  : 9:1
  -->
  <propeller x="2.915" y="0.0" z="0.003"
             mass          = "132.3"
             radius        = "0.839"
             moment        = "5"
             cruise-power  = "85"
             cruise-rpm    = "5600"
             cruise-speed  = "103"
             cruise-alt    = "5000"
             takeoff-power = "100"
             takeoff-rpm   = "5800">
             <actionpt x="3.420" y="0.0" z="0.003" />
             <control-input control="ADVANCE" axis="/controls/engines/engine[0]/propeller-pitch"/>
             <piston-engine eng-power    = "100"
                            eng-rpm      = "5800"
                            displacement = "73.91"
                            compression  = "9">
                            <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>

  <gear x="2.716" y="0" z="-1.141"
        compression = "0.15"
        spring      = "2"
        damp        = "0.8"
        stiction    = "1">
        <control-input  control="STEER"     axis="/controls/flight/rudder"       square="false"/>
        <control-input  control="CASTERING" axis="/controls/gear/tailwheel-lock" src0="0" src1="1" dst0="1" dst1="0"/>
  </gear>

  <gear x="1.066" y="0.952" z="-1.140"
        compression = "0.1"
        spring      = "2"
        damp        = "0.8"
        stiction    = "1">
        <control-input  control="BRAKE"  axis="/controls/gear/brake-left"    split="true"/>
        <control-input  control="BRAKE"  axis="/controls/gear/brake-parking" split="true"/>
  </gear>

  <gear x="1.066" y="-0.952" z="-1.140"
        compression = "0.1"
        spring      = "2"
        damp        = "0.8"
        stiction    = "1">
        <control-input  control="BRAKE"  axis="/controls/gear/brake-left"    split="true"/>
        <control-input  control="BRAKE"  axis="/controls/gear/brake-parking" split="true"/>
  </gear>

  <!-- Fuel 2x 60 l == 15.85 Gal us == 95.1 lbs -->
  <tank x="1.264" y=" 1.829" z="-0.372" capacity="95.1"/>

  <tank x="1.264" y="-1.829" z="-0.372" capacity="95.1"/>

  <!-- Mass distribution
       Dilbert : The cg should be about 1/6 chord ahead of the chord center.
                 1.219 / 6     = 0.203
                 1.219 + 0.203 = 1.422
  -->
  <ballast x="2.6" y="0" z="0.35" mass="318.5"/>

</airplane>
