<?xml version="1.0" encoding="UTF-8" ?>

<PropertyList>

	<sim>
		<description>ATR 72-500</description>
		<status>beta</status>
		<author>Ryan Miller (3d), Ryan Miller (FDM)</author>
		<flight-model>yasim</flight-model>
		<aero>ATR-72-500</aero>

		<model>
			<path>Aircraft/ATR-72-500/Models/ATR-72-500.xml</path>
			<livery>
				<file>EXK</file>
				<configuration>pax</configuration>
				<registration type="string" />
				<number-of-blades type="int">6</number-of-blades>
			</livery>
			<pushback>
				<kp type="double">0.05</kp>
				<ti type="double">10</ti>
				<td type="double">0.00001</td>
			</pushback>
		</model>

		<startup>
			<splash-texture>Aircraft/ATR-72-500/splash.png</splash-texture>
		</startup>

		<tutorials include="Tutorials/ATR-72-tutorials.xml" />

		<systems>
			<!-- Disable generic electrical system and use the Nasal system -->
			<electrical>
				<path></path>
			</electrical>
			<autopilot>
				<name>Autopilot helpers</name>
				<path>Aircraft/Generic/generic-autopilot-helper.xml</path>
			</autopilot>
			<autopilot>
				<name>Autopilot</name>
				<path>Aircraft/ATR-72-500/Systems/ATR-72-autopilot.xml</path>
			</autopilot>
			<autopilot>
				<name>Pushback</name>
				<path>Aircraft/ATR-72-500/Systems/pushback.xml</path>
			</autopilot>
		</systems>

		<instrumentation>
			<path>Aircraft/ATR-72-500/Systems/instrumentation.xml</path>
		</instrumentation>

		<sound>
			<path>Aircraft/ATR-72-500/ATR-72-sound.xml</path>
		</sound>

		<flaps>
			<setting>0.000</setting> <!-- 0 -->
			<setting>0.357</setting> <!-- 15 -->
			<setting>0.714</setting> <!-- 30 -->
