<?xml version="1.0"?>
<?xml-stylesheet href="http://jsbsim.sourceforge.net/JSBSim.xsl" type="text/xsl"?>
<fdm_config name="PBY-6" version="2.0" release="BETA"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">

    <fileheader>
        <author>Gerard Robin (original), Alva (NACA profil ), David ( Hydrodynamic) , Youcef ( engine and propeller), grthteam consistent update</author>
        <filecreationdate>   2011_06_30 last update </filecreationdate>
        <description> Models a PBY-6 </description>
        <note>
            This model was created using publicly available data, publicly available
            technical reports, textbooks, and guesses. It contains no proprietary or
            restricted data. It has been validated only to the extent that it seems
            to "fly right", and possibly to comply to published, publicly known,
            performance data (maximum speed, endurance, etc.). Thus, this model
            is meant for educational and entertainment purposes only.

            This simulation model is not endorsed by the manufacturer.
        </note>
        <documentation>
            We got some Technical data on the Consolidated PBY-5A, we will partly refer to it :
                Powerplant  2 × Pratt  Whitney R-1830-92 Twin Wasp turbosupercharged radials, rated at 1200 hp (894.59 kW) each
                Length  63 ft 10.5 inch   Height  20 ft 2 inch
                Empty weight  17526 lb  '(7950 kg) Operational weight  34000 lb max
                Wing Span  104 ft 0 inch   Wing Aspect ratio  7.76
                Wing Area  1400 sq ft  (130 sq m) Service ceiling  14700 ft
                (61 kg / m2 )
                Maximum speed  179 mph at 7000 ft
                at  23000 lb  207 knt ias
                at  34000 lb 143  knt ias
                Stalling at 26000 lb 58-60 kias  at 34000 lb 66-70 kias
                Cruising speed  107 mph at optimum altitude
                speed for max climb 85 knot to 6000 ft
                Initial climb rate  Climb to 10,000 ft in 19 min 18 sec  Range  2545 miles max
                Fuel capacity internal  1,457 Imp gal (1,750 US gal)  Fuel capacity external
                Metric system
                Length  19.47 m   Height  6.15 m
                Empty weight  7950 kg  Operational weight  15422 kg max
                Wing Span  31.7 m   Wing Aspect ratio  7.76
                Wing Area  130.06 m²  Service ceiling  4481 m
                Maximum speed  288 km/h (155 knots)at 2134 m  Cruising speed  172 km/h  at optimum altitude
                Initial climb rate  Climb to 3050 m in 19 min 18 sec  Range  4096 km max
                Fuel capacity internal  6624 liters		
		Maximum Range 5,670 kms  |  3,450 mls (3060 nm)
		Maximum Endurance Longest non-stop flight 31 hr 45 min
		Maximum Cruise Altitude 7,620 m  |  25,000 ft
		Fuel Consumption (per engine cruise)  105 – 135 ltr/hr  |  28 – 35 gal/hr

            Airfoil NACA0021

        </documentation>
    </fileheader>

    <metrics>
        <wingarea unit="FT2"> 1400 </wingarea>
        <wingspan unit="FT"> 104 </wingspan>
        <wing_incidence unit="DEG">          4.00 </wing_incidence>
        <chord unit="FT"> 14.83 </chord>
        <htailarea unit="FT2"> 215 </htailarea>
        <htailarm unit="FT"> 38.2 </htailarm>
        <vtailarea unit="FT2"> 160 </vtailarea>
        <vtailarm unit="FT"> 38.2</vtailarm>
        <location name="AERORP" unit="IN">
            <x>3.866 </x>
            <y> 0 </y>
            <z> 81.851181</z>
        </location>
        <location name="EYEPOINT" unit="IN">
            <x> -153 </x>
            <y> -30 </y>
            <z> 40 </z>
        </location>
        <location name="VRP" unit="IN">
            <x> 0 </x>
            <y> 0 </y>
            <z> 0 </z>
        </location>
    </metrics>

    <mass_balance>
        <ixx unit="SLUG*FT2"> 278850 </ixx>
        <iyy unit="SLUG*FT2"> 237165 </iyy>
        <izz unit="SLUG*FT2"> 609302 </izz>
        <ixy unit="SLUG*FT2"> 0 </ixy>
        <ixz unit="SLUG*FT2"> 0 </ixz>
        <iyz unit="SLUG*FT2"> 0 </iyz>
        <emptywt unit="LBS"> 17526</emptywt>
        <location name="CG" unit="IN">
            <x> 3.2 </x>
            <y> 0 </y>
            <z> 11 </z>
        </location>
        <pointmass name="Watertank">
            <weight unit="LBS">00</weight> <!--max 10000-->
            <location unit="IN">
                <x> 3 </x>
                <y> 0 </y>
                <z> -59 </z>
            </location>
        </pointmass>
	 <pointmass name="MainLeft-tank">
	    <weight unit="LBS">1000</weight> <!--  Tank number 1 max 2260-->
	    <location name="Main Tank" unit="IN">
		<x> 0 </x>
		<y> 0.00 </y>
		<z> 64.85 </z>
	    </location>
	</pointmass>
	<pointmass name="Left-WT-tank">
	    <weight unit="LBS">1000</weight> <!--  Tank number 2 max 3500-->
	    <location name="LWT Tank" unit="IN"> 
		<x> 0 </x>
		<y> 0 </y>
		<z>  64.85 </z>
	    </location>
	</pointmass>
	<pointmass name="Right-WT-tank">
	    <weight unit="LBS">1000</weight>  <!--  Tank number 3 max 3500-->
	    <location name="RWT Tank" unit="IN"> 
		<x> 0 </x>
		<y> 0 </y>
		<z>  64.85 </z>
	    </location>
	</pointmass>
	<pointmass name="MainRight-tank"> 
	    <weight unit="LBS">1000</weight> <!--  Tank number 4 max 2260-->
	    <location name="Main Tank" unit="IN"> 
		<x> 0 </x>
		<y> 0.00 </y>
		<z> 64.85  </z>
	    </location>
	</pointmass>
		<pointmass name="Equipment">
            <weight unit="LBS">1000</weight>
            <location name="Equipment" unit="IN">
                <x> 2 </x>
                <y> 0 </y>
                <z> -59 </z>
            </location>
        </pointmass>
    </mass_balance>

    <ground_reactions>

        <contact type="BOGEY" name="NOSE_LG"><!--0-->
            <location unit="IN">
                <x> -181.08622 </x>
                <y> 0 </y>
                <z> -94.561811</z>
            </location>
            <static_friction> 0.8 </static_friction>
            <dynamic_friction> 0.5 </dynamic_friction>
            <rolling_friction> 0.02 </rolling_friction>
            <spring_coeff unit="LBS/FT"> 34000 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 7000 </damping_coeff>
            <max_steer unit="DEG"> 50 </max_steer>
            <brake_group> NONE </brake_group>
            <retractable>1</retractable>
        </contact>
        <contact type="BOGEY" name="LEFT_MLG"><!--1-->
            <location unit="IN">
                <x> 17.372402 </x>
                <y> -98.225591 </y>
                <z>-97.383071</z>
            </location>
            <static_friction> 0.8 </static_friction>
            <dynamic_friction> 0.5 </dynamic_friction>
            <rolling_friction> 0.02 </rolling_friction>
            <spring_coeff unit="LBS/FT"> 35420 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 7084 </damping_coeff>
            <max_steer unit="DEG"> 0.0 </max_steer>
            <brake_group> LEFT </brake_group>
            <retractable>1</retractable>
        </contact>
        <contact type="BOGEY" name="RIGHT_MLG"><!--2-->
            <location unit="IN">
                <x> 17.372402</x>
                <y> 98.225591 </y>
                <z> -97.383071 </z>
            </location>
            <static_friction> 0.8 </static_friction>
            <dynamic_friction> 0.5 </dynamic_friction>
            <rolling_friction> 0.02 </rolling_friction>
            <spring_coeff unit="LBS/FT"> 35420 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 7084 </damping_coeff>
            <max_steer unit="DEG"> 0.0 </max_steer>
            <brake_group> RIGHT </brake_group>
            <retractable>1</retractable>
        </contact>
        <contact type="BOGEY" name="AR-CAREN"><!--3-->
            <location unit="IN">
                <x> 200 </x>
                <y> 0 </y>
                <z> -39 </z>
            </location>
            <static_friction> 0.4</static_friction>
            <dynamic_friction> 0.9 </dynamic_friction>
            <rolling_friction> 0.1 </rolling_friction>
            <spring_coeff unit="LBS/FT"> 12000 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 2500 </damping_coeff>
            <max_steer unit="DEG"> 0.0 </max_steer>
            <brake_group>CENTER</brake_group>
            <retractable>0</retractable>
        </contact>
        <contact type="BOGEY" name="AV-CAREN"><!--4-->
            <location unit="IN">
                <x> -240</x>
                <y> 0 </y>
                <z> -29 </z>
            </location>
            <static_friction> 0.0 </static_friction>
            <dynamic_friction> 0.5 </dynamic_friction>
            <rolling_friction> 0.05</rolling_friction>
            <spring_coeff unit="LBS/FT"> 24000 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 5000 </damping_coeff>
            <max_steer unit="DEG"> 0.0 </max_steer>
            <brake_group> NONE </brake_group>
            <retractable>0</retractable>
        </contact>
        <contact type="BOGEY" name="CED-CAREN"><!--5-->
            <location unit="IN">
                <x> 17.372402</x>
                <y> 53 </y>
                <z> -45.1 </z>
            </location>
            <static_friction> 0.8 </static_friction>
            <dynamic_friction> 0.5 </dynamic_friction>
            <rolling_friction> 0.06 </rolling_friction>
            <spring_coeff unit="LBS/FT"> 35000 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 7000 </damping_coeff>
            <max_steer unit="DEG"> 0.0 </max_steer>
            <brake_group> CENTER</brake_group>
            <retractable>0</retractable>
        </contact>
        <contact type="BOGEY" name="CEG-CAREN"><!--6-->
            <location unit="IN">
                <x> 17.372402</x>
                <y> -53 </y>
                <z> -45.1 </z>
            </location>
            <static_friction> 0.8 </static_friction>
            <dynamic_friction> 0.5 </dynamic_friction>
            <rolling_friction> 0.06 </rolling_friction>
            <spring_coeff unit="LBS/FT"> 35000 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 7000 </damping_coeff>
            <max_steer unit="DEG"> 0.0 </max_steer>
            <brake_group> CENTER</brake_group>
            <retractable>0</retractable>
        </contact>
        <contact type="BOGEY" name="D-FLOT"><!--7-->
            <location unit="IN">
                <x> 0 </x>
                <y> 538 </y>
                <z> -14.20 </z>
            </location>
            <static_friction> 0.4</static_friction>
            <dynamic_friction> 0.9 </dynamic_friction>
            <rolling_friction> 0.04 </rolling_friction>
            <spring_coeff unit="LBS/FT"> 11000 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 500 </damping_coeff>
            <max_steer unit="DEG"> 0.0 </max_steer>
            <brake_group> NONE </brake_group>
            <retractable>1</retractable>
        </contact>
        <contact type="BOGEY" name="G-FLOT"><!--8-->
            <location unit="IN">
                <x> 0 </x>
                <y> -538 </y>
                <z> -14.20</z>
            </location>
            <static_friction> 0.4</static_friction>
            <dynamic_friction> 0.9 </dynamic_friction>
            <rolling_friction> 0.04 </rolling_friction>
            <spring_coeff unit="LBS/FT"> 11000 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 500 </damping_coeff>
            <max_steer unit="DEG"> 0.0 </max_steer>
            <brake_group> NONE</brake_group>
            <retractable>1</retractable>
        </contact>
        <contact type="BOGEY" name="WATER-INTAKE"><!--9-->
            <location unit="IN">
                <x> 45.739764 </x>
                <y> 0 </y>
                <z> -72.083071</z>
            </location>
            <static_friction> 0.2</static_friction>
            <dynamic_friction> 0.1 </dynamic_friction>
            <rolling_friction> 1.2 </rolling_friction>
            <max_steer unit="DEG"> 0.0 </max_steer>
            <brake_group> NONE</brake_group>
            <retractable>0</retractable>
            <spring_coeff unit="LBS/FT"> 100 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 20 </damping_coeff>
            <retractable>1</retractable>
        </contact>
        <!--10-->
        <contact type="BOGEY" name="DCAREN-SENSOR"><!--10-->
            <location unit="IN">
                <x> -27.467717 </x>
                <y>53</y>
                <z>-62</z>
            </location>
            <static_friction> 0.001</static_friction>
            <dynamic_friction> 0.001 </dynamic_friction>
            <rolling_friction> 0.001 </rolling_friction>
            <spring_coeff unit="LBS/FT"> 100 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 20 </damping_coeff>
            <retractable>0</retractable>
        </contact>
        <!--11-->
        <contact type="BOGEY" name="GCAREN-SENSOR"><!--11-->
            <location unit="IN">
                <x> -27.467717 </x>
                <y>-53</y>
                <z>-62</z>
            </location>
            <static_friction> 0.001</static_friction>
            <dynamic_friction> 0.001 </dynamic_friction>
            <rolling_friction> 0.001 </rolling_friction>
            <spring_coeff unit="LBS/FT"> 100 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 20 </damping_coeff>
            <retractable>0</retractable>
        </contact>
        <contact type="BOGEY" name="NOSE_CAREN"><!--12-->
            <location unit="IN">
                <x> -181.08622 </x>
                <y> 0 </y>
                <z> -49.5</z>
            </location>
            <static_friction> 0.8 </static_friction>
            <dynamic_friction> 0.5 </dynamic_friction>
            <rolling_friction> 0.1 </rolling_friction>
            <spring_coeff unit="LBS/FT"> 34000 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 7000 </damping_coeff>
            <max_steer unit="DEG"> 0 </max_steer>
            <brake_group> NONE </brake_group>
            <retractable>0</retractable>
        </contact>
        <contact type="STRUCTURE" name="D-AILE"><!--13-->
            <location unit="IN">
                <x> 0 </x>
                <y>627</y>
                <z> 87.6</z>
            </location>
            <spring_coeff unit="LBS/FT"> 1000 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 500 </damping_coeff>
        </contact>
        <contact type="STRUCTURE" name="G-AILE"><!--14-->
            <location unit="IN">
                <x> 0 </x>
                <y> -627</y>
                <z> 87.6 </z>
            </location>
            <spring_coeff unit="LBS/FT"> 1000 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 500 </damping_coeff>
        </contact>
        <contact type="STRUCTURE" name="AR-QUEUE"><!--15-->
            <location unit="IN">
                <x> 537 </x>
                <y> 0 </y>
                <z> 26 </z>
            </location>
            <spring_coeff unit="LBS/FT"> 1000 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 500 </damping_coeff>
        </contact>
        <!--  16 AND 17 ONLY IN USE WITH SOLID TERRAIN voir cpdrag.xml-->
        <!--16-->
        <contact type="BOGEY" name="DCAREN"><!--16-->
            <location unit="IN">
                <x> -27.467717 </x>
                <y>53</y>
                <z>0</z>
            </location>
            <static_friction> 5 </static_friction>
            <dynamic_friction> 5 </dynamic_friction>
            <rolling_friction> 5 </rolling_friction>
            <spring_coeff unit="LBS/FT"> 10000 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 20 </damping_coeff>
            <max_steer unit="DEG"> 0.0 </max_steer>
            <brake_group> NONE</brake_group>
            <retractable>0</retractable>
        </contact>
        <!--17-->
        <contact type="BOGEY" name="GCAREN"><!--17-->
            <location unit="IN">
                <x> -27.467717 </x>
                <y>-53</y>
                <z>0</z>
            </location>
            <static_friction> 5 </static_friction>
            <dynamic_friction> 5 </dynamic_friction>
            <rolling_friction> 5 </rolling_friction>
            <spring_coeff unit="LBS/FT"> 10000 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 20 </damping_coeff>
            <max_steer unit="DEG"> 0.0 </max_steer>
            <brake_group> NONE</brake_group>
            <retractable>0</retractable>
        </contact>
        <contact type="STRUCTURE" name="TAIL_B"><!--18-->
            <location unit="M">
                <x>12.019</x>
                <y>0</y>
                <z>0.28554</z>
            </location>
            <static_friction> 5 </static_friction>
            <dynamic_friction> 5 </dynamic_friction>
            <rolling_friction> 5 </rolling_friction>
            <spring_coeff unit="LBS/FT"> 10000 </spring_coeff>
            <damping_coeff unit="LBS/FT/SEC"> 20 </damping_coeff>
            <max_steer unit="DEG"> 0.0 </max_steer>
            <brake_group> NONE</brake_group>
            <retractable>0</retractable>
        </contact>
	 
    </ground_reactions>

    <propulsion>
        <engine file="PW-R1830-92">
            <location unit="IN">
                <x> -100 </x>
                <y> -83.62 </y>
                <z> 84.1 </z>
            </location>
            <orient unit="DEG">
                <roll> 0.0 </roll>
                <pitch> 3 </pitch>
                <yaw> 0 </yaw>
            </orient>
            <feed>0</feed>
            <feed>1</feed>
            <feed>2</feed>
	    <thruster file="PBY-6_propAero">
                <location unit="IN">
                    <x> -118 </x>
                    <y> -83.62 </y>
                    <z> 84.1 </z>
                </location>
                <orient unit="DEG">
                    <roll> 0.0 </roll>
                    <pitch> 3.0 </pitch>
                    <yaw> 0.0 </yaw>
                </orient>
                <sense> 1 </sense>
                <p_factor> 60</p_factor>
            </thruster>
        </engine>
        <engine file="PW-R1830-92">
            <location unit="IN">
                <x> -100 </x>
                <y> 83.62 </y>
                <z> 84.1 </z>
            </location>
            <orient unit="DEG">
                <roll> 0.0 </roll>
                <pitch> 3 </pitch>
                <yaw> 0 </yaw>
            </orient>
            <feed>0</feed>
            <feed>3</feed>
            <feed>4</feed>
	    <thruster file="PBY-6_propAero">
                <location unit="IN">
                    <x> -118 </x>
                    <y> 83.62 </y>
                    <z> 84.1 </z>
                </location>
                <orient unit="DEG">
                    <roll> 0.0 </roll>
                    <pitch> 3.0 </pitch>
                    <yaw> 0.0 </yaw>
                </orient>
                <sense> 1 </sense>
                <p_factor> 60</p_factor>
            </thruster>
        </engine>
        <!-- Tank number 0 -->
        <tank type="FUEL">
            <location unit="IN">
                <x> 0 </x>
                <y> 0 </y>
                <z> 64.85</z>
            </location>
            <capacity unit="LBS"> 1 </capacity>
            <contents unit="LBS"> 0 </contents>
        </tank>
        <!-- Pump number 1 -->
        <tank type="FUEL">
            <location unit="IN">
                <x> 0 </x>
                <y> 0 </y>
                <z> 64.85 </z>
            </location>
            <capacity unit="LBS">10 </capacity>
            <contents unit="LBS">10 </contents>
        </tank>
        <!-- Pump number 2 -->
        <tank type="FUEL">
            <location unit="IN">
                <x> 0 </x>
                <y> 0 </y>
                <z> 64.85 </z>
            </location>
            <capacity unit="LBS"> 10 </capacity>
            <contents unit="LBS"> 10 </contents>
        </tank>
        <!-- Pump number 3 -->
        <tank type="FUEL">
            <location unit="IN">
                <x> 0 </x>
                <y> 0 </y>
                <z> 64.85 </z>
            </location>
            <capacity unit="LBS"> 10 </capacity>
            <contents unit="LBS"> 10 </contents>
        </tank>
        <!-- Pump number 4 -->
         <tank type="FUEL">
            <location unit="IN">
                <x> 0 </x>
                <y> 0 </y>
                <z> 64.85 </z>
            </location>
            <capacity unit="LBS"> 10 </capacity>
            <contents unit="LBS"> 10 </contents>
        </tank>

    </propulsion>
    
    <system file="init-at-start"/>
    <system file="steady-behaviour"/>
    <system file="crash-detect"/>
    <system file="crash"/>
    <system file="landing-gear"/>
    <system file="braking"/>    
    <system file="cpdrag"/>



    <system file="on-water-control"/>
    <system file="electrical-fdm-custom"/>
    <system file="electrical-fdm"/>
    <system file="electrical-lights"/>

    <system file="water-bomb"/>
    <system file="hull"/>
    <system file="floats"/>
    <system file="fuel-refuel-pump"/>
    <system file="mixture-control"/>
    <system file="propulsion"/>
    <system file="externals"/>
    <system file="instruments"/>


    <flight_control name="FCS: PBY-6">

        <channel name="Pitch">

            <summer name="Pitch Trim Sum">
                <input>fcs/elevator-cmd-norm</input>
                <input>fcs/pitch-trim-cmd-norm</input>
                <clipto>
                    <min>-1</min>
                    <max>1</max>
                </clipto>
            </summer>

            <aerosurface_scale name="Elevator Control">
                <input>fcs/pitch-trim-sum</input>
                <range>
                    <min>-0.35</min>
                    <max>0.3</max>
                </range>
                <output>fcs/elevator-pos-rad</output>
            </aerosurface_scale>
            <aerosurface_scale name="elevator normalization">
                    <input>fcs/elevator-pos-rad</input>
                    <domain>
                            <min> -0.35 </min>
                            <max>  0.35 </max>
                    </domain>
                    <range>
                            <min> -1 </min>
                            <max>  1 </max>
                    </range>
                    <output>fcs/elevator-pos-norm</output>
            </aerosurface_scale>

        </channel>
        <channel name="Roll">
            <summer name="Roll Trim Sum">

                <input>fcs/aileron-cmd-norm</input>
                <input>fcs/roll-trim-cmd-norm</input>
                <clipto>
                    <min>-1</min>
                    <max>1</max>
                </clipto>
            </summer>

            <aerosurface_scale name="Left Aileron Control">
                <input>fcs/roll-trim-sum</input>
                <range>
                    <min>-0.35</min>
                    <max>0.35</max>
                </range>
                <output>fcs/left-aileron-pos-rad</output>
            </aerosurface_scale>
            <aerosurface_scale name="Right Aileron Control">
                <input>-fcs/roll-trim-sum</input>
                <range>
                    <min>-0.35</min>
                    <max>0.35</max>
                </range>
                <output>fcs/right-aileron-pos-rad</output>
            </aerosurface_scale>

            <aerosurface_scale name="left aileron normalization">
                    <input>fcs/left-aileron-pos-rad</input>
                    <domain>
                            <min> -0.35 </min>
                            <max>  0.35 </max>
                    </domain>
                    <range>
                            <min> -1 </min>
                            <max>  1 </max>
                    </range>
                    <output>fcs/left-aileron-pos-norm</output>
            </aerosurface_scale>
            <aerosurface_scale name="right aileron normalization">
                    <input>fcs/right-aileron-pos-rad</input>
                    <domain>
                            <min> -0.35 </min>
                            <max>  0.35 </max>
                    </domain>
                    <range>
                            <min> -1 </min>
                            <max>  1 </max>
                    </range>
                    <output>fcs/right-aileron-pos-norm</output>
            </aerosurface_scale>
        </channel>
        <channel name="Yaw">
            <summer name="Rudder Command Sum">
                <input>fcs/rudder-cmd-norm</input>
                <input>fcs/yaw-trim-cmd-norm</input>
                <clipto>
                    <min>-1</min>
                    <max>1</max>
                </clipto>
            </summer>

            <aerosurface_scale name="Rudder Control">
                <input>fcs/rudder-command-sum</input>
                <range>
                    <min>-0.35</min>
                    <max>0.35</max>
                </range>
                <output>fcs/rudder-pos-rad</output>
            </aerosurface_scale>
            <aerosurface_scale name="rudder normalization">
                    <input>fcs/rudder-pos-rad</input>
                    <domain>
                            <min> -0.35 </min>
                            <max>  0.35 </max>
                    </domain>
                    <range>
                            <min> -1 </min>
                            <max>  1 </max>
                    </range>
                    <output>fcs/rudder-pos-norm</output>
            </aerosurface_scale>
        </channel>




        <channel name="alpha-wing-rad-to-deg">
            <pure_gain name="wing-incidence-deg">
                <input>aero/alpha-wing-rad</input>
                <gain>57.29578</gain>
                <output>aero/alpha-wing-deg</output>
            </pure_gain>
       </channel>

    </flight_control>

    <external_reactions>
        <force name="mooring" frame="BODY">
            <location unit="IN">
                <x>234 </x>
                <y>0 </y>
                <z> -49.962205 </z>
            </location>
            <direction>
                <x>-1</x>
                <y>0</y>
                <z>0</z>
            </direction>
        </force>
	<force name="mooring1" frame="BODY">
            <location unit="M">
                <x>-18</x>
                <y>0 </y>
                <z>-2 </z>
            </location>
            <direction>
                <x>1</x>
                <y>0</y>
                <z>0</z>
            </direction>
        </force>
	

        <force name="cp1-bellydragx" frame="BODY">
            <location unit="IN">
                <x> -27.467717 </x>
                <y>0</y>
                <z>-62</z>
            </location>
            <direction>
                <x>-1</x>
                <y>0</y>
                <z>0</z>
            </direction>
        </force>

        <force name="l_float-drag" frame="BODY">
            <location unit="IN">
                <x> 0 </x>
                <y>-538</y>
                <z>-14.2</z>
            </location>
            <direction>
                <x>-1</x>
                <y>0</y>
                <z>0</z>
            </direction>
        </force>

        <force name="r_float-drag" frame="BODY">
            <location unit="IN">
                <x> 0 </x>
                <y>538</y>
                <z>-14.2</z>
            </location>
            <direction>
                <x>-1</x>
                <y>0</y>
                <z>0</z>
            </direction>
        </force>

        <force name="hull_lift" frame="BODY">
            <location unit="IN">
                <x> 3.5 </x>
                <y>0</y>
                <z>-62</z>
            </location>
            <direction>
                <x>0</x>
                <y>0</y>
                <z>-1</z>
            </direction>
        </force>

        <force name="hull_r" frame="BODY">
            <location unit="IN">
                <x>-40 </x><!---1.23942-->
                <y> 54.714567 </y><!--1.38975-->
                <z> -49.962205 </z><!---1.26904-->
            </location>
            <direction>
                <x>0</x>
                <y>0</y>
                <z>-1</z>
            </direction>
        </force>
        <force name="hull_l" frame="BODY">
            <location unit="IN">
                <x>-40  </x><!---1.23942-->
                <y> -54.714567 </y><!---1.38975-->
                <z> -49.962205 </z><!---1.26904-->
            </location>
            <direction>
                <x>0</x>
                <y>0</y>
                <z>-1</z>
            </direction>
        </force>

        <force name="hull_arr" frame="BODY">
            <location unit="IN">
                <x>20  </x><!---1.23942-->
                <y> 52 </y><!---1.38975-->
                <z> -49.962205 </z><!---1.26904-->
            </location>
            <direction>
                <x>0</x>
                <y>0</y>
                <z>-1</z>
            </direction>
        </force>
        <force name="hull_arl" frame="BODY">
            <location unit="IN">
                <x>20  </x><!---1.23942-->
                <y> -52 </y><!---1.38975-->
                <z> -49.962205 </z><!---1.26904-->
            </location>
            <direction>
                <x>0</x>
                <y>0</y>
                <z>-1</z>
            </direction>
        </force>


    </external_reactions>

    <aerodynamics file="Aero/PBY-6-aero"/>


       
</fdm_config>

     



