<?xml version="1.0"?>
<PropertyList include="walker-include.xml">
	<sim>
		<description>Moyes Dragonfly</description>
		<aircraft-version>1.0</aircraft-version>
		<minimum-fg-version>2016.1.0</minimum-fg-version>
		<author>Torsten Dreyer, D-NXKT, Bea Wolf</author>
		<tags>
			<tag>ultralight</tag>
			<tag>fixed-gear</tag>
			<tag>tail-dragger</tag>
			<tag>stol</tag>
			<tag>tow</tag>
			<tag>piston</tag>
			<tag>1-engine</tag>
		</tags>
		<status>early production</status>
		<rating>
			<FDM type="int">4</FDM>
			<systems type="int">4</systems>
			<cockpit type="int">5</cockpit>
			<model type="int">3</model>
		</rating>
		<flight-model>jsb</flight-model>
		<aero>Dragonfly-jsbsim</aero>
		<status>production</status>
		<submodels>
			<serviceable type="bool">true</serviceable>
			<path>Aircraft/Dragonfly/Models/Banner/Dragonfly-submodels.xml</path>
		</submodels>
		<sound>
			<path>Aircraft/Dragonfly/Sounds/dragonfly-sound.xml</path>
		</sound>
<!--
		<panel>
			<visibility archive="n">false</visibility>
		</panel>
