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

<PropertyList>

	<sim>
		<author>Ampere K Hardraade (3d, FDM), Skyop (systems, instruments, etc.)</author>
		<status>beta</status>

		<model>
			<A320>
				<heading-bug-pfd-deg type="double">0</heading-bug-pfd-deg>
				<heading-bug-deg type="double">0</heading-bug-deg>
				<nav1-bug-deg type="double">0</nav1-bug-deg>
				<nav2-bug-deg type="double">0</nav2-bug-deg>
				<wp-bug-deg type="double">0</wp-bug-deg>
				<ias-bug-kt-norm type="double">0</ias-bug-kt-norm>
				<mach-bug-kt-norm type="double">0</mach-bug-kt-norm>
			</A320>
			<lights>
				<logo-lights type="bool">false</logo-lights>
				<nav-lights type="bool">false</nav-lights>
				<beacon>
					<state type="int">0</state>
				</beacon>
				<strobe>
					<state type="int">0</state>
				</strobe>
			</lights>
			<pushback>
				<kp type="double">1000</kp>
				<ki type="double">0</ki>
				<kd type="double">0</kd>
				<position-norm type="double">0</position-norm>
			</pushback>
		</model>

		<startup>
			<splash-texture>Aircraft/A320-family/splash.png</splash-texture>
		</startup>

		<systems>
			<!-- Disable the generic electrical system and use the Nasal system -->
			<electrical>
				<path></path>
			</electrical>
			<autopilot>
				<name>Autopilot</name>
				<path>Aircraft/A320-family/Systems/a320-autopilot.xml</path>
			</autopilot>
			<autopilot>
				<name>Autopilot helpers</name>
				<path>Aircraft/Generic/generic-autopilot-helper.xml</path>
			</autopilot>
			<autopilot>
				<name>Autobrake</name>
				<path>Aircraft/A320-family/Systems/a320-autobrake.xml</path>
			</autopilot>
			<autopilot>
				<name>Spoilers</name>
				<path>Aircraft/A320-family/Systems/a320-spoilers.xml</path>
			</autopilot>
		</systems>

		<chase-distance-m>-40</chase-distance-m>

		<sound>
			<path>Aircraft/A320-family/A320-sound.xml</path>
		</sound>

		<instrumentation>
			<path>Aircraft/A320-family/Systems/instrumentation.xml</path>
		</instrumentation>

		<alarms>
			<master-caution type="bool">false</master-caution>
		</alarms>

		<menubar>
			<default>
				<menu n="3">
					<item>
						<name>autopilot</name>
						<label>Autopilot Settings</label>
						<binding>
							<command>nasal</command>
							<script>
							 var autopilot = gui.Dialog.new("sim/gui/dialogs/autopilot/dialog", "Aircraft/A320-family/Systems/autopilot-dlg.xml");
							 autopilot.open();
							</script>
						</binding>
					</item>
				</menu>
				<menu n="100">
					<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>
							 var lights = gui.Dialog.new("sim/gui/dialogs/lights/dialog", "Aircraft/A320-family/Systems/lights-dlg.xml");
							 lights.open();
							</script>
						</binding>
					</item>
					<item>
						<name>failures</name>
						<label>Failures</label>
						<binding>
							<command>nasal</command>
							<script>
							 var failures = gui.Dialog.new("sim/gui/dialogs/failures/dialog", "Aircraft/A320-family/Systems/failures-dlg.xml");
							 failures.open();
							</script>
						</binding>
					</item>
					<item>
						<name>mpcopilot</name>
						<label>Select MP Copilot</label>
						<binding>
							<command>nasal</command>
							<script>
							 dual_control_tools.copilot_dialog.show(aircraft_dual_control.copilot_type);
							</script>
						</binding>
					</item>
				</menu>
			</default>
		</menubar>

		<help>
			<title>Airbus A320/318/319/321</title>
			<key>
				<name>Delete</name>
				<desc>toggle thrust reversers</desc>
			</key>
			<key>
				<name>Ctrl-z</name>
				<desc>toggle master autopilot switch</desc>
			</key>
			<key>
				<name>Ctrl-y</name>
				<desc>toggle autothrottle switch</desc>
			</key>
			<key>
				<name>Ctrl-b</name>
				<desc>cycle speedbrake lever setting</desc>
			</key>
			<key>
				<name>Ctrl-k</name>
				<desc>arm/disarm ground spoilers</desc>
			</key>
			<key>
				<name>w</name>
				<desc>walk forward toward view direction</desc>
			</key>
			<key>
				<name>W</name>
				<desc>run forward toward view direction</desc>
			</key>
			<key>
				<name>s</name>
				<desc>walk backward from view direction</desc>
			</key>
			<line>_____ENGINE START PROCEDURE_____</line>
			<line>1. APU starter ON</line>
			<line>2. APU master switch ON</line>
			<line>3. Engine start switch IGN/START</line>
			<line>4. Engine master switches ON</line>
			<line>5. Generator 1 and generator 2 ON</line>
			<line>6. Wait for engines to spool up to 30% N1</line>
			<line>7. APU starter and master switch OFF</line>
			<line>8. Engine start switch NORM</line>
			<line />
			<line>_____TAKEOFF PROCEDURE_____</line>
			<line>1. Flaps 1</line>
			<line>2. Autobrakes MAX</line>
			<line>3. Ground spoilers ARMED</line>
			<line>4. In case of rejected takeoff (RTO), engage reverse thrust</line>
			<line>5. After takeoff, ground spoilers OFF</line>
			<line />
			<line>_____APPROACH/LANDING PROCEDURE_____</line>
			<line>1. Flaps 4</line>
			<line>2. Autobrakes LOW or MED</line>
			<line>3. Ground spoilers ARMED</line>
			<line>4. On touchdown engage reverse thrust</line>
			<line>5. At 60 kts, disengage reverse thrust and retract ground spoilers</line>
			<line>6. Autobrakes OFF (brake manually with joystick or 'b' key)</line>
			<line />
			<line>_____ENGINE SHUTDOWN PROCEDURE_____</line>
			<line>1. Engine master switches OFF</line>
			<line>2. Aircraft lights OFF</line>
			<line>3. Generator 1 and generator 2 OFF</line>
			<line>4. External power ON (if at gate and electrical power is desired)</line>
			<line />
			<line>Tutorials are available on the Airbus A320 series only.</line>
			<line>Have a nice flight!</line>
		</help>

		<!-- Multiplayer properties -->
		<!--
		 .../sim/multiplay/generic/int[0]	- engine type
		 .../sim/multiplay/generic/int[1]	- winglets on/off
		 .../sim/multiplay/generic/int[2]	- port landing light on/off
		 .../sim/multiplay/generic/int[3]	- nose landing light on/off
		 .../sim/multiplay/generic/int[4]	- starboard landing light on/off
		 .../sim/multiplay/generic/int[5]	- navigation lights on/off
		 .../sim/multiplay/generic/int[6]	- logo lights on/off
		 .../sim/multiplay/generic/int[7]	- strobe lights on/off
		 .../sim/multiplay/generic/int[8]	- wing lights on/off
		 .../sim/multiplay/generic/int[9]	- beacon lights on/off
		 .../sim/multiplay/generic/int[10]	- engine 1 contrail on/off
		 .../sim/multiplay/generic/int[11]	- engine 2 contrail on/off

		 .../sim/multiplay/generic/float[0]	- cockpit dome lights
		 .../sim/multiplay/generic/float[1]	- interior cabin lights
		-->
		<multiplay>
			<generic>
				<float n="0" alias="/controls/lighting/dome-norm" />
				<float n="1" alias="/controls/lighting/interior" />
				<int n="2" alias="/controls/lighting/landing-lights[0]" />
				<int n="3" alias="/controls/lighting/landing-lights[1]" />
				<int n="4" alias="/controls/lighting/landing-lights[2]" />
				<int n="5" alias="/sim/model/lights/nav-lights" />
				<int n="6" alias="/sim/model/lights/logo-lights" />
				<int n="7" alias="/sim/model/lights/strobe/state" />
				<int n="8" alias="/controls/lighting/wing-lights" />
				<int n="9" alias="/sim/model/lights/beacon/state" />
				<int n="10" alias="/engines/engine[0]/contrail" />
				<int n="11" alias="/engines/engine[1]/contrail" />
			</generic>
		</multiplay>
	</sim>

	<consumables>
		<fuel>
			<tank n="0">
				<name>LH Inner</name>
			</tank>
			<tank n="1">
				<name>LH Outer</name>
			</tank>
			<tank n="2">
				<name>LH Vent</name>
			</tank>
			<tank n="3">
				<name>Center</name>
			</tank>
			<tank n="4">
				<name>RH Inner</name>
			</tank>
			<tank n="5">
				<name>RH Outer</name>
			</tank>
			<tank n="6">
				<name>RH Vent</name>
			</tank>
		</fuel>
	</consumables>

	<payload>
		<weight n="0">
			<name>Crew</name>
			<weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[0]" />
			<min-lb type="double">120</min-lb>
			<max-lb type="double">600</max-lb>
		</weight>
		<weight n="1">
			<name>PAX</name>
			<weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[1]" />
		</weight>
	</payload>

	<autopilot>
		<autobrake>
			<config>
				<idle-throttle type="double">0.1</idle-throttle>
				<pilot-input type="double">0</pilot-input>
			</config>
			<step type="int">0</step>
		</autobrake>
		<settings>
			<autothrottle type="bool">false</autothrottle>
			<engaged type="bool">false</engaged>
			<altitude>altitude-hold</altitude>
			<heading>dg-heading-hold</heading>
			<heading-mode type="int">0</heading-mode>
			<speed-mode type="int">0</speed-mode>
			<heading-bug-deg type="double">360</heading-bug-deg>
			<target-speed-kt type="double">200</target-speed-kt>
			<target-speed-mach type="double">0</target-speed-mach>
			<target-altitude-ft type="double">10000</target-altitude-ft>
			<vertical-speed-fpm type="double">1800</vertical-speed-fpm>
		</settings>
	</autopilot>

	<controls>
		<APU>
			<fire-switch type="bool">false</fire-switch>
			<master-switch type="bool">false</master-switch>
			<starter type="bool">false</starter>
		</APU>
		<electric>
			<avionics-switch type="bool">true</avionics-switch>
		</electric>
		<engines>
			<engine-start-switch type="int">1</engine-start-switch>
			<engine n="0">
				<cutoff type="bool">true</cutoff>
				<cutoff-switch type="bool">true</cutoff-switch>
				<starter type="bool">false</starter>
				<starter-switch type="bool">false</starter-switch>
			</engine>
			<engine n="1">
				<cutoff type="bool">true</cutoff>
				<cutoff-switch type="bool">true</cutoff-switch>
				<starter type="bool">false</starter>
				<starter-switch type="bool">false</starter-switch>
			</engine>
		</engines>
		<flight>
			<ground-spoilers-armed type="bool">false</ground-spoilers-armed>
			<speedbrake-lever type="double">0</speedbrake-lever>
		</flight>
		<gear>
			<brake-parking type="bool">true</brake-parking>
		</gear>
		<lighting>
			<beacon type="bool">false</beacon>
			<interior type="double">0</interior>
			<cones type="bool">true</cones>
			<dome-norm type="double">0</dome-norm>
			<landing-lights n="0" type="bool">false</landing-lights>
			<landing-lights n="1" type="bool">false</landing-lights>
			<landing-lights n="2" type="bool">false</landing-lights>
			<nav-lights-switch type="int">0</nav-lights-switch>
			<overhead-panel-norm type="double">0.8</overhead-panel-norm>
			<main-panel-pedestal-norm type="double">0.8</main-panel-pedestal-norm>
			<wing-lights type="bool">false</wing-lights>
			<strobe type="bool">false</strobe>
		</lighting>
		<switches>
			<!-- Smoking is bad :P -->
			<no-smoking-sign type="bool">true</no-smoking-sign>
			<seatbelt-sign type="bool">false</seatbelt-sign>
		</switches>
	</controls>
	
	<engines>
		<apu>
			<rpm type="double">0</rpm>
			<on-fire type="bool">false</on-fire>
			<running type="bool">false</running>
			<serviceable type="bool">true</serviceable>
		</apu>
		<engine n="0">
			<contrail type="bool">false</contrail>
			<on-fire type="bool">false</on-fire>
			<reverser-pos-norm type="double">0</reverser-pos-norm>
			<running type="bool">false</running>
		</engine>
		<engine n="1">
			<contrail type="bool">false</contrail>
			<on-fire type="bool">false</on-fire>
			<reverser-pos-norm type="double">0</reverser-pos-norm>
			<running type="bool">false</running>
		</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>
		<cdu>
			<display>IDENT</display>
			<input />
			<serviceable type="bool">true</serviceable>
		</cdu>
		<fmc>
			<to-flap type="double">10</to-flap>
			<vspeeds>
				<V1 type="double">0</V1>
				<VR type="double">0</VR>
				<V2 type="double">0</V2>
			</vspeeds>
		</fmc>
		<mfd>
			<nav-display n="0" type="int">1</nav-display>
			<nav-display n="1" type="int">1</nav-display>
		</mfd>
		<nav-compass>
			<nav-display n="0" type="int">0</nav-display>
			<nav-display n="1" type="int">0</nav-display>
		</nav-compass>

		<!-- See http://wiki.flightgear.org/index.php/GPWS -->
		<mk-viii>
			<serviceable type="bool">true</serviceable>
			<configuration-module>
				<category-1 type="int">255</category-1>
				<category-3 type="int">2</category-3>
				<category-4 type="int">13</category-4>
				<category-5 type="int">0</category-5>
				<category-6 type="int">1</category-6>
				<category-7 type="int">124</category-7>
				<category-8 type="int">2</category-8>
				<category-9 type="int">3</category-9> 
				<category-10 type="int">6</category-10>
				<category-13 type="int">7</category-13>
				<category-14 type="int">0</category-14>
			</configuration-module>
			<inputs>
				<arinc429>
					<decision-height-ncd type="bool">false</decision-height-ncd>
					<decision-height type="double">200</decision-height>
				</arinc429>
			</inputs>
			<speaker>
				<max-dist type="double">2</max-dist>
				<reference-dist type="double">1</reference-dist>
				<volume type="double">0.4</volume>
			</speaker>
			<voice>
				<file-prefix>Sounds/mk-viii/</file-prefix>
			</voice>
		</mk-viii>
		<!-- See http://wiki.flightgear.org/index.php/TCAS -->
		<tcas>
			<serviceable type="bool">true</serviceable>
			<inputs>
				<mode type="int">3</mode>
			</inputs>
