<?xml version="1.0"?>

<!-- SUMPAC Human-Powered Airplane -->
<!-- Copyright 2019 Wayne Bragg -->

<PropertyList>
  <sim include="sumpac-views.xml">
    <tags>
        <tag>human-power</tag>
        <tag>single-motor</tag>
        <tag>electric</tag>
        <tag>experimental</tag>
        <tag>fixed-gear</tag>
        <tag>fixed-pitch</tag>
        <tag>propeller</tag>
    </tags>
    <description>SUMPAC human-powered airplane</description>
    
    <aircraft-version>0</aircraft-version>
    <minimum-fg-version>2018.2.0</minimum-fg-version>
    <status>development</status>

    <rating>
        <FDM type="int">4</FDM>
        <systems type="int">3</systems>
        <model type="int">4</model>
        <cockpit type="int">1</cockpit>
    </rating>
    
    <author>Marshall Gusman (DaSH FDM), Wayne Bragg (3D, power curves, effects)</author>
    
    <flight-model>jsb</flight-model>
    
    <aero>sumpac-fdm</aero>

    <!-- Splash screens. One is randomly chosen when FlightGear starts -->
    <previews>
        <preview>
            <type>exterior</type>
            <path>Previews/sumpac1.jpg</path>
            <splash type="bool">true</splash>
        </preview>
        <preview>
            <type>exterior</type>
            <path>Previews/sumpac2.jpg</path>
            <splash type="bool">true</splash>
        </preview>
        <preview>
            <type>exterior</type>
            <path>Previews/sumpac3.jpg</path>
            <splash type="bool">true</splash>
        </preview>
        <preview>
            <type>exterior</type>
            <path>Previews/sumpac4.jpg</path>
            <splash type="bool">true</splash>
        </preview>
        <preview>
            <type>exterior</type>
            <path>Previews/sumpac5.jpg</path>
            <splash type="bool">false</splash>
        </preview>
        <preview>
            <type>exterior</type>
            <path>Previews/sumpac6.jpg</path>
            <splash type="bool">true</splash>
        </preview>
        <preview>
            <type>exterior</type>
            <path>Previews/sumpac7.jpg</path>
            <splash type="bool">true</splash>
        </preview>
        <preview>
            <type>exterior</type>
            <path>Previews/sumpac8.jpg</path>
            <splash type="bool">true</splash>
        </preview>
        <preview>
            <type>exterior</type>
            <path>Previews/sumpac9.jpg</path>
            <splash type="bool">true</splash>
        </preview>
        <preview>
            <type>exterior</type>
            <path>Previews/sumpac10.jpg</path>
            <splash type="bool">true</splash>
        </preview>
        <preview>
            <type>exterior</type>
            <path>Previews/sumpac11.jpg</path>
            <splash type="bool">true</splash>
        </preview>
        <preview>
            <type>exterior</type>
            <path>Previews/sumpac12.jpg</path>
            <splash type="bool">true</splash>
        </preview>
        <preview>
            <type>exterior</type>
            <path>Previews/sumpac13.jpg</path>
            <splash type="bool">true</splash>
        </preview>

    </previews>
    <startup>
        <splash-texture>Aircraft/SUMPAC/Previews/sumpac1.jpg</splash-texture>
        <airport-location type="bool">false</airport-location>
    </startup>

    <model>
        <path>Aircraft/SUMPAC/Models/sumpac-model.xml</path>
        <covering type="bool">false</covering>
    </model>

<!--
<sound><path></path></sound>
The path to your aircraft's sound file, do not include if you don't have one. The pitch and volume of the sound is controlled by the xml file and throttle position. If for example you find a nice wav file of the jet engine you're using, you can fix it up with your favorite sound editor so it loops nicely and include that into your model (I've noticed a few models where it can get quite annoying when the loop length is so small you can really notice it) so make it smooth.

For additional information, you'll want to check out $FG ROOT/Docs/README.xmlsound

<panel><path></path></panel>
Where to find the (2D) panel. We prefer 3D cockpits, which are linked in the model .xml file.

