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

<!--  Dewoitine D.510 : Emmanuel BARANGER           2010
              updated : Emmanuel BARANGER September 2013
              updated : Emmanuel BARANGER October   2021

     sources          : http://en.wikipedia.org/wiki/Dewoitine_D.500

     wingspan         : 12.092 m   (   39 ft 8 in  )
     length           :  7.718 m   (   26 ft 1 in  )
     height           :  2.42 m    (    7 ft 11 in )
     empty weight     :  1496 kg   ( 3298 lb       )
     Gross weight     :  1929 kg   ( 4253 lb       )
     engine           : Hispano-Suiza 12Ycrs V12 engine, ( 860 hp at 16405 ft)
     max speed        :   402 km/h (  217 kt       )
-->
<airplane mass="3298" version="YASIM_VERSION_CURRENT" mtow-lbs="4253">

  <approach speed="80" aoa="6" >
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.05"/>
    <control-setting axis="/controls/engines/engine[0]/mixture"  value="1"/>
    <control-setting axis="/controls/flight/spoiler"             value="1"/>
  </approach>

  <cruise speed="195" alt="5000" >
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.8"/>
    <control-setting axis="/controls/engines/engine[0]/mixture"  value="0.8"/>
    <control-setting axis="/controls/flight/spoiler"             value="1"/>
  </cruise>

  <cockpit x="0.744" y="0" z="0.870"/>

  <!-- bol -->
  <fuselage ax=" 3.887" ay=" 0.000" az=" 0.304" bx=" 3.800" by=" 0.000" bz=" 0.304" width="0.185" taper="0.10" midpoint="1"/>
  <fuselage ax=" 3.800" ay=" 0.000" az=" 0.304" bx=" 3.713" by=" 0.000" bz=" 0.304" width="0.277" taper="0.68" midpoint="1"/>
  <fuselage ax=" 3.713" ay=" 0.000" az=" 0.304" bx=" 3.625" by=" 0.000" bz=" 0.304" width="0.326" taper="0.85" midpoint="1"/>
  <fuselage ax=" 3.625" ay=" 0.000" az=" 0.304" bx=" 3.538" by=" 0.000" bz=" 0.304" width="0.326" taper="1.00" midpoint="1"/>

  <!-- Cockpit -->
  <fuselage ax=" 2.348" ay=" 0.000" az=" 0.348" bx=" 0.928" by=" 0.000" bz=" 0.348" width="0.880" taper="0.72" midpoint="1"/>
  <fuselage ax=" 0.339" ay=" 0.000" az=" 0.485" bx="-0.246" by=" 0.000" bz=" 0.450" width="0.880" taper="0.80" midpoint="0"/>
  <fuselage ax="-0.246" ay=" 0.000" az=" 0.450" bx="-3.194" by=" 0.000" bz=" 0.540" width="0.704" taper="0.20" midpoint="0"/>

  <!-- Bossages -->
  <fuselage ax=" 3.339" ay=" 0.316" az=" 0.501" bx=" 3.250" by=" 0.316" bz=" 0.501" width="0.277" taper="0.68" midpoint="1"/>
  <fuselage ax=" 3.250" ay=" 0.316" az=" 0.501" bx=" 0.969" by=" 0.316" bz=" 0.501" width="0.277" taper="0.60" midpoint="0"/>

  <fuselage ax=" 3.339" ay="-0.316" az=" 0.501" bx=" 3.250" by="-0.316" bz=" 0.501" width="0.277" taper="0.68" midpoint="1"/>
  <fuselage ax=" 3.250" ay="-0.316" az=" 0.501" bx=" 0.969" by="-0.316" bz=" 0.501" width="0.277" taper="0.60" midpoint="0"/>

  <!-- Fuselage up -->
  <fuselage ax=" 3.538" ay=" 0.000" az=" 0.304" bx=" 3.429" by=" 0.000" bz=" 0.304" width="0.482" taper="0.80" midpoint="1"/>
  <fuselage ax=" 3.429" ay=" 0.000" az=" 0.304" bx=" 3.304" by=" 0.000" bz=" 0.304" width="0.566" taper="0.85" midpoint="1"/>
  <fuselage ax=" 3.304" ay=" 0.000" az=" 0.227" bx=" 2.853" by=" 0.000" bz=" 0.227" width="0.786" taper="0.91" midpoint="1"/>
  <fuselage ax=" 2.853" ay=" 0.000" az=" 0.224" bx=" 2.352" by=" 0.000" bz=" 0.224" width="0.880" taper="0.90" midpoint="1"/>
  <fuselage ax=" 2.352" ay=" 0.000" az=" 0.224" bx=" 0.350" by=" 0.000" bz=" 0.224" width="0.880" taper="1.00" midpoint="1"/>
  <fuselage ax=" 0.350" ay=" 0.000" az=" 0.224" bx="-3.194" by=" 0.000" bz=" 0.351" width="0.880" taper="0.20" midpoint="0"/>

  <!-- Fuselage down -->
  <fuselage ax=" 3.538" ay=" 0.000" az=" 0.134" bx=" 3.429" by=" 0.000" bz=" 0.134" width="0.482" taper="0.80" midpoint="1"/>
  <fuselage ax=" 3.429" ay=" 0.000" az=" 0.047" bx=" 3.304" by=" 0.000" bz=" 0.047" width="0.566" taper="0.85" midpoint="1"/>
  <fuselage ax=" 3.304" ay=" 0.000" az=" 0.047" bx=" 2.853" by=" 0.000" bz=" 0.047" width="0.786" taper="0.72" midpoint="1"/>
  <fuselage ax=" 2.853" ay=" 0.000" az=" 0.047" bx=" 2.352" by=" 0.000" bz=" 0.024" width="0.880" taper="0.90" midpoint="1"/>
  <fuselage ax=" 2.352" ay=" 0.000" az=" 0.024" bx=" 0.350" by=" 0.000" bz=" 0.024" width="0.880" taper="1.00" midpoint="1"/>
  <fuselage ax=" 0.350" ay=" 0.000" az=" 0.024" bx="-3.194" by=" 0.000" bz=" 0.172" width="0.880" taper="0.20" midpoint="0"/>

  <wing x="1.289" y="0" z="-0.195"
        chord    = "1.825"
        length   = "6.038"
        taper    = "0.60"
        dihedral = "2"
        sweep    = "-2"
        camber   = "0.02">
        <stall   aoa="20" width="1" peak="1.5"/>
        <flap0 start="0.2"  end="1" lift="1.2" drag="1.2"/>

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

  <hstab x="-2.910" y="0" z="0.612"
         chord  = "1.110"
         length = "1.788"
         taper  = "0.38"
         sweep  = "3">
         <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="-2.678" y="0" z="0.059"
         chord  = "2.319"
         length = "1.807"
         taper  = "0.26"
         sweep  = "22">
         <stall   aoa="16" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.5" drag="1.2"/>

         <control-input  control="FLAP0" axis="/controls/flight/rudder"      invert="true" square="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>

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

                 name              : Hispano-Suiza 12Y
                 type              : Twelve-cylinder supercharged liquid-cooled 60° V12 engine
                 power cruise      : 860 hp at 2400 rpm at 16405 ft
                 weight            :    465 kg  (1025 lb)
                 displacement      : 2199.9 in3 (36.05 l)
                 compression       : 5.8:1
  -->
  <propeller x="2.605" y="0.0" z="0.327"
             mass          = "1025"
             moment        = "10"
             radius        = "1.45"
             cruise-speed  = "195"
             cruise-alt    = "5000"
             cruise-power  = "780"
             cruise-rpm    = "2000"
             takeoff-power = "651"
             takeoff-rpm   = "2600">
             <actionpt x="3.63242" y="0" z="0.33068"/>
             <piston-engine eng-power    = "860"
                            eng-rpm      = "2400"
                            displacement = "2199"
                            compression  = "5.8">
                            <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 main -->
  <gear x="2.050" y="1.684" z="-1.774"
        compression = "0.20"
        spring      = "2"
        damp        = "1"
        stiction    = "1">
        <control-input control="BRAKE" axis="/controls/gear/brake-left"/>
        <control-input control="BRAKE" axis="/controls/gear/brake-parking"/>
        <control-input control="STEER" axis="/sim/gears/toe-left"/>
  </gear>

  <!-- right main -->
  <gear x="2.050" y="-1.684" z="-1.774"
        compression = "0.20"
        spring      = "2"
        damp        = "1"
        stiction    = "1">
        <control-input control="BRAKE" axis="/controls/gear/brake-right"/>
        <control-input control="BRAKE" axis="/controls/gear/brake-parking"/>
        <control-input control="STEER" axis="/sim/gears/toe-right"/>
  </gear>

  <!-- Tail wheel -->
  <gear x="-3.218" y="0" z="-0.227"
        compression = "0.10"
        spring      = "2"
        castering   = "0"
        stiction    = "1">
  </gear>

  <!-- Fuel  -->
  <tank x="1.280" y=" 1.700" z="-0.270" capacity="217"/>
  <tank x="2.250" y=" 0.000" z="-0.330" capacity="260"/>
  <tank x="1.280" y="-1.700" z="-0.270" capacity="217"/>

  <!-- Mass distribution
       Dilbert : The cg should be about 1/6 chord ahead of the chord center.
                 1.825 / 6     = 0.304
                 1.289 + 0.304 = 1.593
  -->
  <ballast x="3.500" y="0" z="-0.4" mass="400"/>

</airplane>
