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

<!-- Latecoere 631 : BARANGER Emmanuel December  2008
           Updated : BARANGER Emmanuel August    2012
           Updated : BARANGER Emmanuel March     2016
           Updated : BARANGER Emmanuel July      2022
           Updated : BARANGER Emmanuel September 2025

           Sources : http://en.wikipedia.org/wiki/Lat%C3%A9co%C3%A8re_631

     wingspan      : 57.43 m  ( 188 ft 4 1/2 in )
     length        : 43.46 m  ( 142 ft 6 5/8 in )
     height        : 10.10 m  (  33 ft 1 1/2 on )
     Moteurs       : 6 × Wright R-2600-A5B Cyclone 14-cylinder air cooled radial engine ( 1600 hp each )
     Empty weight  : 32400 kg (  71430 lb       )
     Gross weight  : 71350 kg ( 157300 lb       )
     Maximum speed : 394 km/h (    213 kt       )
     Cruise speed  : 297 km/h (    161 kt       )
-->
<airplane mass="71430" version="YASIM_VERSION_CURRENT" mtow-lbs="157300">

  <approach speed="80" aoa="4" 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[0]/propeller-pitch" value="0.5"/>

    <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[2]/throttle"        value="0.4"/>
    <control-setting axis="/controls/engines/engine[2]/mixture"         value="1"/>
    <control-setting axis="/controls/engines/engine[2]/propeller-pitch" value="0.5"/>

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

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

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

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

  <cruise speed="161" alt="8000" fuel="0.7">
    <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[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[2]/throttle"        value="0.7"/>
    <control-setting axis="/controls/engines/engine[2]/mixture"         value="0.7"/>
    <control-setting axis="/controls/engines/engine[2]/propeller-pitch" value="1"/>

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

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

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

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

  <cockpit x="12.317" y="0.847" z="-0.561"/>

  <!-- Left Cabin -->
  <fuselage ax=" 13.091" ay="  0.000" az="-1.268" bx=" 12.534" by="  0.000" bz="-1.051" width="2.003" taper="0.50" midpoint="1"/>
  <fuselage ax=" 12.534" ay="  0.000" az="-1.051" bx=" 10.053" by="  0.598" bz="-0.744" width="2.172" taper="0.90" midpoint="1"/>
  <fuselage ax=" 10.053" ay="  0.598" az="-0.744" bx=" -2.301" by="  0.598" bz="-0.744" width="2.172" taper="1.00" midpoint="1"/>
  <fuselage ax=" -2.301" ay="  0.598" az="-0.744" bx="-21.594" by="  0.000" bz="-0.331" width="2.172" taper="0.30" midpoint="0"/>
  <!-- Right Cabin -->
  <fuselage ax=" 13.091" ay="  0.000" az="-1.268" bx=" 12.534" by="  0.000" bz="-1.051" width="2.003" taper="0.50" midpoint="1"/>
  <fuselage ax=" 12.534" ay="  0.000" az="-1.051" bx=" 10.053" by=" -0.598" bz="-0.744" width="2.172" taper="0.90" midpoint="1"/>
  <fuselage ax=" 10.053" ay=" -0.598" az="-0.744" bx=" -2.301" by=" -0.598" bz="-0.744" width="2.172" taper="1.00" midpoint="1"/>
  <fuselage ax=" -2.301" ay=" -0.598" az="-0.744" bx="-21.594" by="  0.000" bz="-0.331" width="2.172" taper="0.30" midpoint="0"/>

  <fuselage ax=" 21.747" ay="  0.000" az="-3.002" bx=" 12.861" by="  0.000" bz="-2.488" width="3.773" taper="0.30" midpoint="1"/>

  <fuselage ax=" 21.747" ay="  0.000" az="-3.002" bx=" 19.999" by="  0.000" bz="-2.584" width="2.003" taper="0.50" midpoint="1"/>
  <fuselage ax=" 19.999" ay="  0.000" az="-2.584" bx=" 17.188" by="  0.000" bz="-2.488" width="2.841" taper="0.70" midpoint="1"/>
  <fuselage ax=" 17.188" ay="  0.000" az="-2.488" bx=" 12.861" by="  0.000" bz="-2.488" width="3.773" taper="0.76" midpoint="1"/>
  <fuselage ax=" 12.861" ay="  0.000" az="-2.488" bx=" -2.121" by="  0.000" bz="-2.488" width="3.773" taper="1.00" midpoint="1"/>
  <fuselage ax=" -2.121" ay="  0.000" az="-2.488" bx="-21.594" by="  0.000" bz="-0.331" width="3.773" taper="0.20" midpoint="0"/>

  <!-- Left exterior engine -->
  <fuselage ax="  9.537" ay=" 12.729" az=" 0.482" bx="  9.322" by=" 12.729" bz=" 0.482" width="1.384" taper="0.74" midpoint="1"/>
  <fuselage ax="  9.322" ay=" 12.729" az=" 0.482" bx="  9.107" by=" 12.729" bz=" 0.482" width="1.482" taper="0.94" midpoint="1"/>
  <fuselage ax="  9.107" ay=" 12.729" az=" 0.482" bx=" -0.482" by=" 12.729" bz="-0.377" width="1.482" taper="1.00" midpoint="1"/>
  <fuselage ax=" -0.482" ay=" 12.729" az="-0.377" bx=" -2.693" by=" 12.729" bz="-0.592" width="1.482" taper="0.10" midpoint="0"/>

  <!-- Left center engine -->
  <fuselage ax="  9.933" ay="  8.312" az=" 0.351" bx="  9.718" by="  8.312" bz=" 0.351" width="1.384" taper="0.74" midpoint="1"/>
  <fuselage ax="  9.718" ay="  8.312" az=" 0.351" bx="  9.503" by="  8.312" bz=" 0.351" width="1.482" taper="0.94" midpoint="1"/>
  <fuselage ax="  9.503" ay="  8.312" az=" 0.351" bx="  6.915" by="  8.312" bz=" 0.351" width="1.482" taper="1.00" midpoint="1"/>
  <fuselage ax="  6.915" ay="  8.312" az=" 0.351" bx="  4.547" by="  8.312" bz=" 0.351" width="1.482" taper="0.57" midpoint="0"/>

  <!-- Left interior engine -->
  <fuselage ax=" 10.266" ay="  3.961" az=" 0.025" bx=" 10.051" by="  3.961" bz=" 0.025" width="1.384" taper="0.74" midpoint="1"/>
  <fuselage ax=" 10.051" ay="  3.961" az=" 0.025" bx="  9.836" by="  3.961" bz=" 0.025" width="1.482" taper="0.94" midpoint="1"/>
  <fuselage ax="  9.836" ay="  3.961" az=" 0.025" bx="  7.322" by="  3.961" bz=" 0.025" width="1.482" taper="1.00" midpoint="1"/>
  <fuselage ax="  7.322" ay="  3.961" az=" 0.025" bx="  4.834" by="  3.961" bz=" 0.025" width="1.482" taper="0.69" midpoint="0"/>

  <!-- Right interior engine -->
  <fuselage ax=" 10.266" ay=" -3.961" az=" 0.025" bx=" 10.051" by=" -3.961" bz=" 0.025" width="1.384" taper="0.74" midpoint="1"/>
  <fuselage ax=" 10.051" ay=" -3.961" az=" 0.025" bx="  9.836" by=" -3.961" bz=" 0.025" width="1.482" taper="0.94" midpoint="1"/>
  <fuselage ax="  9.836" ay=" -3.961" az=" 0.025" bx="  7.322" by=" -3.961" bz=" 0.025" width="1.482" taper="1.00" midpoint="1"/>
  <fuselage ax="  7.322" ay=" -3.961" az=" 0.025" bx="  4.834" by=" -3.961" bz=" 0.025" width="1.482" taper="0.69" midpoint="0"/>

  <!-- Right center engine -->
  <fuselage ax="  9.933" ay=" -8.312" az=" 0.351" bx="  9.718" by=" -8.312" bz=" 0.351" width="1.384" taper="0.74" midpoint="1"/>
  <fuselage ax="  9.718" ay=" -8.312" az=" 0.351" bx="  9.503" by=" -8.312" bz=" 0.351" width="1.482" taper="0.94" midpoint="1"/>
  <fuselage ax="  9.503" ay=" -8.312" az=" 0.351" bx="  6.915" by=" -8.312" bz=" 0.351" width="1.482" taper="1.00" midpoint="1"/>
  <fuselage ax="  6.915" ay=" -8.312" az=" 0.351" bx="  4.547" by=" -8.312" bz=" 0.351" width="1.482" taper="0.57" midpoint="0"/>

  <!-- Right exterior engine -->
  <fuselage ax="  9.537" ay="-12.729" az=" 0.482" bx="  9.322" by="-12.729" bz=" 0.482" width="1.384" taper="0.74" midpoint="1"/>
  <fuselage ax="  9.322" ay="-12.729" az=" 0.482" bx="  9.107" by="-12.729" bz=" 0.482" width="1.482" taper="0.94" midpoint="1"/>
  <fuselage ax="  9.107" ay="-12.729" az=" 0.482" bx=" -0.482" by="-12.729" bz="-0.377" width="1.482" taper="1.00" midpoint="1"/>
  <fuselage ax=" -0.482" ay="-12.729" az="-0.377" bx=" -2.693" by="-12.729" bz="-0.592" width="1.482" taper="0.10" midpoint="0"/>

  <wing x="3.192" y="0" z="-0.418"
        chord    = "9.387"
        length   = "28.476"
        taper    = "0.30"
        sweep    = "-1"
        dihedral = "5"
        camber   = "0.04">
        <stall   aoa="20"  width="1"     peak="1.5"/>
        <flap0 start="0.065" end="0.485" lift="1.9" drag="1.4"/>
        <flap1 start="0.485" end="0.900" lift="1.2" drag="1.1"/>

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

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

  <hstab x="-18.980" y="0" z="-0.135"
         chord    = "5.171"
         length   = "6.687"
         taper    = "0.66"
         dihedral = "15">
         <stall   aoa="18" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.2" 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="-18.982" y="6.848" z="1.625"
         chord  = "3.442"
         length = "3.308"
         taper  = "0.66">
         <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="-18.982" y="-6.848" z="1.625"
         chord  = "3.442"
         length = "3.308"
         taper  = "0.66">
         <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://www.wikiwand.com/en/Wright_R-2600-C14_Cyclone_14

                 name              : Wright R-2600
                 type              : 14-cylinder supercharged air-cooled two-row radial engine
                 power cruise      : 1750 hp at 2600 rpm at  3200 ft ( 975 m) military power
                                     1450 hp at 2600 rpm at 15000 ft (4575 m) military power
                 weight            : 2045 lb  (  928 kg )
                 displacement      : 2604 in3 ( 42.7 L  )
                 Compression ratio : 6.9:1
  -->
  <!-- Moteur exterieur gauche -->
  <propeller x="9.207" y="12.730" z="0.482"
             mass         = "2045"
             moment       = "20"
             radius       = "2"
             cruise-speed = "161"
             cruise-rpm   = "2600"
             cruise-power = "1450"
             cruise-alt   = "15000"
             gear-ratio   = "0.5625">
             <actionpt x="9.810" y="12.730" z="0.482"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[0]/propeller-pitch"/>
             <piston-engine eng-power    = "1750"
                            eng-rpm      = "2700"
                            displacement = "2604"
                            compression  = "6.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>

  <!-- Moteur centrale gauche -->
  <propeller x="9.603" y="8.313" z="0.351"
             mass         = "2045"
             moment       = "20"
             radius       = "2"
             cruise-speed = "161"
             cruise-rpm   = "2600"
             cruise-power = "1450"
             cruise-alt   = "15000"
             gear-ratio   = "0.5625">
             <actionpt x="10.130" y="8.313" z="0.351"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[1]/propeller-pitch"/>
             <piston-engine eng-power    = "1750"
                            eng-rpm      = "2700"
                            displacement = "2604"
                            compression  = "6.9">
                            <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="MIXTURE"  axis="/controls/engines/engine[1]/mixture"/>
             </piston-engine>
  </propeller>

  <!-- Moteur interieur gauche -->
  <propeller x="9.936" y="3.962" z="0.025"
             mass         = "2045"
             moment       = "20"
             radius       = "2"
             cruise-speed = "161"
             cruise-rpm   = "2600"
             cruise-power = "1450"
             cruise-alt   = "15000"
             gear-ratio   = "0.5625">
             <actionpt x="10.444" y="3.962" z="0.025"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[2]/propeller-pitch"/>
             <piston-engine eng-power    = "1750"
                            eng-rpm      = "2700"
                            displacement = "2604"
                            compression  = "6.9">
                            <control-input control="THROTTLE" axis="/controls/engines/engine[2]/throttle"/>
                            <control-input control="STARTER"  axis="/controls/engines/engine[2]/starter"/>
                            <control-input control="MAGNETOS" axis="/controls/engines/engine[2]/magnetos"/>
                            <control-input control="MIXTURE"  axis="/controls/engines/engine[2]/mixture"/>
             </piston-engine>
  </propeller>

  <!-- Moteur interieur droit -->
  <propeller x="9.936" y="-3.962" z="0.025"
             mass         = "2045"
             moment       = "20"
             radius       = "2"
             cruise-speed = "161"
             cruise-rpm   = "2600"
             cruise-power = "1450"
             cruise-alt   = "15000"
             gear-ratio   = "0.5625">
             <actionpt x="10.444" y="-3.962" z="0.025"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[3]/propeller-pitch"/>
             <piston-engine eng-power    = "1750"
                            eng-rpm      = "2700"
                            displacement = "2604"
                            compression  = "6.9">
                            <control-input control="THROTTLE" axis="/controls/engines/engine[3]/throttle"/>
                            <control-input control="STARTER"  axis="/controls/engines/engine[3]/starter"/>
                            <control-input control="MAGNETOS" axis="/controls/engines/engine[3]/magnetos"/>
                            <control-input control="MIXTURE"  axis="/controls/engines/engine[3]/mixture"/>
             </piston-engine>
  </propeller>

  <!-- Moteur centrale droit -->
  <propeller x="9.603" y="-8.313" z="0.351"
             mass         = "2045"
             moment       = "20"
             radius       = "2"
             cruise-speed = "161"
             cruise-rpm   = "2600"
             cruise-power = "1450"
             cruise-alt   = "15000"
             gear-ratio   = "0.5625">
             <actionpt x="10.130" y="-8.313" z="0.351"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[4]/propeller-pitch"/>
             <piston-engine eng-power    = "1750"
                            eng-rpm      = "2700"
                            displacement = "2604"
                            compression  = "6.9">
                            <control-input control="THROTTLE" axis="/controls/engines/engine[4]/throttle"/>
                            <control-input control="STARTER"  axis="/controls/engines/engine[4]/starter"/>
                            <control-input control="MAGNETOS" axis="/controls/engines/engine[4]/magnetos"/>
                            <control-input control="MIXTURE"  axis="/controls/engines/engine[4]/mixture"/>
             </piston-engine>
  </propeller>

  <!-- Moteur exterieur droit -->
  <propeller x="9.207" y="-12.730" z="0.482"
             mass         = "2045"
             moment       = "20"
             radius       = "2"
             cruise-speed = "161"
             cruise-rpm   = "2600"
             cruise-power = "1450"
             cruise-alt   = "15000"
             gear-ratio   = "0.5625">
             <actionpt x="9.810" y="-12.730" z="0.482"/>
             <control-input control="ADVANCE" axis="/controls/engines/engine[5]/propeller-pitch"/>
             <piston-engine eng-power    = "1750"
                            eng-rpm      = "2700"
                            displacement = "2604"
                            compression  = "6.9">
                            <control-input control="THROTTLE" axis="/controls/engines/engine[5]/throttle"/>
                            <control-input control="STARTER"  axis="/controls/engines/engine[5]/starter"/>
                            <control-input control="MAGNETOS" axis="/controls/engines/engine[5]/magnetos"/>
                            <control-input control="MIXTURE"  axis="/controls/engines/engine[5]/mixture"/>
             </piston-engine>
  </propeller>


  <!-- Fuselage -->
  <!-- Avant -->
  <gear x="21.2" y="0" z="-4"
        compression                  = "1.2"
        spring                       = "15"
        sfric                        = "0.85"
        dfric                        = "0.75"
        on-water                     = "1"
        on-solid                     = "1"
        reduce-friction-by-extension = "1.15"
        speed-planing                = "25"
        spring-factor-not-planing    = "0.25">
  </gear>

  <!-- Centre -->
  <gear x="2.253" y="0" z="-3.6"
        compression                  = "1.4"
        spring                       = "15"
        sfric                        = "0.8"
        dfric                        = "0.7"
        on-water                     = "1"
        on-solid                     = "1"
        reduce-friction-by-extension = "1.15"
        speed-planing                = "15"
        spring-factor-not-planing    = "0.4">
  </gear>

  <!-- Arriere -->
  <gear x="-6.023" y="0" z="-3.5"
        compression                  = "1.8"
        spring                       = "8"
        sfric                        = "0.9"
        dfric                        = "0.8"
        on-water                     = "1"
        on-solid                     = "1"
        reduce-friction-by-extension = "0.9"
        speed-planing                = "25"
        spring-factor-not-planing    = "0.85">
  </gear>

  <!-- Flotteur gauche -->
  <gear x="0.314" y="12.730" z="-3.4"
        compression                  = "1.8"
        spring                       = "8"
        sfric                        = "0.9"
        dfric                        = "0.8"
        ignored-by-solver            = "1"
        on-water                     = "1"
        on-solid                     = "1"
        reduce-friction-by-extension = "0.7"
        speed-planing                = "25"
        spring-factor-not-planing    = "3">
        <control-input  control="EXTEND" axis="/controls/gear/gear-down"/>

        <control-output control="EXTEND" prop="/gear/gear[3]/position-norm"/>

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

  <!-- Flotteur droite -->
  <gear x="0.314" y="-12.730" z="-3.4"
        compression                  = "1.8"
        spring                       = "8"
        sfric                        = "0.9"
        dfric                        = "0.8"
        ignored-by-solver            = "1"
        on-water                     = "1"
        on-solid                     = "1"
        reduce-friction-by-extension = "0.7"
        speed-planing                = "25"
        spring-factor-not-planing    = "3">
        <control-input  control="EXTEND" axis="/controls/gear/gear-down"/>

        <control-output control="EXTEND" prop="/gear/gear[4]/position-norm"/>

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

  <tank x="3.319" y=" 7.739" z="0.266" capacity="4472"/>
  <tank x="3.319" y="-7.739" z="0.266" capacity="4472"/>

  <!-- Mass distribution
       Dilbert : The cg should be about 1/6 chord ahead of the chord center.
                 9.387 / 6     = 1.564
                 3.192 + 1.564 = 4.756
  -->
  <ballast x="13" y="0" z="-4.142" mass="12560"/>

</airplane>
