<?xml version="1.0"?>
<!-- 
    Credits: 
    Virtavia: 3d model
    FGUK: Development
    Richard Harrison: JSBSim aero (OpenVSP) and systems modelling.

    References:
    Peter Clarke provided reference photographs of the cockpit;
    https://youtu.be/47yOpTJA4YA
    https://www.jetartaviation.co.uk/post/wk275-that-supermarine-swift
    http://www.airpowerworld.info/jet-fighter-planes/supermarine-swift-cockpit.jpg
 -->

<PropertyList>
    <fdm>
        <jsbsim>
            <fcs>
                <yaw-damper-enable type="bool">0</yaw-damper-enable>
            </fcs>
            <systems>
                <canopy>
                    <command type="double">0</command>
                    <position type="double">0</position>
                </canopy>
                <gear>
                    <emergency-handle type="double">0</emergency-handle>
                </gear>
                <ecs>
                    <inside-ownship alias="/sim/current-view/internal" />
                </ecs>
                <NWS>
                    <engaged type="double">0</engaged>
                </NWS>
                <radar>
                    <range type="int">40</range>
                </radar>
                <tailhook>
                    <tailhook-cmd-norm type="double">0</tailhook-cmd-norm>
                </tailhook>
            </systems>
            <mass>
                <tip-tanks-fitted type="double">0</tip-tanks-fitted>
            </mass>
        </jsbsim>
    </fdm>

    <canopy>
        <position-norm alias="/fdm/jsbsim/systems/ecs/canopy-position" />
    </canopy>

    <sim>
        <minimum-fg-version>2018.1</minimum-fg-version>

        <description>Supermarine Swift FR.5</description>
        <long-description>
            Single-seat tactical-reconnaissance aircraft powered by a Rolls-Royce Avon 114 turbojet engine (7,175 lbf  dry,  afterburner 9,450 lbf). The lengthened nose accommodates three cameras.
                        
            Gross weight: 21,673 lb. VNE 620kn. Range: 547.5 nmi. Service ceiling: 45,800 ft. 
        </long-description>

        <!-- 3d model Copyright (C) 2020 Virtavia, released under the GPL -->
        <description type="string">Supermarine Swift FR.5</description>
        <author type="string">Virtavia, StuartC, Avionyx, Richard Harrison</author>
        <status type="string">V1.0</status>
        <flight-model>jsb</flight-model>
        <aero>swift-vsp</aero>

        <tags>
            <tag>fighter</tag>
            <tag>jet</tag>
            <tag>single-engine</tag>
            <tag>retractable-gear</tag>
        </tags>

        <rating>
            <FDM type="int">5</FDM>
            <systems type="int">3</systems>
            <cockpit type="int">5</cockpit>
            <model type="int">5</model>
        </rating>


        <fuel-fraction>1.0</fuel-fraction>
        <license>See licence.txt</license>
        <startup>

            <splash-texture>Aircraft/Supermarine-Swift/splash.png</splash-texture>
        </startup>

        <flaps>
            <setting>0.0</setting>
            <setting>0.4</setting>
            <setting>0.7</setting>
            <setting>1.0</setting>
        </flaps>

        <model>
            <path>Aircraft/Supermarine-Swift/Models/Swift-FR5.xml</path>

        </model>

        <rendering>

            <refl_correction type="string">-0.43</refl_correction>
            <!-- edit this to alter the strength of the reflection -->
        </rendering>

        <systems>
            <autopilot>
                <path>Aircraft/Supermarine-Swift/Systems/autopilot.xml</path>
            </autopilot>

            <autopilot n="102">
                <path>Systems/glass-rain.xml</path>
            </autopilot>

            <autopilot n="103">
                <path>Aircraft/Supermarine-Swift/Systems/swift-sound-system.xml</path>
            </autopilot>

            <electrical>
                <path>Aircraft/Generic/generic-electrical.xml</path>
            </electrical>
        </systems>


        <sound>
            <path>Aircraft/Supermarine-Swift/Sounds/swift-sound.xml</path>
        </sound>


        <view n="0">
            <internal archive="y">true</internal>
            <config>
                <x-offset-m archive="y">0</x-offset-m>
                <y-offset-m archive="y">0.68</y-offset-m>
                <z-offset-m archive="y">-2.8</z-offset-m>
                <pitch-offset-deg>-15</pitch-offset-deg>
                <default-field-of-view-deg>80</default-field-of-view-deg>
            </config>
        </view>

        <multiplay>
            <generic>

                <float n="2" alias="/engines/engine[0]/reheat" />

            </generic>
        </multiplay>

        <menubar>
            <default>
                <menu n="50">
                    <label>Supermarine Swift</label>
                    <enabled type="bool">true</enabled>
                    <item>
                        <label>Select Livery</label>
                        <binding>
                            <command>nasal</command>
                            <script>aircraft.livery.dialog.toggle();</script>
                        </binding>
                    </item>
                    <item>
                        <label>Quickstart</label>
                        <binding>
                            <command>nasal</command>
                            <script>
                                <![CDATA[ 
                                setprop("controls/engines/engine[0]/cutoff",0);
                                setprop("engines/engine[0]/out-of-fuel",0);
                                setprop("engines/engine[0]/cutoff",0);

                                setprop("fdm/jsbsim/propulsion/starter_cmd",1);
                                setprop("fdm/jsbsim/propulsion/cutoff_cmd",1);
                                setprop("fdm/jsbsim/propulsion/set-running",0);
                            ]]>
                            </script>
                        </binding>
                    </item>
                </menu>
            </default>
        </menubar>

        <multiplay>
            <generic>
                <float n="2" alias="/engines/engine[0]/reheat" />
            </generic>
        </multiplay>

    </sim>


    <engines>
        <engine n="0">
            <running>false</running>
        </engine>
    </engines>


    <controls>
        <flight>
            <flaps-lever type="double">0</flaps-lever>
        </flight>
        <gear>
            <brake-parking>1</brake-parking>
        </gear>
    </controls>

    <consumables>
        <fuel>
            <tank n="0">
                <level-gal_us archive="y">126.76</level-gal_us>
                <name>Right Wing</name>
            </tank>
            <tank n="1">
                <level-gal_us archive="y">111</level-gal_us>
                <name>Left Wing</name>
            </tank>
            <tank n="2">
                <level-gal_us archive="y">117.79</level-gal_us>
                <name>Rear</name>
            </tank>
            <tank n="3">
                <level-gal_us archive="y">168.67</level-gal_us>
                <name>Center</name>
            </tank>
            <tank n="4">
                <name>Front</name>
                <level-gal_us archive="y">168.67</level-gal_us>
            </tank>
        </fuel>
    </consumables>

    <input>
        <keyboard include="keyboard.xml" />
    </input>

    <environment>
        <turbulence>
            <use-cloud-turbulence>true</use-cloud-turbulence>
        </turbulence>
    </environment>

    <nasal>
        <Supermarine-Swift>
            <file>Aircraft/Supermarine-Swift/Nasal/liveries.nas</file>
        </Supermarine-Swift>
    </nasal>

</PropertyList>
