<?xml version="1.0"?>
<!--
************************************************************************
c172p simulation configuration. This files ties together all the components
used by FGFS to represent the c172p. Components include the flight data
model, instrument panel, and external 3D model.
************************************************************************
-->

<PropertyList include="c172p-main.xml">
    <sim>
        <variant-of>c172p</variant-of>
        <description>Cessna 172P (180 hp) Float</description>
        <previews>
            <preview>
                <type>exterior</type>
                <path>Previews/c172p-preview1.jpg</path>
                <splash type="bool">true</splash>
            </preview>
        </previews>
        <model>
            <variant type="int">3</variant>
            <c172p>
                <garmin196-visible type="bool">false</garmin196-visible>
            </c172p>
        </model>
        <aircraft-data>
            <path>/sim/model/c172p/garmin196-visible</path>
        </aircraft-data>
        <systems>
            <autopilot n="0">
                <path>Models/Interior/Panel/Instruments/kap140/nav-selector.xml</path>
            </autopilot>
            <autopilot n="5">
                <path>Models/Interior/Panel/Instruments/kap140/kap140-autopilot.xml</path>
            </autopilot>
            <property-rule n="108">
                <path>Aircraft/c172p/Systems/electrical.xml</path>
            </property-rule>
            <property-rule n="109">
                <path>Models/Interior/Panel/Instruments/kap140/kap140-proprules.xml</path>
            </property-rule>
        </systems>
    </sim>
    <nasal>
        <kap>
            <file>Nasal/annunciator_panel.nas</file>
        </kap>
        <electrical>
            <file>Nasal/electrical.nas</file>
        </electrical>
        <garmin196>
            <file>Aircraft/c172p/Models/Interior/Panel/Instruments/garmin196/garmin196.nas</file>
        </garmin196>
    </nasal>
    <controls>
        <engines>
            <active-engine type="int">1</active-engine>
        </engines>
        <panel>
            <glass type="bool">false</glass>
        </panel>
    </controls>
    <autopilot>
        <internal>
            <target-climb-rate type="int">0</target-climb-rate>
            <target-altitude type="int">0</target-altitude>
            <target-pressure type="double">0.0</target-pressure>
            <target-pressure-rate type="double">0.0</target-pressure-rate>
            <target-turn-rate type="double">0.0</target-turn-rate>
            <max-rate-of-change type="double">100.0</max-rate-of-change>
            <ref-lateral type="double">0.0</ref-lateral>
            <ref-vertical type="double">0.0</ref-vertical>
        </internal>
        <kap140>
            <serviceable type="bool">true</serviceable>
            <powered type="bool">false</powered>
            <programmed type="bool">true</programmed>
            <roll-axis-fail type="bool">false</roll-axis-fail>
            <pitch-axis-fail type="bool">false</pitch-axis-fail>
            <bad-condition type="bool">false</bad-condition>
            <config>
              <model type="int">3</model>
              <power type="double">24.0</power>
              <hsi-installed type="bool">false</hsi-installed>
              <default-altitude type="int">4500</default-altitude>
              <baro-tied type="bool">false</baro-tied>
              <autotrim-pitch type="bool">true</autotrim-pitch>
              <gain-pitch type="double">0.7</gain-pitch> <!-- Elevators very sensitive -->
              <gain-roll type="double">1.3</gain-roll>   <!-- Ailerons are a little slow -->
            </config>
            <panel>
              <state type="int">0</state>
              <state-old type="int">0</state-old>
              <alt-alert type="double">0.0</alt-alert>
              <alt-alert-arm type="double">0.0</alt-alert-arm>
              <alt-alert-sound type="bool">false</alt-alert-sound>
              <ap-timer type="double">0.0</ap-timer>
              <button-ap type="double">0.0</button-ap>
              <button-hdg type="double">0.0</button-hdg>
              <button-nav type="double">0.0</button-nav>
              <button-apr type="double">0.0</button-apr>
              <button-rev type="double">0.0</button-rev>
              <button-alt type="double">0.0</button-alt>
              <button-up type="double">0.0</button-up>
              <button-down type="double">0.0</button-down>
              <button-arm type="double">0.0</button-arm>
              <button-baro type="double">0.0</button-baro>
              <knob-inner-pos type="int">0</knob-inner-pos>
              <knob-outer-pos type="int">0</knob-outer-pos>
              <baro-timer type="double">0.0</baro-timer>
              <baro-mode type="int">0</baro-mode>
              <baro-mode-old type="int">0</baro-mode-old>
              <digit type="int">0</digit>
              <digit-mode type="int">0</digit-mode>
              <digit-timer type="double">0.0</digit-timer>
              <fpm-timer type="double">0.0</fpm-timer>
              <hdg-timer type="double">0.0</hdg-timer>
              <nav-timer type="double">0.0</nav-timer>
              <pft-1 type="double">0.0</pft-1>
              <pft-2 type="double">0.0</pft-2>
              <pft-3 type="double">0.0</pft-3>
              <pt-up type="bool">false</pt-up>
              <pt-down type="bool">false</pt-down>
            </panel>
            <sensors>
              <elevator-trim-demand type="double">0.0</elevator-trim-demand>
              <elevator-trim type="double">0.0</elevator-trim>
              <pitch-up type="double">0.0</pitch-up>
              <pitch-down type="double">0.0</pitch-down>
              <pitch-trim type="double">0.0</pitch-trim>
              <!--pitch-force type="double">0.0</pitch-force-->
              <!--roll-force type="double">0.0</roll-force-->
            </sensors>
            <servo>
              <aileron type="double">0.0</aileron>
              <aileron-rate type="double">0.0</aileron-rate>
              <elevator type="double">0.0</elevator>
              <elevator-rate type="double">0.0</elevator-rate>
              <roll-servo>
                <serviceable type="bool">true</serviceable>
              </roll-servo>
              <pitch-servo>
                <serviceable type="bool">true</serviceable>
              </pitch-servo>
              <elevator-trim-servo>
                <serviceable type="bool">true</serviceable>
              </elevator-trim-servo>
            </servo>
            <settings>
              <cws type="bool">false</cws>
              <ap-disc type="bool">false</ap-disc>
              <lateral-mode type="int">0</lateral-mode>
              <lateral-arm type="int">0</lateral-arm>
              <vertical-mode type="int">0</vertical-mode>
              <vertical-arm type="int">0</vertical-arm>
            </settings>
        </kap140>
    </autopilot>
    <instrumentation>
        <!-- used by kap140 autopilot -->
        <nav-source>
            <selector type="int">0</selector>
            <in-range type="bool">false</in-range>
            <from-flag type="bool">false</from-flag>
            <to-flag type="bool">false</to-flag>
            <nav-loc type="bool">false</nav-loc>
            <has-gs type="bool">false</has-gs>
            <gs-in-range type="bool">false</gs-in-range>
            <gs-rate-of-climb type="double">0.0</gs-rate-of-climb>
            <gs-rate-of-climb-fpm type="double">0.0</gs-rate-of-climb-fpm>
            <heading-needle-deflection type="double">0.0</heading-needle-deflection>
            <heading-needle-deflection-norm type="double">0.0</heading-needle-deflection-norm>
            <gs-needle-deflection type="double">0.0</gs-needle-deflection>
            <selected-radial-deg type="double">0.0</selected-radial-deg>
            <target-radial-deg type="double">0.0</target-radial-deg>
            <course-error type="double">0.0</course-error>
            <foo>bar</foo>
        </nav-source>
        <!-- KAP140 internal pressure sensor -->
        <altimeter-kap140-internal>
            <serviceable type="bool">true</serviceable>
        </altimeter-kap140-internal>
        <magnetic-compass>
            <!-- Compass will get stuck and have bad readings when exceeding this limits in degrees.
                no better source found than "in most compasses, the bowl to tilt by approximately 18
                degrees before it will touch the side of the casing" https://en.wikipedia.org/wiki/Aircraft_compass_turns.
                From testing this looks enough for normal flight and pre-takeoff-calibration. -->
            <pitch-limit-up type="float">     9 </pitch-limit-up>
            <pitch-limit-down type="float">  -9 </pitch-limit-down>
            <roll-limit-right type="float">  25 </roll-limit-right>
            <roll-limit-left type="float">  -25 </roll-limit-left>
            <stuck type="bool"> 0 </stuck>
        </magnetic-compass>
    </instrumentation>
    <fdm>
        <jsbsim>
            <bushkit type="int">3</bushkit>
            <fuel>
                <tank type="bool">1</tank>
            </fuel>
        </jsbsim>
    </fdm>
</PropertyList>
