<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
************************************************************************

This files ties together all the components used by FGFS to represent
he Cessna 550/551 Citation II and its aftermarket engine upgrade the
Sierra Super-II. Components include the flight data model, instrument
panel, and external 3D model.

November 14 2004  Curtis L. Olson  http://www.flightgear.org/~curt
Copyright (c) 2014 Ludovic Brenta <ludovic@ludovic-brenta.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

************************************************************************
-->
<PropertyList>
  <sim>
    <author>Curt Olson - Syd Adams - Ludovic Brenta</author>
    <flight-model>yasim</flight-model>
    <startup>
      <splash-texture>Citation-II-splash.png</splash-texture>
    </startup>
    
    <status>beta</status>
    <rating>
      <FDM type="int">3</FDM>
      <systems type="int">2</systems>
      <cockpit type="int">4</cockpit>
      <model type="int">4</model>
    </rating>

    <model>
      <path>Models/Citation-II.xml</path>
      <autostart type="bool">0</autostart>
      <livery>
        <file type="string">blue-grey</file>
      </livery>
      <registration>
        <red type="double">0</red>
        <green type="double">0</green>
        <blue type="double">0</blue>
      </registration>
      <rendering>
        <refl_correction type="string">-0.1</refl_correction>
        <amb_correction type="string">0.10</amb_correction>
      </rendering>
    </model>

    <view n="0">
      <name>Captain</name>
      <type>lookfrom</type>
      <internal type="bool">true</internal>
      <config>
        <x-offset-m type="double">-0.34</x-offset-m>
        <y-offset-m type="double">0.988</y-offset-m>
        <z-offset-m type="double">3.227</z-offset-m>
        <pitch-offset-deg>-15</pitch-offset-deg>
        <limits>
          <enabled type="bool">true</enabled>
          <left>
            <heading-max-deg type="double">120</heading-max-deg>
            <x-offset-max-m type="double">0.22</x-offset-max-m>
            <x-offset-threshold-deg type="double">45</x-offset-threshold-deg>
          </left>
          <right>
            <heading-max-deg type="double">160</heading-max-deg>
            <x-offset-max-m type="double">0.25</x-offset-max-m>
            <x-offset-threshold-deg type="double">65</x-offset-threshold-deg>
          </right>
        </limits>
      </config>
    </view>

    <view n="1">
      <config>
        <target-z-offset-m archive="y" type="double">6.7</target-z-offset-m>
      </config>
    </view>
    <view n="2">
      <config>
        <target-z-offset-m archive="y" type="double">6.7</target-z-offset-m>
      </config>
    </view>
    <view n="3">
      <config>
        <target-z-offset-m archive="y" type="double">6.7</target-z-offset-m>
      </config>
    </view>
    <view n="4">
      <config>
        <target-z-offset-m archive="y" type="double">6.7</target-z-offset-m>
      </config>
    </view>
    <view n="5">
      <config>
        <target-z-offset-m archive="y" type="double">6.7</target-z-offset-m>
      </config>
    </view>
    <view n="6">
      <config>
        <target-z-offset-m archive="y" type="double">6.7</target-z-offset-m>
      </config>
    </view>
    <view n="7">
      <config>
        <target-z-offset-m archive="y" type="double">6.7</target-z-offset-m>
      </config>
    </view>
    
    <view n="100">
      <name>Passenger 1</name>
      <internal archive="y">true</internal>
      <type>lookfrom</type>
      <config>
        <from-model type="bool">true</from-model>
        <ground-level-nearplane-m type="double">0.5f</ground-level-nearplane-m>
        <heading-offset-deg type="double">180</heading-offset-deg>
        <x-offset-m archive="y" type="double">-0.412</x-offset-m> <!--Right-->
        <y-offset-m archive="y" type="double">0.888</y-offset-m> <!--Up-->
        <z-offset-m archive="y" type="double">5.118</z-offset-m> <!--Back-->
        <default-heading-offset-deg>180</default-heading-offset-deg>
        <pitch-offset-deg>0</pitch-offset-deg>
      </config>
    </view>

    <view n="101">
      <name>Passenger 2</name>
      <internal archive="y">true</internal>
      <type>lookfrom</type>
      <config>
        <from-model type="bool">true</from-model>
        <ground-level-nearplane-m type="double">0.5f</ground-level-nearplane-m>
        <heading-offset-deg type="double">0</heading-offset-deg>
        <x-offset-m archive="y" type="double">0.412</x-offset-m> <!--Right-->
        <y-offset-m archive="y" type="double">0.888</y-offset-m> <!--Up-->
        <z-offset-m archive="y" type="double">7.212</z-offset-m> <!--Back-->
        <default-heading-offset-deg>0</default-heading-offset-deg>
        <pitch-offset-deg>0</pitch-offset-deg>
      </config>
    </view>
    
    <view n="102">
      <name>Copilot</name>
      <internal archive="y">true</internal>
      <type>lookfrom</type>
      <config>
        <from-model type="bool">true</from-model>
        <ground-level-nearplane-m type="double">0.5f</ground-level-nearplane-m>
        <heading-offset-deg type="double">0</heading-offset-deg>
        <x-offset-m archive="y" type="double">0.34</x-offset-m> <!--Right-->
        <y-offset-m archive="y" type="double">0.988</y-offset-m> <!--Up-->
        <z-offset-m archive="y" type="double">3.227</z-offset-m> <!--Back-->
        <pitch-offset-deg>-15</pitch-offset-deg>
        <limits>
          <enabled type="bool">true</enabled>
          <left>
            <heading-max-deg type="double">120</heading-max-deg>
            <x-offset-max-m type="double">0.22</x-offset-max-m>
            <x-offset-threshold-deg type="double">45</x-offset-threshold-deg>
          </left>
          <right>
            <heading-max-deg type="double">160</heading-max-deg>
            <x-offset-max-m type="double">0.25</x-offset-max-m>
            <x-offset-threshold-deg type="double">65</x-offset-threshold-deg>
          </right>
        </limits>
      </config>
    </view>
    
    <chase-distance-m type="double" archive="y">-20.0</chase-distance-m>
    
    <systems>
      <autopilot>
        <path>Systems/Citation-autopilot.xml</path>
      </autopilot>
      <path>Systems/systems.xml</path>
      <property-rule n="100">
        <path>Models/Instruments/instrument-filters.xml</path>
      </property-rule>
    </systems>

    <sound>
      <path>Citation-II-sound.xml</path>
    </sound>
    <hud>
      <enable3d>false</enable3d>
    </hud>
    <virtual-cockpit archive="y">true</virtual-cockpit>
    <allow-toggle-cockpit>true</allow-toggle-cockpit>
    <yokes-visible type="bool">1</yokes-visible>

    <airport>
      <runways>
        <start-offset-m>20</start-offset-m>
      </runways>
    </airport>

    <rendering>  <!-- Set ALS Landing Lights -->
      <als-secondary-lights>
        <landing-light1-offset-deg>-6</landing-light1-offset-deg>
        <landing-light2-offset-deg>6</landing-light2-offset-deg>
      </als-secondary-lights>
    </rendering>

    <help>
      <title>Cessna 550 Citation-II</title>
      <key>
        <name>S</name>
        <desc>autostart</desc>
      </key>
      <key>
        <name>Y</name>
        <desc>Show/Hide Yokes</desc>
      </key>
      <key>
        <name>Ctrl-L</name>
        <desc>Toggle landing lights</desc>
      </key>
      <key>
        <name>Delete</name>
        <desc>toggle thrust reversers (Citation II, not Sierra Super II)</desc>
      </key>
      <key>  
        <name>Ctrl+D</name>
        <desc>Open/close cabin-door</desc>
      </key>
      <key>
        <name>J</name>
        <desc>Retract spoilers</desc>
      </key>
      <key>
        <name>K</name>
        <desc>Extend spoilers (N1 &lt; 85%)</desc>
      </key>
      <key>
        <name>FD OFF</name>
        <desc>Illuminated=OFF.  Engage wing leveler and pitch hold</desc>
      </key>
      <key>
        <name>HDG</name>
        <desc>Follow heading bug</desc>
      </key>
      <key>
        <name>NAV</name>
        <desc>Cycle between wing leveler, NAV1 or NAV2, and GPS</desc>
      </key>
      <key>
        <name>APR</name>
        <desc>NAV1 lateral and glideslope</desc>
      </key>
      <key>
        <name>BC</name>
        <desc>Backcourse</desc>
      </key>
      <key>
        <name>NAV/HSI</name>
        <desc>Toggle the HSI and autopilot between NAV1 and NAV2</desc>
      </key>
      <key>
        <name>ALT</name>
        <desc>Altitude hold</desc>
      </key>
      <key>
        <name>ALT SEL</name>
        <desc>(inoperative)</desc>
      </key>
      <key>
        <name>VNAV</name>
        <desc>(inoperative)</desc>
      </key>
      <key>
        <name>V/S</name>
        <desc>Hold vertical speed</desc>
      </key>
      <key>
        <name>IAS</name>
        <desc>Autothrottle to hold current indicated airspeed</desc>
      </key>
      <key>
        <name>PITCH wheel</name>
        <desc>Adjust pitch, selected altitude or vertical speed</desc>
      </key>
      <line>Autopilot will disengage below decision height or 500ft above ground, whichever is highest.</line>
    </help>

    <weight n="0">
      <name>Frt Baggage</name>
      <weight-lb>0</weight-lb>
      <max-lb>350</max-lb>
      <min-lb>0</min-lb>
    </weight>

    <weight n="1">
      <name>Crew</name>
      <weight-lb>400</weight-lb>
      <max-lb>500</max-lb>
      <min-lb>100</min-lb>
    </weight>

    <weight n="2">
      <name>Passengers</name>
      <weight-lb>636</weight-lb>
      <max-lb>1200</max-lb>
      <min-lb>0</min-lb>
    </weight>

    <weight n="3">
      <name>Rear Baggage</name>
      <weight-lb>0</weight-lb>
      <max-lb>500</max-lb>
      <min-lb>0</min-lb>
    </weight>

    <menubar>
      <default>
        <menu n="10">
          <label>Citation-II</label>
          <enabled type="bool">true</enabled>
          <item>
            <label>Autostart</label>
            <binding>
              <command>property-toggle</command>
              <property>sim/model/autostart</property>
            </binding>
          </item>
          <item>
            <label>Yokes On/Off</label>
            <binding>
              <command>property-toggle</command>
              <property>sim/yokes-visible</property>
            </binding>
          </item>
          <item>
            <label>Select Livery</label>
            <binding>
              <command>nasal</command>
              <script>aircraft.livery.dialog.toggle()</script>
            </binding>
          </item>
        </menu>
      </default>
    </menubar>

    <instrumentation>
      <path>Systems/instrumentation.xml</path>
    </instrumentation>

    <multiplay>
      <generic>
        <int n="0" alias="/systems/electrical/outputs/strobe"/>
        <int n="1" alias="/systems/electrical/outputs/beacon"/>
        <int n="2" alias="/systems/electrical/outputs/nav-lights"/>
        <int n="3" alias="/systems/electrical/outputs/landing-light[0]"/>
        <int n="4" alias="/systems/electrical/outputs/landing-light[1]"/>
        <int n="5" alias="/systems/electrical/outputs/recog-lights"/>
        <float  alias="/controls/cabin-door/position-norm"/>
        <float n="1" alias="/sim/model/registration/red"/>
        <float n="2" alias="/sim/model/registration/green"/>
        <float n="3" alias="/sim/model/registration/blue"/>
        <string  alias="/sim/multiplay/callsign"/>
      </generic>
    </multiplay>
    
    <flight-recorder>
      <replay-config type="int">0</replay-config>
      <config n="0" include="/Aircraft/Generic/flightrecorder/generic-jet.xml">
        <name type="string">Citation II - Flight Recorder</name>
        <signal>
          <type>bool</type>
          <property type="string">/controls/engines/engine[%i]/reverser</property>
        </signal>
        <signal>
          <type>float</type>
	  <property type="string">/surface-positions/reverser-norm[%i]</property>
        </signal>
        <signal>
          <type>float</type>
          <property type="string">/controls/cabin-door/position-norm</property>
        </signal>
      </config>
    </flight-recorder>

    <aircraft-data> <!-- to be recorded for next time -->
      <path>consumables/fuel/tank[0]/level-lbs</path>
      <path>consumables/fuel/tank[1]/level-lbs</path>
      <path>sim/weight[0]/weight-lb</path>
      <path>sim/weight[1]/weight-lb</path>
      <path>sim/weight[2]/weight-lb</path>
      <path>sim/weight[3]/weight-lb</path>
    </aircraft-data>

    <checklists>
      <checklist include="Checklists/engine_startup.xml"/>
      <checklist include="Checklists/before_takeoff.xml"/>
      <checklist include="Checklists/takeoff.xml"/>
      <checklist include="Checklists/initial_climb.xml"/>
      <checklist include="Checklists/stepped_climb.xml"/>
    </checklists>
  </sim>

  <consumables>
    <fuel>
      <!-- Here we specify the unusable part of the tanks, see also Citation-II-yasim.xml
           for the maximum weight of fuel which determines the total capacity. -->
      <tank n="0">
        <!-- <capacity-gal_us type="double">371</capacity-gal_us> -->
        <unusable-gal_us type="double">4.92</unusable-gal_us>
      </tank>
      <tank n="1">
        <!-- <capacity-gal_us type="double">371</capacity-gal_us> -->
        <unusable-gal_us type="double">4.92</unusable-gal_us>
      </tank>
    </fuel>
  </consumables>

  <!-- aircraft specific loading -->

  <controls>
    <gear>
      <brake-parking>1</brake-parking>
    </gear>
    <engines>
      <engine n="0">
        <magnetos>3</magnetos>
      </engine>
      <engine n="1">
        <magnetos>3</magnetos>
      </engine>
    </engines>
    <electric>
      <avionics-switch type="bool">0</avionics-switch>
      <battery-switch type="bool">0</battery-switch>
    </electric>
  </controls>

  <engines>
    <engine n="0">
      <rpm>1000</rpm>
      <reverser-position type="double">0.000000</reverser-position>
    </engine>
    <engine n="1">
      <rpm>1000</rpm>
      <reverser-position type="double">0.000000</reverser-position>
    </engine>
  </engines>

  <instrumentation>
    <dme>
      <frequencies>
        <source type="string">/instrumentation/nav[0]/frequencies/selected-mhz</source>
      </frequencies>
      <switch-position n="0" type="int">0</switch-position>
      <switch-position n="1" type="int">0</switch-position>
    </dme>
    <inst-vertical-speed-indicator>
      <serviceable type="bool">1</serviceable>
    </inst-vertical-speed-indicator>
    <altimeter>
      <decision-height type="double">200</decision-height>
    </altimeter>
    <airspeed-indicator>
      <index-marker type="double">100</index-marker>
    </airspeed-indicator>
    <rmi>
      <single-needle>
        <selected-input type="string">ADF</selected-input>
        <position-deg type="double"/>
        <!-- computed by a filter, see Models/Instruments/instrument-filters.xml -->
      </single-needle>
      <double-needle>
        <selected-input type="string">VOR</selected-input>
        <position-deg type="double"/>
      </double-needle>
    </rmi>
    <hsi n="0">
      <selected-nav type="int">0</selected-nav> <!-- pilot's HSI initially uses NAV1 -->
      <volts type="double">0</volts>
    </hsi>
    <hsi n="1">
      <selected-nav type="int">1</selected-nav> <!-- copilot's HSI initially uses NAV2 -->
      <volts type="double">0</volts>
    </hsi>
  </instrumentation>

  <autopilot>
    <locks>
      <yaw-damper type="bool">0</yaw-damper>
      <passive-mode type="bool">1</passive-mode>
      <heading/>
      <altitude/>
    </locks>
    <settings>
      <bank-limit type="double">27</bank-limit>
      <target-vert-speed-fpm type="double">0</target-vert-speed-fpm>
      <target-altitude-ft>10000</target-altitude-ft>
      <gs1-arm type="bool">0</gs1-arm>
      <nav-arm type="bool">0</nav-arm>
      <alt-arm type="bool">0</alt-arm>
    </settings>
  </autopilot>

  <nasal>
    <citation>
      <file>Nasal/Electrical.nas</file>
      <file>Nasal/citation2.nas</file>
      <file>Aircraft/Generic/limits.nas</file>
    </citation>
    <m877>
      <file>Aircraft/Instruments-3d/clock/M877/M877.nas</file>
    </m877>
  </nasal>

  <input>
    <keyboard>
      <key n="115">
        <name>s</name>
        <desc>autostart</desc>
        <binding>
          <command>property-toggle</command>
          <property>sim/model/autostart</property>
        </binding>
      </key>
      <key n="12">
        <name>Ctrl-L</name>
        <desc>Toggle landing lights</desc>
        <binding>
          <command>property-toggle</command>
          <property>controls/lighting/landing-light</property>
        </binding>
        <binding>
          <command>property-toggle</command>
          <property>controls/lighting/landing-light[1]</property>
        </binding>
        <binding>
          <command>property-toggle</command>
          <property>sim/rendering/als-secondary-lights/use-landing-light</property>
        </binding>
        <binding>
          <command>property-toggle</command>
          <property>sim/rendering/als-secondary-lights/use-alt-landing-light</property>
        </binding>
      </key>
      <key n="121">
        <name>y</name>
        <desc>Show/Hide Yokes</desc>
        <binding>
          <command>property-toggle</command>
          <property>sim/yokes-visible</property>
        </binding>
      </key>
      <key n="127">
        <name>Delete</name>
        <desc>Toggle Reversers</desc>
        <binding>
          <command>property-toggle</command>
          <property>controls/engines/engine[0]/reverser</property>
        </binding>
        <binding>
          <command>property-toggle</command>
          <property>controls/engines/engine[1]/reverser</property>
        </binding>
      </key>
      <key n="4">
        <name>Ctrl-D</name>
        <desc>Open/close cabin-door</desc>
        <binding>
          <condition>
            <less-than>
              <property>velocities/airspeed-kt</property>
              <value>40</value>
            </less-than>
          </condition>
          <command>nasal</command>
          <script>citation.cabin_door.toggle();</script>
        </binding>
      </key>
      <key n="106">
        <name>j</name>
        <desc>Retract spoilers</desc>
        <binding>
          <command>property-assign</command>
          <property>/controls/flight/speedbrake</property>
          <value>0</value>
        </binding>
      </key>
      <key n="107">
        <name>k</name>
        <desc>Deploy spoilers</desc>
        <binding>
          <command>property-assign</command>
          <property>/controls/flight/speedbrake</property>
          <value>1</value>
        </binding>
      </key>
    </keyboard>
  </input>

  <limits>
    <mass-and-balance>
      <maximum-takeoff-mass-lbs>14100</maximum-takeoff-mass-lbs>
      <maximum-landing-mass-lbs type="double">13500</maximum-landing-mass-lbs>
    </mass-and-balance>
    <max-flap-extension-speed>
      <flaps type="double">0.324</flaps>
      <speed type="double">202</speed>
    </max-flap-extension-speed>
    <max-flap-extension-speed>
      <flaps type="double">0.99</flaps>
      <speed type="double">176</speed>
    </max-flap-extension-speed>
    <max-gear-extension-speed type="double">262</max-gear-extension-speed>
  </limits>
</PropertyList>