-->
		<panel>
			<!-- generic panel imperial units -->
			<path>Aircraft/Dragonfly/Panels/generic-panel-metric-units.xml</path>
			<visibility>false</visibility>
			<hide-nonzero-view>false</hide-nonzero-view>
			<hide-nonzero-heading-offset>false</hide-nonzero-heading-offset>
		</panel>
		<panel_2>
			<!-- generic panel metric units -->
			<path>Aircraft/Dragonfly/Panels/generic-panel-imperial-units.xml</path>
		</panel_2>

		<previews>
			<preview>
				<type>exterior</type>
				<path>Previews/exterior1.jpg</path>
				<splash type="bool">true</splash>
			</preview>
		</previews>
		<menubar>
			<default>
				<menu n="9">
					<item n="2">
						<key>?</key>
						<name>aircraft-keys</name>
						<binding>
							<command>dialog-show</command>
							<dialog-name>dragonfly-help</dialog-name>
						</binding>
					</item>
				</menu>
				<menu n="10">
					<label>Moyes Dragonfly</label>
					<enabled type="bool">true</enabled>
					<item>
						<label>Configuration</label>
						<binding>
							<command>dialog-show</command>
							<dialog-name>ac-config</dialog-name>
						</binding>
					</item>
					<item>
						<label>Select Livery</label>
						<binding>
							<command>nasal</command>
							<script>aircraft.livery.dialog.open()</script>
						</binding>
					</item>
					<item>
						<label>Weight and Balance</label>
						<binding>
							<command>dialog-show</command>
							<dialog-name>weight_and_balance_dialog</dialog-name>
						</binding>
						<binding>
							<command>nasal</command>
							<script>dragonfly.weight_and_balance()</script>
						</binding>
					</item>
					<item>
						<label>Banner Configuration</label>
						<binding>
							<command>dialog-show</command>
							<dialog-name>banner_dialog</dialog-name>
						</binding>
					</item>
					<item>
						<label>Place Banner</label>
						<binding>
							<command>nasal</command>
							<script>
								dragonfly.setBannerOnPosition();
								setprop("sim/hitches/aerotow/bridle/exist",1);
							</script>
						</binding>
					</item>
					<item>
						<label>Emergency Parachute Configuration</label>
						<binding>
							<command>dialog-show</command>
							<dialog-name>parachute_dialog</dialog-name>
						</binding>
					</item>
					<item>
						<label>Repack Parachute</label>
						<binding>
							<command>property-assign</command>
							<property>/fdm/jsbsim/systems/chute/chute-cmd-norm</property>
							<value>0</value>
						</binding>
						<binding>
							<command>property-assign</command>
							<property>sim/model/parachute/parachute</property>
							<value>0</value>
						</binding>
					</item>
					<item>
						<label>Recharge Battery</label>
						<binding>
							<command>nasal</command>
							<script>dragonfly.battery.reset_to_full_charge();</script>
						</binding>
					</item>
					<item>
						<label>Aerotow Settings</label>
						<binding>
							<command>dialog-show</command>
							<dialog-name>aerotow_dialog</dialog-name>
						</binding>
					</item>
				</menu>
			</default>
		</menubar>
		<multiplay>
			<generic>
				<int n="0" alias="/sim/hitches/aerotow/bridle/exist"/>
				<int n="1" alias="/sim/model/banner-on-hook"/>
				<int n="2" alias="/sim/model/humans/pilot"/>
				<int n="3" alias="/sim/model/humans/copilot"/>
				<int n="4" alias="/sim/model/big-panel"/>
				<int n="5" alias="/sim/model/eis"/>
				<int n="6" alias="/sim/model/hwm"/>
				<int n="7" alias="/sim/model/woolthread"/>
				<float n="0" alias="/sim/hitches/aerotow/bridle/bridle_alpha_segment1-deg"/>
				<float n="1" alias="/sim/hitches/aerotow/bridle/bridle_alpha_segment2-deg"/>
				<float n="2" alias="/sim/hitches/aerotow/bridle/bridle_beta_segment1-deg"/>
				<float n="3" alias="/sim/hitches/aerotow/bridle/bridle_beta_segment2-deg"/>
				<float n="4" alias="/sim/hitches/aerotow/bridle/bridle_length_segment1-m"/>
				<float n="5" alias="/sim/hitches/aerotow/bridle/bridle_length_segment2-m"/>
				<float n="6" alias="/sim/hitches/aerotow/bridle/bridle-diameter-mm"/>
				<float n="7" alias="/sim/model/parachute/parachute-pos-norm"/>
				<float n="8" alias="/sim/model/banner/alpha-deg"/>
				<float n="9" alias="/sim/model/banner/beta-deg"/>
				<float n="10" alias="/sim/model/wind-speed-stage2"/>
				<float n="11" alias="/sim/model/wind-integrator"/>
				<float n="12" alias="/consumables/fuel/tank[0]/level-norm-untied"/>
				<float n="13" alias="/sim/model/fuel-tank-effect/pitch-rad"/>
				<float n="14" alias="/sim/model/fuel-tank-effect/roll-rad"/>
				<float n="15" alias="/controls/flight/aileron"/>
				<float n="16" alias="/instrumentation/airspeed-indicator[1]/needle-unit"/>
				<float n="17" alias="/instrumentation/woolthread/alpha-woolthread-deg"/>
				<float n="18" alias="/instrumentation/woolthread/beta-woolthread-deg"/>
			</generic>
		</multiplay>
		<model>
			<path archive="y">Aircraft/Dragonfly/Models/dragonfly.xml</path>
			<fallback-model-index>708</fallback-model-index>
			<banner-on-hook type="bool">false</banner-on-hook>
			<rendering>
				<reflection-enabled type="int">1</reflection-enabled>
				<reflection-type type="int">2</reflection-type>
				<reflection-dynamic type="int">1</reflection-dynamic>
				<reflection-correction type="float">0.3</reflection-correction>
				<reflection-fresnel type="float">0.5</reflection-fresnel>
				<reflection-fresnel-factor type="float">0.2</reflection-fresnel-factor>
				<reflection-rainbow type="float">0.3</reflection-rainbow>
				<reflection-noise type="float">0.05</reflection-noise>
				<ambient-correction type="float">0.15</ambient-correction>
			</rendering>
			<big-panel type="bool">true</big-panel>
			<eis type="bool">true</eis>
			<hwm type="bool">true</hwm>
			<woolthread type="bool">true</woolthread>
			<dragonfly>
				<sound>
					<click-switch type="bool">0</click-switch>
					<click-starter type="bool">0</click-starter>
				</sound>
			</dragonfly>
			<humans>
				<show-humans type="bool">true</show-humans>
				<always-show-humans type="bool">true</always-show-humans>
				<pilot type="int">0</pilot>
				<pilot_helmet type="bool">true</pilot_helmet>
				<copilot type="int">0</copilot>
				<copilot_helmet type="bool">true</copilot_helmet>
			</humans>
			<banner>
				<cd-banner type="float">0.01</cd-banner>
				<area-banner-sqm type="float">17.</area-banner-sqm>
				<CDxA-banner-sqm type="float">0.17</CDxA-banner-sqm>
				<CDxA-banner-sqft type="float">1.8298</CDxA-banner-sqft>
			</banner>
			<parachute>
				<parachute type="bool">0</parachute>
				<cd type="float">1.2</cd>
				<area-sqm type="float">91.</area-sqm>
				<CDxA-sqm type="float">109.2</CDxA-sqm>
				<CDxA-sqft type="float">1175.42</CDxA-sqft>
			</parachute>
