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

<!-- BOMBARDIER 415 (or CANADAIR CL 415) :    2008 BARANGER Emmanuel
          Updated with Melchior's script :    2013 BARANGER Emmanuel
          Updated                        :    2015 BARANGER Emmanuel
          Updated                        : 07/2020 BARANGER Emmanuel
          Updated                        : 07/2024 BARANGER Emmanuel

     Source       : https://www.wikiwand.com/en/Bombardier_415

     wingspan     : 28.63 m    (    93 ft 10 in )
     length       : 19.82 m    (    65 ft       )
     height       :  8.98 m    (    29 ft       )
     Moteurs      : 2 turboprops Pratt & Whitney PW 123 AF, 2380 hp each
     Empty weight : 14015 kg   ( 30000 lb       )
     Max weight   : 21319 kg   ( 47000 lb       ) Maximum After-scooping Weight
     Fuel capacity:  4650 kg   ( 10250 lb       )
     Cruise speed :   333 km/h (   180 kn       )
     Max.   speed :   359 km/h (   194 kn       )
     Stall  speed :   126 km/h (    68 kn       )
     Capacity     :  6137 l    ( 13529.7 lb     ) in 4 water tank for waterbombing
-->
<airplane mass="30000" version="YASIM_VERSION_CURRENT" mtow-lbs="47000">

  <approach speed="68" aoa="4" fuel="0.2">
    <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[0]/propeller-pitch" value="0.5"/>
    <control-setting axis="/controls/engines/engine[0]/boost"           value="0.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[1]/propeller-pitch" value="0.5"/>
    <control-setting axis="/controls/engines/engine[1]/boost"           value="0.1"/>

    <control-setting axis="/controls/gear/gear-down"                    value="1"/>

    <solve-weight idx="0"                                               weight="0"/>
    <solve-weight idx="1"                                               weight="0"/>
    <solve-weight idx="2"                                               weight="0"/>
    <solve-weight idx="3"                                               weight="0"/>
  </approach>

  <cruise speed="180" alt="7600" fuel="0.8">
    <control-setting axis="/controls/engines/engine[0]/throttle"        value="0.7"/>
    <control-setting axis="/controls/engines/engine[0]/mixture"         value="0.7"/>
    <control-setting axis="/controls/engines/engine[0]/propeller-pitch" value="1"/>
    <control-setting axis="/controls/engines/engine[0]/boost"           value="0.7"/>

    <control-setting axis="/controls/engines/engine[1]/throttle"        value="0.7"/>
    <control-setting axis="/controls/engines/engine[1]/mixture"         value="0.7"/>
    <control-setting axis="/controls/engines/engine[1]/propeller-pitch" value="1"/>
    <control-setting axis="/controls/engines/engine[1]/boost"           value="0.7"/>

    <control-setting axis="/controls/gear/gear-down"                    value="0"/>

    <solve-weight idx="0"                                               weight="0"/>
    <solve-weight idx="1"                                               weight="0"/>
    <solve-weight idx="2"                                               weight="0"/>
    <solve-weight idx="3"                                               weight="0"/>
  </cruise>

  <cockpit x="7.079" y="0.536" z="-1.013"/>

  <!-- Cabine -->
  <fuselage ax=" 8.491" ay="  0.000" az="-1.539" bx=" 7.983" by="  0.000" bz="-1.538" width="1.745" taper="0.20" midpoint="1"/>
  <fuselage ax=" 7.983" ay="  0.000" az="-1.538" bx="-2.422" by="  0.000" bz="-1.523" width="1.745" taper="1.00" midpoint="1"/>
  <fuselage ax="-2.422" ay="  0.000" az="-1.523" bx="-9.463" by="  0.000" bz="-1.538" width="1.745" taper="0.20" midpoint="0"/>

  <!-- Fuselage -->
  <fuselage ax=" 9.908" ay="  0.000" az="-2.354" bx=" 9.622" by="  0.000" bz="-2.370" width="0.983" taper="0.20" midpoint="1"/>
  <fuselage ax=" 9.622" ay="  0.000" az="-2.370" bx=" 8.456" by="  0.000" bz="-2.415" width="2.149" taper="0.45" midpoint="1"/>
  <fuselage ax=" 8.456" ay="  0.000" az="-2.415" bx="-0.012" by="  0.000" bz="-2.415" width="2.149" taper="1.00" midpoint="1"/>
  <fuselage ax="-0.012" ay="  0.000" az="-2.415" bx="-9.463" by="  0.000" bz="-2.415" width="2.149" taper="0.20" midpoint="0"/>

  <!-- Engines -->
  <fuselage ax=" 5.109" ay="  3.409" az=" 0.261" bx=" 4.799" by="  3.408" bz=" 0.261" width="0.960" taper="0.60" midpoint="1"/>
  <fuselage ax=" 4.799" ay="  3.408" az=" 0.261" bx=" 2.136" by="  3.408" bz=" 0.261" width="0.960" taper="1.00" midpoint="1"/>
  <fuselage ax=" 2.222" ay="  3.408" az=" 0.261" bx=" 0.119" by="  3.408" bz="-0.112" width="0.960" taper="0.30" midpoint="0"/>
  <fuselage ax=" 4.949" ay="  3.408" az="-0.306" bx=" 2.136" by="  3.408" bz="-0.306" width="0.960" taper="1.00" midpoint="1"/>
  <fuselage ax=" 2.136" ay="  3.408" az="-0.306" bx=" 0.119" by="  3.408" bz="-0.112" width="0.960" taper="0.30" midpoint="0"/>

  <!-- Left float -->
  <fuselage ax=" 3.425" ay=" 13.214" az="-1.848" bx=" 2.802" by=" 13.214" bz="-1.964" width="0.746" taper="0.50" midpoint="1"/>
  <fuselage ax=" 2.802" ay=" 13.214" az="-1.964" bx=" 2.009" by=" 13.214" bz="-2.066" width="0.868" taper="0.86" midpoint="1"/>
  <fuselage ax=" 2.009" ay=" 13.214" az="-2.066" bx=" 1.217" by=" 13.214" bz="-2.157" width="0.868" taper="0.80" midpoint="0"/>
  <fuselage ax=" 1.217" ay=" 13.214" az="-2.157" bx=" 0.452" by=" 13.214" bz="-2.257" width="0.692" taper="0.40" midpoint="0"/>

  <!-- Floats -->
  <fuselage ax=" 5.109" ay=" -3.409" az=" 0.261" bx=" 4.799" by=" -3.408" bz=" 0.261" width="0.960" taper="0.60" midpoint="1"/>
  <fuselage ax=" 4.799" ay=" -3.408" az=" 0.261" bx=" 2.136" by=" -3.408" bz=" 0.261" width="0.960" taper="1.00" midpoint="1"/>
  <fuselage ax=" 2.222" ay=" -3.408" az=" 0.261" bx=" 0.119" by=" -3.408" bz="-0.112" width="0.960" taper="0.30" midpoint="0"/>
  <fuselage ax=" 4.949" ay=" -3.408" az="-0.306" bx=" 2.136" by=" -3.408" bz="-0.306" width="0.960" taper="1.00" midpoint="1"/>
  <fuselage ax=" 2.136" ay=" -3.408" az="-0.306" bx=" 0.119" by=" -3.408" bz="-0.112" width="0.960" taper="0.30" midpoint="0"/>

  <!-- Right float -->
  <fuselage ax=" 3.425" ay="-13.214" az="-1.848" bx=" 2.802" by="-13.214" bz="-1.964" width="0.746" taper="0.50" midpoint="1"/>
  <fuselage ax=" 2.802" ay="-13.214" az="-1.964" bx=" 2.009" by="-13.214" bz="-2.066" width="0.868" taper="0.86" midpoint="1"/>
  <fuselage ax=" 2.009" ay="-13.214" az="-2.066" bx=" 1.217" by="-13.214" bz="-2.157" width="0.868" taper="0.80" midpoint="0"/>
  <fuselage ax=" 1.217" ay="-13.214" az="-2.157" bx=" 0.452" by="-13.214" bz="-2.257" width="0.692" taper="0.40" midpoint="0"/>

  <wing x="1.376" y="0" z="-0.505"
        chord  = "3.530"
        length = "13.969"
        taper  = "1"
        camber = "0.005">
        <stall   aoa="20" width="1"     peak="1.5"/>
        <flap0 start="0.10" end="0.650" lift="1.4" drag="1.4"/>
        <flap1 start="0.65" end="0.979" lift="1.2" drag="1.2"/>

        <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-output control="FLAP0" prop="/surface-positions/flap-pos-norm"/>
        <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="FLAP0" transition-time="5"/>
  </wing>

  <wing x="1.376" y="13.969" z="-0.505"
        append   = "1"
        chord    = "3.530"
        length   = "1.280"
        dihedral = "70"
        sweep    = "-24"
        taper    = "0.4">
        <stall aoa="20" width="1" peak="1.5"/>
  </wing>

  <hstab x="-7.610" y="0" z="1.012"
         chord  = "2.739"
         length = "5.154"
         taper  = "1">
         <stall   aoa="18" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.4" 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="-7.080" y="0" z="-0.590"
         chord  = "4.646"
         length = "5.2"
         taper  = "0.42"
         sweep  = "21">
         <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>

  <vstab x="-6.76016" y="2.10568" z="1.03015"
         chord  = "1.984"
         length = "1.6"
         taper  = "0.52"
         sweep  = "40"
         twist  = "-5">
         <stall aoa="16" width="1" peak="1.5"/>
  </vstab>

  <vstab x="-6.76016" y="-2.10568" z="1.03015"
         chord  = "1.984"
         length = "1.6"
         taper  = "0.52"
         sweep  = "40"
         twist  = "-5">
         <stall aoa="16" width="1" peak="1.5"/>
  </vstab>

  <vstab x="-6.76016" y="2.10568" z="1.03015"
         chord    = "1.984"
         length   = "1.6"
         taper    = "0.52"
         dihedral = "-90"
         sweep    = "40"
         twist    = "5">
         <stall aoa="16" width="1" peak="1.5"/>
  </vstab>

  <vstab x="-6.76016" y="-2.10568" z="1.03015"
         chord    = "1.984"
         length   = "1.6"
         taper    = "0.52"
         dihedral = "-90"
         sweep    = "40"
         twist    = "5">
         <stall aoa="16" width="1" peak="1.5"/>
  </vstab>

  <!-- Engines   sources           : http://en.wikipedia.org/wiki/Pratt_%26_Whitney_Canada_PW100

                 name              : Pratt & Whitney Canada PW100
                 type              : Turboprop
                 Maximum power     : 2476 hp at 2400 rpm
                 weight            : 1062 lbs
                 max. ITT          : 816°C
  -->
  <propeller x="3.296" y="3.410" z="-0.048"
             mass         = "1064"
             moment       = "5"
             radius       = "2.05"
             cruise-speed = "176"
             cruise-rpm   = "2000"
             cruise-power = "2200"
             cruise-alt   = "7600">
             <actionpt x="5.311" y="3.410" z="0.262"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[0]/propeller-pitch"/>
             <turbine-engine eng-power    = "2476"
                             eng-rpm      = "2400"
                             alt          = "8000"
                             flat-rating  = "2200"
                             n2-low-idle  = "70"
                             n2-high-idle = "65"
                             n2-max       = "100"
                             bsfc         = "0.35">
                             <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="BOOST"    axis="/controls/engines/engine[0]/boost"/>
             </turbine-engine>
  </propeller>

  <propeller x="3.296" y="-3.410" z="-0.048"
             mass         = "1064"
             moment       = "5"
             radius       = "2.05"
             cruise-speed = "176"
             cruise-rpm   = "2000"
             cruise-power = "2200"
             cruise-alt   = "7600">
             <actionpt x="5.311" y="-3.410" z="0.262"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[1]/propeller-pitch"/>
             <turbine-engine eng-power    = "2476"
                             eng-rpm      = "2400"
                             alt          = "8000"
                             flat-rating  = "2200"
                             n2-low-idle  = "70"
                             n2-high-idle = "65"
                             n2-max       = "100"
                             bsfc         = "0.35">
                             <control-input control="THROTTLE" axis="/controls/engines/engine[1]/throttle"/>
                             <control-input control="STARTER"  axis="/controls/engines/engine[1]/starter"/>
                             <control-input control="MAGNETOS" axis="/controls/engines/engine[1]/magnetos"/>
                             <control-input control="BOOST"    axis="/controls/engines/engine[1]/boost"/>
             </turbine-engine>
  </propeller>

  <!-- 0 Roue du nez -->
  <gear x="8.260" y="0.0" z="-4.462"
        compression = "0.1"
        on-water    = "0"
        on-solid    = "1"
        spring      = "2"
        stiction    = "1">
        <control-input  control="STEER"  axis="/controls/flight/rudder" src0="-1" src1="1" dst0="-0.8" dst1="0.8"/>
        <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="5"/>
  </gear>

  <!-- 1 Roue gauche -->
  <gear x="1.120" y="2.480" z="-4.460"
        compression = "0.2"
        on-water    = "0"
        on-solid    = "1"
        spring      = "2"
        stiction    = "1">
        <control-input  control="BRAKE"  axis="/controls/gear/brake-parking"/>
        <control-input  control="BRAKE"  axis="/controls/gear/brake-left"/>
        <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>

  <!-- 2 Roue droite -->
  <gear x="1.120" y="-2.480" z="-4.460"
        compression = "0.2"
        on-water    = "0"
        on-solid    = "1"
        spring      = "2"
        stiction    = "1">
        <control-input  control="BRAKE"  axis="/controls/gear/brake-parking"/>
        <control-input  control="BRAKE"  axis="/controls/gear/brake-right"/>
        <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>

  <!-- Fuselage -->
  <gear x="9.830" y="0" z="-3.600"
        compression                  = "1.1"
        spring                       = "15"
        damp                         = "8"
        sfric                        = "0.4"
        dfric                        = "0.3"
        on-water                     = "1"
        on-solid                     = "1"
        reduce-friction-by-extension = "1.0"
        speed-planing                = "25"
        spring-factor-not-planing    = "0.2">
  </gear>

  <!-- 4 Centre -->
  <gear x="1.450" y="0" z="-4.200"
        compression                  = "1.5"
        spring                       = "6"
        damp                         = "8"
        sfric                        = "0.4"
        dfric                        = "0.1"
        on-water                     = "1"
        on-solid                     = "1"
        reduce-friction-by-extension = "1.1"
        speed-planing                = "35"
        spring-factor-not-planing    = "0.3">
  </gear>

  <!-- 5 Arriere -->
  <gear x="-6.353" y="0" z="-3.500"
        compression                  = "1.2"
        spring                       = "4"
        damp                         = "8"
        sfric                        = "0.4"
        dfric                        = "0.2"
        on-water                     = "1"
        on-solid                     = "1"
        reduce-friction-by-extension = "1.6"
        speed-planing                = "25"
        spring-factor-not-planing    = "0.9">
  </gear>

  <!-- 6 Flotteur gauche -->
  <gear x="1.450" y="13.202" z="-2.663"
        compression                  = "0.4"
        spring                       = "2"
        damp                         = "10"
        sfric                        = "0.8"
        dfric                        = "0.7"
        ignored-by-solver            = "1"
        on-water                     = "1"
        on-solid                     = "1"
        reduce-friction-by-extension = "1.25"
        speed-planing                = "15"
        spring-factor-not-planing    = "0.7">
  </gear>

  <!-- 7 Flotteur droite -->
  <gear x="1.450" y="-13.202" z="-2.663"
        compression                  = "0.4"
        spring                       = "2"
        damp                         = "10"
        sfric                        = "0.8"
        dfric                        = "0.7"
        ignored-by-solver            = "1"
        on-water                     = "1"
        on-solid                     = "1"
        reduce-friction-by-extension = "1.25"
        speed-planing                = "15"
        spring-factor-not-planing    = "0.7">
  </gear>

  <!-- 10250 lb -->
  <tank x="2.140" y=" 3.000" z="-0.480" capacity="5125"/>
  <tank x="2.140" y="-3.000" z="-0.480" capacity="5125"/>

  <!-- Water left tanks -->
  <weight x="1.376" y=" 1.040" z="-2.800" mass-prop="sim/weight[0]/weight-lb"/>
  <weight x="1.376" y=" 0.440" z="-2.800" mass-prop="sim/weight[1]/weight-lb"/>
  <!-- Water right tanks -->
  <weight x="1.376" y="-0.440" z="-2.800" mass-prop="sim/weight[2]/weight-lb"/>
  <weight x="1.376" y="-1.040" z="-2.800" mass-prop="sim/weight[3]/weight-lb"/>

  <!-- Mass distribution
       Dilbert : The cg should be about 1/6 chord ahead of the chord center.
                 3.530 / 6     = 0.558
                 1.376 + 0.558 = 1.934
  -->
  <ballast x=" 9" y="0" z="-3" mass="7296"/>

</airplane>