<!--			<voice>
				<file-prefix>Sounds/tcas/female/</file-prefix>
			</voice>-->
			<speaker>
				<max-dist type="double">2</max-dist>
				<reference-dist type="double">1</reference-dist>
				<volume type="double">1</volume>
			</speaker>
		</tcas>
	</instrumentation>

	<input>
		<keyboard>
			<key n="127">
				<name>Delete</name>
				<desc>Toggle thrust reversers</desc>
				<binding>
					<command>nasal</command>
					<script>
					 A320.engine1.reverse_thrust();
					 A320.engine2.reverse_thrust();
					</script>
				</binding>
			</key>
			<key n="119">
				<name>w</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="2">
				<name>Ctrl-b</name>
				<desc>Cycle speedbrake setting</desc>
				<binding>
					<command>property-cycle</command>
					<property>controls/flight/speedbrake-lever</property>
					<value>0</value>
					<value>0.5</value>
					<value>1</value>
				</binding>
			</key>
			<key n="11">
				<name>Ctrl-k</name>
				<desc>Arm/disarm ground spoilers</desc>
				<binding>
					<command>property-toggle</command>
					<property>controls/flight/ground-spoilers-armed</property>
				</binding>
			</key>
			<key n="61">
				<name>=</name>
				<desc>Cycle autobrake setting</desc>
				<binding>
					<command>property-cycle</command>
					<property>autopilot/autobrake/step</property>
					<value type="int">0</value> <!-- OFF -->
					<value type="int">1</value> <!-- LOW -->
					<value type="int">2</value> <!-- MED -->
					<value type="int">3</value> <!-- MAX -->
				</binding>
			</key>
			<key n="87">
				<name>W</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="115">
				<name>s</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>

			<!-- Custom autopilot hotkeys -->