<!--
			<wind-speed-stage2 type="float">0.0</wind-speed-stage2>
			<wind-integrator type="float">0.0</wind-integrator>
-->
		</model>
		<view n="0">
			<internal archive="y">true</internal>
			<config>
				<x-offset-m archive="y">0.0</x-offset-m>
				<y-offset-m archive="y">0.68</y-offset-m>
				<z-offset-m archive="y">-0.94</z-offset-m>
				<pitch-offset-deg>-12</pitch-offset-deg>
			</config>
		</view>
		<view n="1">
			<config>
				<target-y-offset-m>0</target-y-offset-m>
				<target-z-offset-m>0</target-z-offset-m>
			</config>
		</view>
		<view n="2">
			<config>
				<target-y-offset-m>0</target-y-offset-m>
				<target-z-offset-m>0</target-z-offset-m>
			</config>
		</view>
		<view n="3">
			<config>
				<target-y-offset-m>0</target-y-offset-m>
				<target-z-offset-m>0</target-z-offset-m>
			</config>
		</view>
		<view n="5">
			<config>
				<target-y-offset-m>0</target-y-offset-m>
				<target-z-offset-m>0</target-z-offset-m>
			</config>
		</view>
		<view n="6">
			<config>
				<target-y-offset-m>0</target-y-offset-m>
				<target-z-offset-m>0</target-z-offset-m>
			</config>
		</view>
		<view n="100">
			<name>Back Seat View</name>
			<type>lookfrom</type>
			<internal archive="y">true</internal>
			<config>
				<from-model type="bool">true</from-model>
				<from-model-idx type="int">0</from-model-idx>
				<ground-level-nearplane-m type="double">0.05</ground-level-nearplane-m>
				<default-field-of-view-deg type="double">55</default-field-of-view-deg>
				<pitch-offset-deg>-12</pitch-offset-deg>
				<x-offset-m archive="y">0.0</x-offset-m>
				<y-offset-m archive="y">0.75</y-offset-m>
				<z-offset-m archive="y">0.05</z-offset-m>
			</config>
		</view>
		<view n="101">
			<name>Mirror View</name>
			<type>lookfrom</type>
			<internal archive="y">true</internal>
			<config>
				<from-model type="bool">true</from-model>
				<from-model-idx type="int">0</from-model-idx>
				<default-field-of-view-deg type="double">55</default-field-of-view-deg>
				<pitch-offset-deg>0</pitch-offset-deg>
				<heading-offset-deg type="double">180.</heading-offset-deg>
				<x-offset-m archive="y">-0.4349</x-offset-m>
				<y-offset-m archive="y">0.06759</y-offset-m>
				<z-offset-m archive="y">-1.4341</z-offset-m>
			</config>
		</view>
		
		<view n="102">
			<name>Hook View</name>
			<type>lookfrom</type>
			<internal archive="y">true</internal>
			<enabled type="bool">false</enabled>
			<config>
				<from-model type="bool">true</from-model>
				<from-model-idx type="int">0</from-model-idx>
				<default-field-of-view-deg type="double">55</default-field-of-view-deg>
				<pitch-offset-deg>0</pitch-offset-deg>
				<heading-offset-deg type="double">90.</heading-offset-deg>
				<x-offset-m archive="y">6.</x-offset-m>
				<y-offset-m archive="y">-0.06759</y-offset-m>
				<z-offset-m archive="y">3.</z-offset-m>
			</config>
		</view>
		
		<checklists include="dragonfly-checklists.xml"/>
		<systems>
			<path>Aircraft/Dragonfly/Systems/systems.xml</path>
		</systems>
		<instrumentation>
			<path>Aircraft/Dragonfly/Systems/instrumentation.xml</path>
		</instrumentation>
		<aircraft-data>
			<path>/instrumentation/airspeed-indicator/unit</path>
			<path>/instrumentation/airspeed-indicator[1]/unit</path>
			<path>/sim/model/livery/texture</path>
			<path>/sim/model/big-panel</path>
			<path>/sim/model/eis</path>
			<path>/sim/model/hwm</path>
			<path>/sim/model/woolthread</path>
			<path>/sim/model/humans/show-humans</path>
			<path>/sim/model/humans/always-show-humans</path>
			<path>/sim/model/humans/pilot</path>
			<path>/sim/model/humans/pilot_helmet</path>
			<path>/sim/model/humans/copilot</path>
			<path>/sim/model/humans/copilot_helmet</path>
			<path>/sim/hitches/aerotow/tow/brake-force</path>
			<path>/sim/hitches/aerotow/bridle/exist</path>
			<path>/sim/hitches/aerotow/bridle/bridle-length-m</path>
			<path>/sim/hitches/aerotow/bridle/bridle-diameter-mm</path>
			<path>/sim/hitches/aerotow/rope/rope-diameter-mm</path>
			<path>/controls/flight/auto-coordination</path>
		</aircraft-data>
		<hitches>
			<aerotow>
				<force_name_jsbsim type="string">hitch</force_name_jsbsim>
				<force-is-calculated-by-other type="bool">true</force-is-calculated-by-other>
				<decoupled-force-and-rope-locations type="bool">false</decoupled-force-and-rope-locations>
				<mp-auto-connect-period type="float">1.0</mp-auto-connect-period>
				<local-pos-x type="float">0.0</local-pos-x>
				<local-pos-y type="float">0.0</local-pos-y>
				<local-pos-z type="float">0.0</local-pos-z>
				<tow>
					<brake-force type="float">10000</brake-force>
				</tow>
				<rope>
					<rope-diameter-mm type="float">8</rope-diameter-mm>
				</rope>
				<bridle>
					<exist type="int">0</exist>
					<bridle-length-m type="float">7.0</bridle-length-m>
					<bridle-diameter-mm type="float">8</bridle-diameter-mm>
				</bridle>
			</aerotow>
		</hitches>
		<view-preMirror type="int">0</view-preMirror>
	</sim>
	<controls>
		<circuit-breakers>
			<master type="bool">1</master>
		</circuit-breakers>
		<electric>
			<master-switch type="bool">0</master-switch>
		</electric>
		<engines>
			<engine n="0">
				<left-magneto-switch type="bool">0</left-magneto-switch>
				<right-magneto-switch type="bool">0</right-magneto-switch>
			</engine>
		</engines>
		<flight>
			<aileron-trim>0.00</aileron-trim>
			<elevator-trim>0.025</elevator-trim>
			<rudder-trim>0.00</rudder-trim>
			<auto-coordination-factor type="float">1.</auto-coordination-factor>
		</flight>
		<switches>
			<starter type="bool">0</starter>
		</switches>
		<banner-release type="bool">false</banner-release>
		<hook-lever-open type="float">false</hook-lever-open>
	</controls>
	<input>
		<keyboard>
			<key n="63">
				<name>?</name>
				<desc>Show help dialog</desc>
				<binding>
					<command>dialog-show</command>
					<dialog-name>dragonfly-help</dialog-name>
				</binding>
			</key>
			<key n="77">
				<name>M</name>
				<desc>Master Switch Off</desc>
				<binding>
					<command>property-assign</command>
					<property>/controls/electric/master-switch</property>
					<value>0</value>
				</binding>
			</key>
			<key n="109">
				<name>m</name>
				<desc>Master Switch On</desc>
				<binding>
					<command>property-assign</command>
					<property>/controls/electric/master-switch</property>
					<value>1</value>
				</binding>
			</key>
			<key n="111">
				<name>o</name>
				<desc>release banner</desc>
				<binding>
					<command>property-assign</command>
					<property>controls/banner-release</property>
					<value type="bool">true</value>
				</binding>
				<binding>
					<command>property-interpolate</command>
					<property>/controls/hook-lever-open</property>
					<value>1</value>
					<time>0.5</time>
				</binding>
				<binding>
					<command>nasal</command>
					<script>
						setprop("controls/banner-release","true");
						towing.releaseHitch("aerotow");
						if(getprop("sim/hitches/aerotow/bridle/exist") > 0 ) {
							if(getprop("sim/hitches/aerotow/broken") ){
								setprop("sim/hitches/aerotow/bridle/exist",4);
							} else {
								setprop("sim/hitches/aerotow/bridle/exist",2);
							}
						}
					</script>
				</binding>
				<mod-up>
					<binding>
						<command>property-interpolate</command>
						<property>/controls/hook-lever-open</property>
						<value>0</value>
						<time>0.5</time>
					</binding>
				</mod-up>
			</key>
			<key n="79">
				<name>O</name>
				<desc>Toggle bridle and replace broken weak link</desc>
				<binding>
					<command>property-toggle</command>
					<property>sim/hitches/aerotow/bridle/exist</property>
				</binding>
				<binding>
					<command>nasal</command>
					<script>
						setprop("sim/hitches/aerotow/broken",0);
					</script>
				</binding>
			</key>
			<key n="82">
				<name>R</name>
				<desc>Toggle Auto-Coordination Aileron+Rudder</desc>
				<binding>
					<command>property-toggle</command>
					<property>controls/flight/auto-coordination</property>
					<value>0</value> 
				</binding>
				<binding>
					<command>nasal</command>
					<script>
						if ( getprop("controls/flight/auto-coordination") )
						{ setprop("sim/messages/atc", sprintf("auto-coordination enabled") ) }
						else { setprop("sim/messages/atc", sprintf("auto-coordination disabled")) }
					</script>
				</binding>
			</key>
			<key n="93">
				<name>]</name>
				<desc>Deploy parachute</desc>
				<binding>
					<command>property-assign</command>
					<property>sim/model/parachute/parachute</property>
					<value>1</value>
				</binding>
			</key>
			<key n="91">
				<name>[</name>
				<desc>Retract parachute</desc>
				<binding>
					<command>property-assign</command>
					<property>sim/model/parachute/parachute</property>
					<value>0</value>
				</binding>
			</key>
			<key n="32">
				<name> </name>
				<desc>Mirror View</desc>
				<binding>
					<command>nasal</command>
					<script>
						setprop("sim/view-preMirror",getprop("sim/current-view/view-number"));
					</script>
				</binding>
				<binding>
					<command>property-assign</command>
					<property>sim/current-view/view-number</property>
					<!-- <value>10</value>  -->
					<property>sim/view[101]/actual-view-number</property>
				</binding>
				<mod-up>
					<binding>
						<command>property-swap</command>
						<property>sim/current-view/view-number</property>
						<property>sim/view-preMirror</property>
					</binding>
				</mod-up>
			</key>
		</keyboard>
	</input>
	<engines>
		<engine>
			<rpm type="double">1000</rpm>
			<coolant-degf type="double">0.0</coolant-degf> <!-- TODO -->
		</engine>
	</engines>
	<fdm>
		<jsbsim>
			<external_reactions>
				<hitch>
					<magnitude type="double">0.</magnitude>
					<x type="double">0.</x>
					<y type="double">0.</y>
					<z type="double">0.</z>
				</hitch>
			</external_reactions>
			<systems>
				<chute>
					<chute-cmd-norm type="bool">0</chute-cmd-norm>
					<chute-size-factor type="double">0.8</chute-size-factor>
				</chute>
			</systems>
			<inertia>
				<pointmass-weight-kg type="double">90.</pointmass-weight-kg>
				<pointmass-weight-kg type="double">0.</pointmass-weight-kg>
				<pointmass-weight-kg type="double">2.</pointmass-weight-kg>
				<pointmass-weight-kg type="double">0.</pointmass-weight-kg>
			</inertia>
		</jsbsim>
	</fdm>
	<payload>
		<weight>
			<name type="string">Pilot</name>
			<weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[0]"/>
			<min-lb type="double">0.0</min-lb>
			<max-lb type="double">240.0</max-lb>
		</weight>
		<weight>
			<name type="string">Co Pilot</name>
			<weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[1]"/>
			<min-lb type="double">0.0</min-lb>
			<max-lb type="double">240.0</max-lb>
		</weight>
	</payload>
	<instrumentation>
		<airspeed-indicator n="0">
			<texture type="int">0</texture>
			<serviceable type="bool">true</serviceable>
		</airspeed-indicator>
		<airspeed-indicator n="1">
			<texture type="int">0</texture>
			<indicated-speed-kt type="double">0.0</indicated-speed-kt>
			<pitot-tube-reference-speed-kt type="double">0.0</pitot-tube-reference-speed-kt>
			<serviceable type="bool">true</serviceable>
		</airspeed-indicator>
		<altimeter n="0">
			<serviceable type="bool">true</serviceable>
		</altimeter>
		<altimeter n="1">
			<serviceable type="bool">true</serviceable>
		</altimeter>
		<eis2000g>
			<buttons>
				<display type="bool">false</display>
			</buttons>
		</eis2000g>
	</instrumentation>
	<nasal>
		<updateloop>
			<file>Aircraft/Generic/updateloop.nas</file>
		</updateloop>
		<dragonfly>
			<file>Aircraft/Dragonfly/Nasal/Banner.nas</file>
			<file>Aircraft/Dragonfly/Nasal/instrumentation.nas</file>
			<file>Aircraft/Dragonfly/Nasal/dragonfly.nas</file>
			<file>Aircraft/Dragonfly/Nasal/electrical.nas</file>
			<file>Aircraft/Dragonfly/Nasal/TowSystem.nas</file>
			<file>Aircraft/Dragonfly/Nasal/weight_and_balance.nas</file>
			<file>Aircraft/Dragonfly/Nasal/wool_thread.nas</file>
			<file>Aircraft/Dragonfly/Nasal/parachute.nas</file>
		</dragonfly>
		<canvas_eis2000g>
			<file>Aircraft/Dragonfly/Models/Instruments/EIS-2000G/eis2000g.nas</file>
		</canvas_eis2000g>
	</nasal>
	<systems>
		<pitot n="0">
			<serviceable type="bool">true</serviceable>
		</pitot>
		<pitot n="1">
			<serviceable type="bool">true</serviceable>
		</pitot>
		<static n="0">
			<serviceable type="bool">true</serviceable>
		</static>
		<static n="1">
			<serviceable type="bool">true</serviceable>
		</static>
		<static n="2">
			<serviceable type="bool">true</serviceable>
		</static>
	</systems>

</PropertyList>
