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

<!--  Convair XFY Pogo   : JUSTUS Maik       01/2007
                  Update : BARANGER Emmanuel 02/2009
                  Update : BARANGER Emmanuel 04/2023

      sources : https://www.wikiwand.com/en/Convair%20XFY%20Pogo

      Length             : 32 ft 3 in  ( 9.83 m  )
      Wingspan           : 27 ft 8 in  ( 8.43 m  )
      Empty weight       : 11139 lb    ( 5053 kg )
      Max takeoff weight : 16250 lb    ( 7371 kg )
      Powerplant         : 1 Allison YT40-A-6 turboprop engine, 5100 shp ( 3800 kW )
      Propellers         : 6-bladed Curtiss Electric constant-speed contra-rotating propeller
      Maximum speed      :   980 km/h  ( 530 kn  ) at 15000 ft (4572 m)
-->
<airplane mass="11139" version="YASIM_VERSION_CURRENT" mtow-lbs="16250">

  <approach speed="58" aoa="4" fuel="0.3">
    <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="0.5"/>

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

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

  <cruise speed="180" alt="23200" fuel="0.8">
    <control-setting axis="/controls/engines/engine[0]/throttle"        value="1.0"/>
    <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/engines/engine[0]/boost"           value="1.0"/>

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

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

  <cockpit x="0.720" y="0" z="1.661"/>

  <fuselage ax=" 5.594" ay=" 0.000" az="-0.020" bx=" 5.464" by=" 0.000" bz="-0.020" width="0.538" taper="0.40" midpoint="1"/>
  <fuselage ax=" 5.464" ay=" 0.000" az="-0.020" bx=" 4.851" by=" 0.000" bz="-0.020" width="0.897" taper="0.60" midpoint="1"/>
  <fuselage ax=" 4.851" ay=" 0.000" az="-0.020" bx=" 3.759" by=" 0.000" bz="-0.020" width="1.207" taper="0.75" midpoint="1"/>
  <fuselage ax=" 3.759" ay=" 0.000" az="-0.020" bx=" 3.207" by=" 0.000" bz="-0.020" width="1.247" taper="0.97" midpoint="1"/>

  <fuselage ax=" 3.207" ay=" 0.000" az="-0.020" bx=" 2.278" by=" 0.000" bz="-0.020" width="1.346" taper="0.92" midpoint="1"/>
  <fuselage ax=" 2.278" ay=" 0.000" az="-0.020" bx="-2.928" by=" 0.000" bz="-0.020" width="1.346" taper="1.00" midpoint="1"/>

  <fuselage ax=" 2.888" ay=" 0.000" az=" 0.085" bx=" 0.912" by=" 0.000" bz=" 1.308" width="1.346" taper="0.92" midpoint="1"/>
  <fuselage ax=" 1.305" ay=" 0.000" az=" 1.202" bx="-0.137" by=" 0.000" bz=" 1.109" width="1.346" taper="1.00" midpoint="1"/>
  <fuselage ax=" 0.051" ay=" 0.000" az=" 1.163" bx="-2.730" by=" 0.000" bz=" 0.098" width="1.346" taper="0.92" midpoint="0"/>

  <!-- main == lower rotor (name=main for mp-protocol)-->
  <!-- tail == upper rotor (name=tail for mp-protocol)-->
  <rotor name="main"
         x="3.987" y="0.000" z="-0.020"
         nx="1"    ny="0"    nz="0"
         fx="0"    fy="0"    fz="1"
         ccw="1"
         mincollective="-180" maxcollective="180"
         mincyclicele="-90"   maxcyclicele="90"
         mincyclicail="-90"   maxcyclicail="90"
         diameter="5.2"
         numblades="3"
         weightperblade="50"
         twist="-27.5"
         chord="0.3"
         rpm="3200"
         relbladecenter="0.5"
         dynamic="1"
         rellenflaphinge="0.13"
         delta3="-0.26" delta="0.25"
         pitch-a="10"   pitch-b="15"
         flapmin="-15"
         flapmax="15"
         flap0="-2"
         flap0factor="0"
         notorque="0"
         dragfactor="0.30"
         translift-ve="20"
         translift-maxfactor="1.3"
         ground-effect-constant="0.1"
         taper="1"
         number-of-segments="8"
         number-of-parts="8"
         rel-len-where-incidence-is-measured="0.6"
         rel-len-blade-start="0.16"
         airfoil-lift-coefficient="3.15"
         airfoil-drag-coefficient0="0.38"
         airfoil-drag-coefficient1="5.5"
         incidence-stall-zero-speed="95"
         incidence-stall-half-sonic-speed="85.0"
         lift-factor-stall="0.45"
         stall-change-over="11"
         drag-factor-stall="4.0"
         cyclic-factor="0.8"
         rotor-correction-factor="3.7"
         balance="1"
         downwashfactor="0.3"
         phi0="95">
         <control-input control="CYCLICELE"  axis="/controls/flight/elevator"            src0="-1.0" src1="1.0" dst0=" 0.30" dst1="-0.30"/>
         <control-input control="COLLECTIVE" axis="/controls/flight/aileron"             src0="-1.0" src1="1.0" dst0=" 0.02" dst1="-0.02"/>
         <control-input control="CYCLICAIL"  axis="/controls/flight/rudder"              src0="-1.0" src1="1.0" dst0=" 0.30" dst1="-0.30"/>
         <control-input control="COLLECTIVE" axis="/controls/engines/engine[0]/throttle" src0=" 0.0" src1="1.0" dst0="-0.01" dst1=" 0.12"/>
         <control-input control="COLLECTIVE" axis="/velocities/airspeed-kt"              src0=" 0.0" src1="300" dst0=" 0.00" dst1=" 0.15"/>
  </rotor>

  <rotor name="tail"
         x="4.487" y="0.000" z="-0.020"
         nx="1.0"  ny="0"    nz="0.0"
         fx="0"    fy="0"    fz="1"
         ccw="0"
         mincollective="-180" maxcollective="180"
         mincyclicele="-90"   maxcyclicele="90"
         mincyclicail="-90"   maxcyclicail="90"
         diameter="5.2"
         numblades="3"
         weightperblade="50"
         twist="-27.5"
         chord="0.3"
         rpm="3200"
         relbladecenter="0.5"
         dynamic="1"
         rellenflaphinge="0.13"
         delta3="-0.26" delta="0.25"
         pitch-a="10"   pitch-b="15"
         flapmin="-15"
         flapmax="15"
         flap0="-2"
         flap0factor="0"
         notorque="0"
         dragfactor="0.30"
         translift-ve="20"
         translift-maxfactor="1.3"
         ground-effect-constant="0.1"
         taper="1"
         number-of-segments="8"
         number-of-parts="8"
         rel-len-where-incidence-is-measured="0.6"
         rel-len-blade-start="0.16"
         airfoil-lift-coefficient="3.15"
         airfoil-drag-coefficient0="0.38"
         airfoil-drag-coefficient1="5.5"
         incidence-stall-zero-speed="95"
         incidence-stall-half-sonic-speed="85.0"
         lift-factor-stall="0.45"
         stall-change-over="11"
         drag-factor-stall="4.0"
         cyclic-factor="0.8"
         rotor-correction-factor="3.7"
         balance="1"
         downwashfactor="0.3"
         phi0="95">
         <control-input control="CYCLICELE"  axis="/controls/flight/elevator"            src0="-1.0" src1="1.0" dst0=" 0.30" dst1="-0.30"/>
         <control-input control="CYCLICAIL"  axis="/controls/flight/rudder"              src0="-1.0" src1="1.0" dst0=" 0.30" dst1="-0.30"/>
         <control-input control="COLLECTIVE" axis="/controls/flight/aileron"             src0="-1.0" src1="1.0" dst0="-0.02" dst1=" 0.02"/>
         <control-input control="COLLECTIVE" axis="/controls/engines/engine[0]/throttle" src0=" 0.0" src1="1.0" dst0="-0.01" dst1=" 0.12"/>
         <control-input control="COLLECTIVE" axis="/velocities/airspeed-kt"              src0=" 0.0" src1="300" dst0=" 0.00" dst1=" 0.15"/>
  </rotor>

  <rotorgear max-power-engine="4362000"
             max-power-rotor-brake="100"
             rotorgear-friction="1.4"
             engine-prop-factor="0.005"
             engine-accel-limit="40"
             yasimdragfactor="112.3"
             yasimliftfactor="40.115">
             <control-input control="ROTORGEARENGINEON" axis="/controls/engines/engine[0]/magnetos"/>
             <control-input control="ROTORRELTARGET"    axis="/velocities/airspeed-kt" src0="200.0" src1="450.0" dst0="0.5" dst1="0.75"/>
  </rotorgear>

  <!-- only for solver -->
  <thruster x="3.987" y="0.000" z="-0.020"
            vx="1" vy="0" vz="0"
            thrust="10000">
            <control-input axis="/controls/engines/engine[0]/throttle" control="THROTTLE"/>
  </thruster>

  <mstab x="-0.329" y="0.000" z="-0.227"
         chord="6.393"
         length="5"
         taper="0.286"
         sweep="36"
         dihedral="4"
         twist="-3"
         camber="0.05">
         <stall   aoa="14" width="1"    peak="1.5"/>
         <flap1 start="0.12" end="0.92" lift="1.1" drag="1.1"/>

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

  <mstab x="-0.329" y="0.000" z="-0.227"
         chord="6.393"
         length="5"
         taper="0.286"
         sweep="36"
         dihedral="4"
         twist="-3"
         camber="0.05">
         <stall   aoa="14" width="1"    peak="1.5"/>
         <flap0 start="0.12" end="0.92" lift="1.2" drag="1.2"/>

         <control-input  control="FLAP0" axis="/controls/flight/elevator"/>
         <control-input  control="FLAP0" axis="/controls/flight/elevator-trim"/>
         <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/elevator-pos-norm"/>
  </mstab>

  <vstab x="-2.323" y="0" z="0"
         chord="3.45"
         length="4.2"
         taper="0.38"
         sweep="24">
         <stall   aoa="14" width="1.0" peak="1.5"/>
         <flap0 start="0.05" end="0.6" lift="1.1" 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="-2.323" y="0" z="0"
         chord="3.45"
         length="4.2"
         taper="0.38"
         sweep="24"
         dihedral="270">
         <stall   aoa="14" width="1.0" peak="1.5"/>
         <flap0 start="0.05" end="0.6" lift="1.15" drag="1.12"/>

         <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>

  <gear x="-4.941" y="-3.896" z="-0.002"
        upx="1" upy="0" upz="0"
        compression="1.2"
        spring="15"
        damp="10"
        stiction="1">
        <control-input  control="BRAKE"  axis="/controls/gear/brake-parking"/>
        <control-input  control="BRAKE"  axis="/controls/gear/brake-left"/>
  </gear>

  <gear x="-4.941" y="0.037" z="3.236"
        upx="1" upy="0" upz="0"
        compression="1.2"
        spring="15"
        damp="10"
        stiction="1">
        <control-input  control="BRAKE"  axis="/controls/gear/brake-parking"/>
        <control-input  control="BRAKE"  axis="/controls/gear/brake-right"/>
  </gear>

  <gear x="-4.941" y="3.844" z="-0.002"
        upx="1" upy="0" upz="0"
        compression="1.2"
        spring="15"
        damp="10"
        stiction="1">
        <control-input  control="BRAKE"  axis="/controls/gear/brake-parking"/>
        <control-input  control="BRAKE"  axis="/controls/gear/brake-left"/>
  </gear>

  <gear x="-4.941" y="0.037" z="-3.164"
        upx="1" upy="0" upz="0"
        compression="1.2"
        spring="15"
        damp="10"
        stiction="1">
        <control-input  control="BRAKE"  axis="/controls/gear/brake-parking"/>
        <control-input  control="BRAKE"  axis="/controls/gear/brake-right"/>
  </gear>


  <!-- some additional gears, only for erection at startup -->
  <gear x="-5" y="5" z="-8"
        upx="1" upy="0" upz="0"
        compression="1.3"
        spring="14"
        damp="10"
        ignored-by-solver="1"
        stiction="1">
        <control-input control="EXTEND" axis="/sim/model/pogo/erection-gear"/>
  </gear>

  <gear x="-5" y="-5" z="-8"
        upx="1" upy="0" upz="0"
        compression="1.3"
        spring="14"
        damp="10"
        ignored-by-solver="1"
        stiction="1">
        <control-input control="EXTEND" axis="/sim/model/pogo/erection-gear"/>
  </gear>

  <gear x="-5" y="5" z="8"
        upx="1" upy="0" upz="0"
        compression="1.3"
        spring="14"
        damp="10"
        ignored-by-solver="1"
        stiction="1">
        <control-input control="EXTEND" axis="/sim/model/pogo/erection-gear"/>
  </gear>

  <gear x="-5" y="-5" z="8"
        upx="1" upy="0" upz="0"
        compression="1.3"
        spring="14"
        damp="10"
        ignored-by-solver="1"
        stiction="1">
        <control-input control="EXTEND" axis="/sim/model/pogo/erection-gear"/>
  </gear>

  <gear x="-5" y="0" z="-13.5"
        upx="1" upy="0" upz="0"
        compression="1.3"
        spring="14"
        damp="10"
        ignored-by-solver="1"
        stiction="1">
        <control-input control="EXTEND" axis="/sim/model/pogo/erection-gear"/>
  </gear>

  <gear x="-5" y="-5" z="0"
        upx="1" upy="0" upz="0"
        compression="1.3"
        spring="14"
        damp="10"
        ignored-by-solver="1"
        stiction="1">
        <control-input control="EXTEND" axis="/sim/model/pogo/erection-gear"/>
  </gear>

  <gear x="-5" y="5" z="0"
        upx="1" upy="0" upz="0"
        compression="1.3"
        spring="14"
        damp="10"
        ignored-by-solver="1"
        stiction="1">
        <control-input control="EXTEND" axis="/sim/model/pogo/erection-gear"/>
  </gear>

  <gear x="-5" y="0" z="-5"
        upx="1" upy="0" upz="0"
        compression="1.3"
        spring="14"
        damp="10"
        ignored-by-solver="1"
        stiction="1">
        <control-input control="EXTEND" axis="/sim/model/pogo/erection-gear"/>
  </gear>

  <gear x="-5" y="0" z="15"
        upx="1" upy="0" upz="0"
        compression="1.3"
        spring="14"
        damp="10"
        ignored-by-solver="1"
        stiction="1">
        <control-input control="EXTEND" axis="/sim/model/pogo/erection-gear"/>
  </gear>

  <tank x="-0.2" y="0" z="0" capacity="1000"/>

  <ballast x="2" y="0" z="-0.7" mass="3172"/>

</airplane>