<!--			<key n="15">
				<name>Ctrl-O</name>
				<desc>Toggle TO/GA lock</desc>
				<binding>
					<command>nasal</command>
					<script>
					 var node = props.globals.getNode("/autopilot/settings/speed", 1);
					 if (node.getValue() == "speed-to-ga")
					  {
					  node.setValue("");
					  }
					 else
					  {
					  node.setValue("speed-to-ga");
					  }
					</script>
				</binding>
			</key>-->
			<key n="26">
				<name>Ctrl-Z</name>
				<desc>Toggle master autopilot switch</desc>
				<binding>
					<command>property-toggle</command>
					<property>autopilot/settings/engaged</property>
				</binding>
			</key>
			<key n="25">
				<name>Ctrl-Y</name>
				<desc>Toggle autothrottle switch</desc>
				<binding>
					<command>property-toggle</command>
					<property>autopilot/settings/autothrottle</property>
				</binding>
			</key>

			<!-- Default autopilot hotkeys -->
			<key n="1">
				<name>Ctrl-A</name>
				<desc>toggle autopilot altitude lock</desc>
				<binding>
					<command>property-assign</command>
					<property>autopilot/settings/altitude</property>
					<value>altitude-hold</value>
				</binding>
			</key>
			<key n="7">
				<name>Ctrl-G</name>
				<desc>Toggle autopilot glide slope lock</desc>
				<binding>
					<command>nasal</command>
					<script>
					 var hdgNode = props.globals.getNode("/autopilot/settings/heading", 1);
					 var altNode = props.globals.getNode("/autopilot/settings/altitude", 1);

					 if (altNode.getValue() == "gs1-hold")
					  {
					  hdgNode.setValue("dg-heading-hold");
					  altNode.setValue("altitude-hold");
					  }
					 else
					  {
					  hdgNode.setValue("nav1-hold");
					  altNode.setValue("gs1-hold");
					  }
					</script>
				</binding>
			</key>
			<key n="8">
				<name>Ctrl-H</name>
				<desc>Toggle autopilot heading lock</desc>
				<binding>
					<command>property-assign</command>
					<property>autopilot/settings/heading</property>
					<value>dg-heading-hold</value>
				</binding>
			</key>
			<key n="14">
				<name>Ctrl-N</name>
				<desc>Toggle autopilot nav1 lock</desc>
				<binding>
					<command>nasal</command>
					<script>
					 var node = props.globals.getNode("/autopilot/settings/heading", 1);
					 if (node.getValue() == "nav1-hold")
					  {
					  node.setValue("dg-heading-hold");
					  }
					 else
					  {
					  node.setValue("nav1-hold");
					  }
					</script>
				</binding>
			</key>
			<key n="262">
				<name>F6</name>
				<desc>Toggle Autopilot Heading Mode</desc>
				<binding>
					<command>nasal</command>
					<script>
					 var node = props.globals.getNode("/autopilot/settings/heading", 1);
					 if (node.getValue() == "true-heading-hold")
					  {
					  node.setValue("dg-heading-hold");
					  }
					 else
					  {
					  node.setValue("true-heading-hold");
					  }
					</script>
				</binding>
			</key>
			<key n="267">
				<name>F11</name>
				<desc>Open autopilot dialog</desc>
				<binding>
					<command>nasal</command>
					<script>
					 var autopilot = gui.Dialog.new("sim/gui/dialogs/autopilot/dialog", "Aircraft/A320-family/Systems/autopilot-dlg.xml");
					 autopilot.open();
					</script>
				</binding>
			</key>
		</keyboard>
	</input>

	<nasal>
		<A320>
			<file>Aircraft/A320-family/Nasal/engines.nas</file>
			<file>Aircraft/A320-family/Nasal/electrical.nas</file>
			<file>Aircraft/A320-family/Nasal/v-speeds.nas</file>
			<file>Aircraft/A320-family/Nasal/tyresmoke.nas</file>
			<file>Aircraft/A320-family/Nasal/systems.nas</file>
		</A320>
		<walk>
			<file>Aircraft/A320-family/Nasal/walk.nas</file>
		</walk>
		<cdu>
			<file>Aircraft/Instruments-3d/cdu/boeing.nas</file>
		</cdu>
		<!-- Dual control -->
		<dual_control_tools>
			<file>Aircraft/Generic/DualControl/dual-control-tools.nas</file>
		</dual_control_tools>
		<aircraft_dual_control>
			<file>Aircraft/A320-family/DualControl/a320-dual-control.nas</file>
		</aircraft_dual_control>
		<dual_control>
			<file>Aircraft/Generic/DualControl/pilot-dual-control.nas</file>
		</dual_control>
	</nasal>

	<aircraft>
		<door n="0">
			<x-m>16.582</x-m>
			<y-m>9.702</y-m>
			<z-m>3.642</z-m>
		</door>
		<jetway-hood-deg type="double">3</jetway-hood-deg>
	</aircraft>

</PropertyList>