<!--			<setting>1.000</setting>--> <!-- 42 -->
		</flaps>

		<view>
			<name>Pilot View</name>
			<internal archive="y">true</internal>
			<config>
				<x-offset-m archive="y">-0.6</x-offset-m>
				<y-offset-m archive="y">-1.15</y-offset-m>
				<z-offset-m archive="y">-11</z-offset-m>
				<pitch-offset-deg archive="y">-7</pitch-offset-deg>
			</config>
		</view>
		<view n="100">
			<name>Cabin View</name>
			<type>lookfrom</type>
			<internal archive="y">true</internal>
			<config>
				<from-model type="bool">true</from-model>
				<x-offset-m archive="y">0</x-offset-m>
				<y-offset-m archive="y">-1.15</y-offset-m>
				<z-offset-m archive="y">0</z-offset-m>
				<pitch-offset-deg archive="y">-7</pitch-offset-deg>
			</config>
		</view>
		<view n="101">
			<name>Copilot View</name>
			<type>lookfrom</type>
			<internal archive="y">true</internal>
			<config>
				<from-model type="bool">true</from-model>
				<x-offset-m archive="y">0.6</x-offset-m>
				<y-offset-m archive="y">-1.15</y-offset-m>
				<z-offset-m archive="y">-11</z-offset-m>
				<pitch-offset-deg archive="y">-7</pitch-offset-deg>
			</config>
		</view>
		<chase-distance-m type="double">-30</chase-distance-m>

		<weight n="0">
			<name>Crew</name>
			<weight-lb>250</weight-lb>
			<max-lb>600</max-lb>
			<min-lb>120</min-lb>
		</weight>
		<weight n="1">
			<name>PAX/Cargo</name>
			<weight-lb>8000</weight-lb>
			<max-lb>16045</max-lb>
			<min-lb>0</min-lb>
		</weight>

		<menubar>
			<default>
				<menu n="3">
					<item>
						<name>autopilot</name>
						<label>Autopilot Settings</label>
						<binding>
							<command>nasal</command>
							<script>
							 ATR_72.dialogs.autopilot.open();
							</script>
						</binding>
					</item>
				</menu>
				<menu n="100">
					<label>ATR 72-500</label>
					<enabled type="bool">true</enabled>

					<item>
						<name>autostart</name>
						<label>Autostart</label>
						<binding>
							<command>property-toggle</command>
							<property>sim/model/start-idling</property>
						</binding>
					</item>
					<item>
						<label>Select Livery</label>
						<binding>
							<command>nasal</command>
							<script>
							 aircraft.livery.dialog.open();
							</script>
						</binding>
					</item>
					<item>
						<name>pushback</name>
						<label>Pushback</label>
						<binding>
							<command>dialog-show</command>
							<dialog-name>pushback</dialog-name>
						</binding>
					</item>
					<item>
						<name>lights</name>
						<label>Lights</label>
						<binding>
							<command>nasal</command>
							<script>
							 ATR_72.dialogs.lights.open();
							</script>
						</binding>
					</item>
					<item>
						<name>failures</name>
						<label>Failures</label>
						<binding>
							<command>nasal</command>
							<script>
							 ATR_72.dialogs.failures.open();
							</script>
						</binding>
					</item>
					<item>
						<name>failures</name>
						<label>Tiller steering</label>
						<binding>
							<command>nasal</command>
							<script>
							 ATR_72.dialogs.tiller.open();
							</script>
						</binding>
					</item>
				</menu>
			</default>
		</menubar>

		<help include="ATR-72-help.xml" />

		<multiplay>
			<generic>
				<float n="0" alias="/sim/model/door-positions/pax-left/position-norm" />	<!-- Left PAX door -->
				<float n="1" alias="/sim/model/door-positions/pax-right/position-norm" />	<!-- Right PAX door -->
				<float n="2" alias="/systems/electrical/outputs/nav-lights" />			<!-- Nav lights -->
				<float n="3" alias="/systems/electrical/outputs/beacon" />			<!-- Beacon light -->
				<float n="4" alias="/systems/electrical/outputs/strobe" />			<!-- Strobe lights -->
				<float n="5" alias="/systems/electrical/outputs/taxi-lights" />			<!-- Taxi lights -->
				<float n="6" alias="/systems/electrical/outputs/landing-lights[0]" />		<!-- Port landing light -->
				<float n="7" alias="/systems/electrical/outputs/landing-lights[1]" />		<!-- Starboard landing light -->
				<float n="8" alias="/systems/electrical/outputs/cabin-lights" />		<!-- Cabin lights -->
				<float n="9" alias="/systems/electrical/outputs/cockpit-lights" />		<!-- Cockpit lights -->

				<int n="0" alias="/sim/model/livery/number-of-blades" />			<!-- # of engine blades -->
			</generic>
		</multiplay>
	</sim>

	<autopilot>
		<serviceable type="bool">true</serviceable>
		<yaw-damper-serviceable type="bool">true</yaw-damper-serviceable>
		<settings>
			<lateral type="string"></lateral>
			<vertical type="string"></vertical>
			<heading-bug-deg type="double">0</heading-bug-deg>
			<target-pitch-deg type="double">0</target-pitch-deg>
			<target-altitude-ft type="double">10000</target-altitude-ft>
			<target-speed-kt type="double">180</target-speed-kt>'
			<vertical-speed-fpm type="double">1800</vertical-speed-fpm>
			<bank-limit-deg type="double">27</bank-limit-deg>
		</settings>
	</autopilot>

	<consumables>
		<fuel>
			<tank n="0">
				<name>Left Wing</name>
				<level-gal_us type="double">375</level-gal_us>
			</tank>
			<tank n="1">
				<name>Right Wing</name>
				<level-gal_us type="double">375</level-gal_us>
			</tank>
		</fuel>
	</consumables>

	<controls>
		<engines>
			<engine n="0">
				<condition type="double">0</condition>
				<reverser type="bool">false</reverser>
				<reverser-cmd-norm type="double">0</reverser-cmd-norm>
			</engine>
			<engine n="1">
				<condition type="double">0</condition>
				<reverser type="bool">false</reverser>
				<reverser-cmd-norm type="double">0</reverser-cmd-norm>
			</engine>
			<propeller-brake type="bool">false</propeller-brake>
			<start-switch type="int">0</start-switch>
		</engines>
		<gear>
			<brake-parking type="bool">true</brake-parking>
			<enable-tiller type="bool" archive="y">true</enable-tiller>
			<steering-deg type="double">0</steering-deg>
			<tiller-steering-deg type="double">0</tiller-steering-deg>
		</gear>
		<hydraulic>
			<system n="0">
				<electric-pump n="0" type="bool">true</electric-pump>
				<electric-pump n="1" type="bool">true</electric-pump>
			</system>
			<system n="1">
				<electric-pump type="bool">true</electric-pump>
			</system>
			<x-feed type="bool">false</x-feed>
		</hydraulic>
		<lighting>
			<beacon type="bool">false</beacon>
			<landing-lights n="0" type="bool">false</landing-lights>
			<landing-lights n="1" type="bool">false</landing-lights>
			<taxi-lights type="bool">false</taxi-lights>
			<nav-lights type="bool">false</nav-lights>
			<strobe type="bool">false</strobe>
			<logo-lights type="bool">false</logo-lights>
			<wing-lights type="bool">false</wing-lights>
			<cockpit-lights type="bool">false</cockpit-lights>
			<cabin-lights type="bool">false</cabin-lights>
			<panel-lights type="bool">false</panel-lights>
			<cones type="bool">true</cones>
		</lighting>
		<switches>
			<no-smoking-sign type="bool">false</no-smoking-sign>
			<seatbelt-sign type="bool">false</seatbelt-sign>
		</switches>
	</controls>

	<engines>
		<engine n="0">
			<running type="bool">false</running>
			<on-fire type="bool">false</on-fire>
		</engine>
		<engine n="1">
			<running type="bool">false</running>
			<on-fire type="bool">false</on-fire>
		</engine>
	</engines>

	<gear>
		<gear n="0">
			<tyre-smoke type="int">0</tyre-smoke>
			<sprayspeed-ms type="double">0</sprayspeed-ms>
			<spray-density type="double">0</spray-density>
			<caster-angle-deg-damped type="double">0</caster-angle-deg-damped>
		</gear>
		<gear n="1">
			<tyre-smoke type="int">0</tyre-smoke>
			<sprayspeed-ms type="double">0</sprayspeed-ms>
			<spray-density type="double">0</spray-density>
			<caster-angle-deg-damped type="double">0</caster-angle-deg-damped>
		</gear>
		<gear n="2">
			<tyre-smoke type="int">0</tyre-smoke>
			<sprayspeed-ms type="double">0</sprayspeed-ms>
			<spray-density type="double">0</spray-density>
			<caster-angle-deg-damped type="double">0</caster-angle-deg-damped>
		</gear>
	</gear>

	<instrumentation>
		<airspeed-indicator n="0">
			<airspeed-limit-kt type="double">250</airspeed-limit-kt>
			<index n="0" type="double">117</index>
			<index n="1" type="double">130</index>
		</airspeed-indicator>
		<airspeed-indicator n="1">
			<airspeed-limit-kt type="double">250</airspeed-limit-kt>
			<index n="0" type="double">117</index>
			<index n="1" type="double">130</index>
		</airspeed-indicator>
		<nav-compass n="0">
			<nav-display n="0" type="int">0</nav-display>
			<nav-display n="1" type="int">0</nav-display>
		</nav-compass>
		<nav-compass n="1">
			<nav-display n="0" type="int">0</nav-display>
			<nav-display n="1" type="int">0</nav-display>
		</nav-compass>
	</instrumentation>

	<input>
		<keyboard>
			<!-- Engine controls -->
			<key n="123">
				<name>{</name>
				<desc>Decrease start switch setting/decrease condition</desc>
				<repeatable type="bool">true</repeatable>
				<binding>
					<command>nasal</command>
					<script>
					 var alt = props.globals.getNode("devices/status/keyboard/event/modifier/alt").getBoolValue();
					 if (alt)
					  {
					  ATR_72.incCondition(-0.05);
					  }
					 else
					  {
					  ATR_72.incStarter(-1);
					  }
					</script>
				</binding>
			</key>
			<key n="125">
				<name>}</name>
				<desc>Increase start switch setting/increase condition</desc>
				<repeatable type="bool">true</repeatable>
				<binding>
					<command>nasal</command>
					<script>
					 var alt = props.globals.getNode("devices/status/keyboard/event/modifier/alt").getBoolValue();
					 if (alt)
					  {
					  ATR_72.incCondition(0.05);
					  }
					 else
					  {
					  ATR_72.incStarter(1);
					  }
					</script>
				</binding>
			</key>
			<!-- Tiller steering -->
			<key n="81">
				<name>Q</name>
				<desc>Steer tiller full left</desc>
				<binding>
					<command>property-assign</command>
					<property>controls/gear/tiller-steering-deg</property>
					<value>-60</value>
				</binding>
			</key>
			<key n="113">
				<name>q</name>
				<desc>Steer tiller left</desc>
				<repeatable type="bool">true</repeatable>
				<binding>
					<command>property-adjust</command>
					<property>controls/gear/tiller-steering-deg</property>
					<step>-7.5</step>
					<min>-60</min>
				</binding>
			</key>
			<key n="119">
				<name>w</name>
				<desc>Center tiller</desc>
				<binding>
					<command>property-assign</command>
					<property>controls/gear/tiller-steering-deg</property>
					<value>0</value>
				</binding>
			</key>
			<key n="87">
				<name>W</name>
				<desc>Open tiller dialog</desc>
				<binding>
					<command>nasal</command>
					<script>
					 ATR_72.dialogs.tiller.open();
					</script>
				</binding>
			</key>
			<key n="101">
				<name>e</name>
				<desc>Steer tiller right</desc>
				<repeatable type="bool">true</repeatable>
				<binding>
					<command>property-adjust</command>
					<property>controls/gear/tiller-steering-deg</property>
					<step>7.5</step>
					<max>60</max>
				</binding>
			</key>
			<key n="69">
				<name>E</name>
				<desc>Steer tiller full right</desc>
				<binding>
					<command>property-assign</command>
					<property>controls/gear/tiller-steering-deg</property>
					<value>60</value>
				</binding>
			</key>
			<!-- Reverse thrust -->
			<key n="127">
				<name>Delete</name>
				<desc>Toggle reverse thrust</desc>
				<binding>
					<command>nasal</command>
					<script>
					 ATR_72.engine1.reverse_thrust();
					 ATR_72.engine2.reverse_thrust();
					</script>
				</binding>
			</key>
			<!-- Walk -->
			<key n="114">
				<name>r</name>
				<desc>Walk forward toward view</desc>
				<repeatable type="bool">true</repeatable>
				<binding>
					<command>nasal</command>
					<script>
					 walk.walk_about(0.1);
					</script>
				</binding>
			</key>
			<key n="82">
				<name>R</name>
				<desc>Run forward toward view</desc>
				<repeatable type="bool">true</repeatable>
				<binding>
					<command>nasal</command>
					<script>
					 walk.walk_about(0.25);
					</script>
				</binding>
			</key>
			<key n="102">
				<name>f</name>
				<desc>Walk backward from view</desc>
				<repeatable type="bool">true</repeatable>
				<binding>
					<command>nasal</command>
					<script>
					 walk.walk_about(-0.1);
					</script>
				</binding>
			</key>
			<!-- Autopilot -->
			<key n="1">
				<name>Ctrl-A</name>
				<desc>Toggle autopilot altitude lock</desc>
				<binding>
					<command>nasal</command>
					<script>
					 autopilot.set_vertical("altitude-hold");
					</script>
				</binding>
			</key>
			<key n="7">
				<name>Ctrl-G</name>
				<desc>Toggle autopilot glide slope lock</desc>
				<binding>
					<command>nasal</command>
					<script>
					 autopilot.set_lateral("gs1-hold");
					 autopilot.set_vertical("gs1-hold");
					</script>
				</binding>
			</key>
			<key n="6">
				<name>Ctrl-F</name>
				<desc>Toggle flight director</desc>
				<binding>
					<command>property-toggle</command>
					<property>autopilot/settings/flight-director</property>
				</binding>
			</key>
			<key n="8">
				<name>Ctrl-H</name>
				<desc>Toggle autopilot heading lock</desc>
				<binding>
					<command>nasal</command>
					<script>
					 autopilot.set_lateral("dg-heading-hold");
					</script>
				</binding>
			</key>
			<key n="14">
				<name>Ctrl-N</name>
				<desc>Toggle autopilot nav1 lock</desc>
				<binding>
					<command>nasal</command>
					<script>
					 autopilot.set_lateral("nav1-hold");
					</script>
				</binding>
			</key>
			<key n="262">
				<name>F6</name>
				<desc>Toggle Autopilot Heading Mode</desc>
				<binding>
					<command>nasal</command>
					<script>
					 autopilot.set_lateral("nav1-hold");
					</script>
				</binding>
			</key>
			<key n="25">
				<name>Ctrl-Y</name>
				<desc>Toggle yaw damper</desc>
				<binding>
					<command>property-toggle</command>
					<property>autopilot/settings/yaw-damper</property>
				</binding>
			</key>
			<key n="26">
				<name>Ctrl-Z</name>
				<desc>Toggle autopilot</desc>
				<binding>
					<command>property-toggle</command>
					<property>autopilot/settings/engaged</property>
				</binding>
			</key>
			<key n="267">
				<name>F11</name>
				<desc>Open autopilot dialog</desc>
				<binding>
					<command>nasal</command>
					<script>
					 ATR_72.dialogs.autopilot.open();
					</script>
				</binding>
			</key>
		</keyboard>
	</input>

	<nasal>
		<ATR_72>
			<file>Aircraft/ATR-72-500/Nasal/controls.nas</file>
			<file>Aircraft/ATR-72-500/Nasal/engines.nas</file>
			<file>Aircraft/ATR-72-500/Nasal/doors.nas</file>
			<file>Aircraft/ATR-72-500/Nasal/electrical.nas</file>
			<file>Aircraft/ATR-72-500/Nasal/hydraulics.nas</file>
			<file>Aircraft/ATR-72-500/Nasal/effects.nas</file>
			<file>Aircraft/ATR-72-500/Nasal/systems.nas</file>
		</ATR_72>
		<autopilot>
			<file>Aircraft/ATR-72-500/Nasal/autopilot.nas</file>
		</autopilot>
		<walk>
			<file>Aircraft/ATR-72-500/Nasal/walk.nas</file>
		</walk>
	</nasal>

</PropertyList>