More info here: http://wiki.flightgear.org/XML#3._Data
-->
    <systems>

        <!-- Needed by shadows in ALS and other ground effects:
            http://forum.flightgear.org/viewtopic.php?f=4&t=25157&start=75#p232120
        -->
        <property-rule n="101">
            <path>Aircraft/SUMPAC/Systems/ground-effects.xml</path>
        </property-rule>
        <property-rule n="102">
            <path>Aircraft/SUMPAC/Systems/sim-control.xml</path>
        </property-rule>

        <!--property-rule n="103">
            <path>Aircraft/SUMPAC/Systems/wingflex.xml</path>
        </property-rule-->

    </systems>
    
    <!-- Save some properties when the simulator is shut down -->
    <aircraft-data>
        <!--path>/fdm/jsbsim/power-curve</path>
        <path>/fdm/jsbsim/pedal-power</path>
        <path>/sim/rendering/shadow-volume</path>
        <path>/sim/model/occupants</path-->    
        <path>/sim/gui/show-power-output</path>
        <path>/sim/gui/show-range</path>
        <path>/sim/rendering/high-detail</path>
        <path>/controls/flight/two-axis-control</path>
        <path>/sim/model/covering</path>
        <path>/sim/rendering/course</path>
        <path>/sim/rendering/course-pole-type</path>
    </aircraft-data>

    <multiplay>
        <chat_display>1</chat_display>
        <generic>
        </generic>
    </multiplay>

    <!--flight-recorder>
        <replay-config type="int">0</replay-config>
        <config n="0" include="Systems/flight-recorder/flight-recorder.xml">
            <name type="string">SUMPAC Flight Recorder</name>
        </config>
    </flight-recorder-->

    <menubar include="gui/dialogs/sumpac-menu.xml"/>

    <rendering>
        <!-- Enable the ALS shadow volume by default -->
        <!--shadow-volume type="bool">true</shadow-volume-->

        <high-detail type="bool">false</high-detail>
        <reset type="bool">false</reset>
        <course type="bool">false</course>
        <course-pole-type type="bool">false</course-pole-type>
    </rendering>

    <gui>
        <show-power-output type="bool">true</show-power-output>
        <show-range type="bool">false</show-range>
    </gui>

  </sim>

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

    <engines>
        <!-- Following properties are part of a static list of properties
             that FlightGear transmits during multiplay. Because the number
             of properties in /sim/multiplay/generic/ is quite limited and
             the properties in /engines/ are unused, we can use them instead
             to get FlightGear to transmit all the required properties.
        -->

        <!-- Rotation of tires -->
        <engine n="3">
            <n1 alias="/gear/gear[0]/rollspeed-ms"/>
            <n2 alias="/gear/gear[1]/rollspeed-ms"/>
        </engine>
    </engines>

    <nasal>
        <sumpac>
            <file>Nasal/sumpac.nas</file>
            <file>Nasal/flashlight.nas</file>
            <file>Nasal/kremer-course.nas</file>
        </sumpac>
    </nasal>

    <payload>
        <weight>
            <name type="string">Pilot</name>
            <weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[0]"/>
            <arm-in alias="/fdm/jsbsim/inertia/pointmass-location-X-inches[0]"/>
            <min-lb type="double">0.0</min-lb>
            <max-lb type="double">300.0</max-lb>
        </weight>
    </payload>

    <fdm>
        <jsbsim>
            <electric-power type="int">1</electric-power>
            <power-curve type="int">7</power-curve>
            <user-power-curve>
                <user-exponent type="double">0</user-exponent>
                <user-coefficient type="double">0</user-coefficient>
            </user-power-curve>
            <elapsed-time type="double">0.0</elapsed-time>
	          <sumpac>
                <curve-texta type="string">The user defined power curve function allows the user to configure the SUMPAC to be powered consistant with their own personal statistical data sets.</curve-texta>
                <curve-textb type="string">The 4 sustained outputs are common trend point of human power generation.</curve-textb>
                <curve-textc type="string">The Human Power Curves are taken from existing data compiled by NASA and from actual data points collected from various competitions and events. These configurations mimic real life human power output limitations over time. (See SUMPAC\Systems\sumpac-power-curves.xml and \SUMPAC\Images\humanpoweroutput.jpg for more information).</curve-textc>
                <curve-textd type="string">The throttle controlled "Electric Motor" configuration allows the user complete controll over the watts to be applied to the SUMPAC aircraft. Use this configuration along with the "Show Power Output" dialog to fine tune the power level.</curve-textd>
            </sumpac>
        </jsbsim>
    </fdm>

    <controls>
        <flight>
            <two-axis-control type="bool">false</two-axis-control>
        </flight>
    </controls>
    
</PropertyList>
