1
0
Fork 0
fgdata/Aircraft/c172p/Systems/ground-effects.xml

981 lines
31 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<!-- (c) 2015, wlbragg. http://forum.flightgear.org/viewtopic.php?f=4&t=25157&start=75#p232085
Under the GPL. Used by shadows under ALS -->
<PropertyList>
<filter>
<type>gain</type>
<gain>0.3048</gain>
<input>
<property>/position/altitude-agl-ft</property>
</input>
<output>
<property>/position/altitude-agl-m</property>
</output>
</filter>
<!-- These filters are used to passthrough a value in non-replay mode.
In replay mode, the value from the flight recorder is used.
This filter is needed because JSBSim wins over the flight recorder.
-->
<filter>
<name>Ski ATan</name>
<type>gain</type>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/fdm/jsbsim/ski/atan</property>
</input>
<output>
<property>/fdm/jsbsim/ski/atan-actual</property>
</output>
</filter>
<filter>
<name>Stall Horn Volume</name>
<type>gain</type>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/fdm/jsbsim/sounds/stall-horn-volume</property>
</input>
<output>
<property>/fdm/jsbsim/sounds/stall-horn-volume-actual</property>
</output>
</filter>
<filter>
<name>Stall Horn Pitch</name>
<type>gain</type>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/fdm/jsbsim/sounds/stall-horn-pitch</property>
</input>
<output>
<property>/fdm/jsbsim/sounds/stall-horn-pitch-actual</property>
</output>
</filter>
<filter>
<name>Water Rudder Position</name>
<type>gain</type>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/controls/gear/water-rudder-down</property>
</input>
<output>
<property>/controls/gear/water-rudder-down-actual</property>
</output>
</filter>
<filter>
<name>Controls Carb Heat Lever</name>
<type>noise-spike</type>
<max-rate-of-change>4.8</max-rate-of-change>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/controls/engines/current-engine/carb-heat</property>
</input>
<output>
<property>/sim/model/c172p/cockpit/carb-heat-animation</property>
</output>
</filter>
<filter>
<name>Controls Primer Lever</name>
<type>noise-spike</type>
<max-rate-of-change>1.1</max-rate-of-change>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/controls/engines/engine/primer-lever</property>
</input>
<output>
<property>/sim/model/c172p/cockpit/primer-lever-animation</property>
</output>
</filter>
<filter>
<name>Water Rudder Animation</name>
<type>noise-spike</type>
<max-rate-of-change>3.5</max-rate-of-change>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/controls/gear/water-rudder</property>
</input>
<output>
<property>/sim/model/c172p/cockpit/water-rudder-animation</property>
</output>
</filter>
<!-- ================================================================== -->
<!-- Ground and water effects -->
<!-- ================================================================== -->
<filter>
<name>Spray and Wakes Effect for Pontoons</name>
<type>gain</type>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/fdm/jsbsim/hydro/spray-wake-speed-kt</property>
</input>
<output>
<property>/fdm/jsbsim/hydro/spray-wake-speed-kt-actual</property>
</output>
</filter>
<filter>
<name>Left Ground Effect for Pontoons</name>
<type>gain</type>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/fdm/jsbsim/hydro/left-ground-effect-speed-kt</property>
</input>
<output>
<property>/fdm/jsbsim/hydro/left-ground-effect-speed-kt-actual</property>
</output>
</filter>
<filter>
<name>Right Ground Effect for Pontoons</name>
<type>gain</type>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/fdm/jsbsim/hydro/right-ground-effect-speed-kt</property>
</input>
<output>
<property>/fdm/jsbsim/hydro/right-ground-effect-speed-kt-actual</property>
</output>
</filter>
<filter>
<name>Tail Ground Effect</name>
<type>gain</type>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/fdm/jsbsim/ground/tail-ground-effect-speed-kt</property>
</input>
<output>
<property>/fdm/jsbsim/ground/tail-ground-effect-speed-kt-actual</property>
</output>
</filter>
<filter>
<name>Left Wing Ground Effect</name>
<type>gain</type>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/fdm/jsbsim/ground/left-wing-ground-effect-speed-kt</property>
</input>
<output>
<property>/fdm/jsbsim/ground/left-wing-ground-effect-speed-kt-actual</property>
</output>
</filter>
<filter>
<name>Right Wing Ground Effect</name>
<type>gain</type>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/fdm/jsbsim/ground/right-wing-ground-effect-speed-kt</property>
</input>
<output>
<property>/fdm/jsbsim/ground/right-wing-ground-effect-speed-kt-actual</property>
</output>
</filter>
<filter>
<name>Nose Gear Ground Effect</name>
<type>gain</type>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/fdm/jsbsim/ground/nose-gear-ground-effect-speed-kt</property>
</input>
<output>
<property>/fdm/jsbsim/ground/nose-gear-ground-effect-speed-kt-actual</property>
</output>
</filter>
<filter>
<name>Left Gear Ground Effect</name>
<type>gain</type>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/fdm/jsbsim/ground/left-gear-ground-effect-speed-kt</property>
</input>
<output>
<property>/fdm/jsbsim/ground/left-gear-ground-effect-speed-kt-actual</property>
</output>
</filter>
<filter>
<name>Right Gear Ground Effect</name>
<type>gain</type>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/fdm/jsbsim/ground/right-gear-ground-effect-speed-kt</property>
</input>
<output>
<property>/fdm/jsbsim/ground/right-gear-ground-effect-speed-kt-actual</property>
</output>
</filter>
<filter>
<name>Nose Off Road Tyre Smoke Ground Effect</name>
<type>gain</type>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/fdm/jsbsim/ground/nose-tyre-smoke-ground-effect-speed-kt</property>
</input>
<output>
<property>/fdm/jsbsim/ground/nose-tyre-smoke-ground-effect-speed-kt-actual</property>
</output>
</filter>
<filter>
<name>Left Off Road Tyre Smoke Ground Effect</name>
<type>gain</type>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/fdm/jsbsim/ground/left-tyre-smoke-ground-effect-speed-kt</property>
</input>
<output>
<property>/fdm/jsbsim/ground/left-tyre-smoke-ground-effect-speed-kt-actual</property>
</output>
</filter>
<filter>
<name>Right Off Road Tyre Smoke Ground Effect</name>
<type>gain</type>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<property>/fdm/jsbsim/ground/right-tyre-smoke-ground-effect-speed-kt</property>
</input>
<output>
<property>/fdm/jsbsim/ground/right-tyre-smoke-ground-effect-speed-kt-actual</property>
</output>
</filter>
<!-- ================================================================== -->
<!-- Climate effects -->
<!-- ================================================================== -->
<filter>
<name>Aircraft Effect Fog Level</name>
<type>noise-spike</type>
<max-rate-of-change>0.1</max-rate-of-change>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<condition>
<property>/sim/model/c172p/enable-fog-frost</property>
</condition>
<property>/fdm/jsbsim/heat/fog-level</property>
</input>
<input>
<value>0.0</value>
</input>
<output>
<property>/environment/aircraft-effects/fog-level</property>
</output>
</filter>
<filter>
<name>Aircraft Effect Frost Level</name>
<type>noise-spike</type>
<max-rate-of-change>0.1</max-rate-of-change>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<condition>
<property>/sim/model/c172p/enable-fog-frost</property>
</condition>
<property>/fdm/jsbsim/heat/frost-level</property>
</input>
<input>
<value>0.0</value>
</input>
<output>
<property>/environment/aircraft-effects/frost-level</property>
</output>
</filter>
<logic>
<name>Aircraft Effect Temperature In Range</name>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<and>
<less-than>
<property>/fdm/jsbsim/heat/cabin-air-temp-degc</property>
<value>32.0</value>
</less-than>
<greater-than>
<property>/fdm/jsbsim/heat/cabin-air-temp-degc</property>
<value>0.0</value>
</greater-than>
</and>
</input>
<output>
<property>/sim/model/c172p/cabin-air-temp-in-range</property>
</output>
</logic>
<logic>
<name>Aircraft Effect Fog Or Frost Increasing</name>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<and>
<greater-than>
<property>/fdm/jsbsim/heat/moisture-norm</property>
<value>0.5</value>
</greater-than>
<greater-than>
<property>/fdm/jsbsim/heat/surface-dewpoint-diff</property>
<value>0.0</value>
</greater-than>
</and>
</input>
<output>
<property>/sim/model/c172p/fog-or-frost-increasing</property>
</output>
</logic>
<!-- ================================================================== -->
<!-- Securing aircraft -->
<!-- ================================================================== -->
<filter>
<name>Controls Parking Brake Lever</name>
<type>noise-spike</type>
<max-rate-of-change>2.5</max-rate-of-change>
<enable>
<condition>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</condition>
</enable>
<input>
<condition>
<property>/controls/gear/brake-parking</property>
</condition>
<value>1.0</value>
</input>
<input>
<value>0.0</value>
</input>
<output>
<property>/sim/model/c172p/cockpit/parking-lever</property>
</output>
</filter>
<!-- Logic for chocks -->
<logic>
<name>Chock Can Have</name>
<input>
<and>
<less-than>
<property>/fdm/jsbsim/bushkit</property>
<value>3</value>
</less-than>
<less-than>
<property>velocities/groundspeed-kt</property>
<value>1.0</value>
</less-than>
</and>
</input>
<output>
<property>/sim/model/c172p/securing/chock-can-have</property>
</output>
</logic>
<logic>
<name>Chock Visible</name>
<input>
<and>
<property>/sim/model/c172p/securing/chock</property>
<property>/sim/model/c172p/securing/chock-can-have</property>
</and>
</input>
<output>
<property>/sim/model/c172p/securing/chock-visible</property>
</output>
</logic>
<logic>
<name>Chock Addable</name>
<input>
<and>
<not>
<property>/sim/model/c172p/securing/chock</property>
</not>
<property>/sim/model/c172p/securing/chock-can-have</property>
</and>
</input>
<output>
<property>/sim/model/c172p/securing/chock-addable</property>
</output>
</logic>
<!-- logic for pitot tube -->
<logic>
<name>Pitot Cover Addable</name>
<input>
<and>
<not>
<property>/sim/model/c172p/securing/pitot-cover-visible</property>
</not>
<less-than>
<property>velocities/groundspeed-kt</property>
<value>1.0</value>
</less-than>
</and>
</input>
<output>
<property>/sim/model/c172p/securing/pitot-cover-addable</property>
</output>
</logic>
<logic>
<name>Pitot Cover Removable</name>
<input>
<and>
<property>/sim/model/c172p/securing/pitot-cover-visible</property>
<less-than>
<property>velocities/groundspeed-kt</property>
<value>1.0</value>
</less-than>
</and>
</input>
<output>
<property>/sim/model/c172p/securing/pitot-cover-removable</property>
</output>
</logic>
<!-- logic for cowl plugs -->
<logic>
<name>Cowl Plugs Addable</name>
<input>
<and>
<not>
<property>/sim/model/c172p/securing/cowl-plugs-visible</property>
</not>
<not>
<property>/engines/active-engine/running</property>
</not>
<not>
<property>/engines/active-engine/cranking</property>
</not>
</and>
</input>
<output>
<property>/sim/model/c172p/securing/cowl-plugs-addable</property>
</output>
</logic>
<logic>
<name>Cowl Plugs Removable</name>
<input>
<property>/sim/model/c172p/securing/cowl-plugs-visible</property>
</input>
<output>
<property>/sim/model/c172p/securing/cowl-plugs-removable</property>
</output>
</logic>
<!-- logic for tiedowns -->
<logic>
<name>Tiedowns Can Have</name>
<input>
<and>
<not-equals>
<property>/fdm/jsbsim/bushkit</property>
<value>3</value>
</not-equals>
<property>/fdm/jsbsim/ground/solid</property>
<less-than>
<property>velocities/groundspeed-kt</property>
<value>1.0</value>
</less-than>
</and>
</input>
<output>
<property>/sim/model/c172p/securing/tiedowns-can-have</property>
</output>
</logic>
<logic>
<name>Left Tiedowns Addable</name>
<input>
<and>
<not>
<property>/sim/model/c172p/securing/tiedownL-visible</property>
</not>
<property>/sim/model/c172p/securing/tiedowns-can-have</property>
</and>
</input>
<output>
<property>/sim/model/c172p/securing/tiedownL-addable</property>
</output>
</logic>
<logic>
<name>Right Tiedowns Addable</name>
<input>
<and>
<not>
<property>/sim/model/c172p/securing/tiedownR-visible</property>
</not>
<property>/sim/model/c172p/securing/tiedowns-can-have</property>
</and>
</input>
<output>
<property>/sim/model/c172p/securing/tiedownR-addable</property>
</output>
</logic>
<logic>
<name>Tail Tiedowns Addable</name>
<input>
<and>
<not>
<property>/sim/model/c172p/securing/tiedownT-visible</property>
</not>
<property>/sim/model/c172p/securing/tiedowns-can-have</property>
</and>
</input>
<output>
<property>/sim/model/c172p/securing/tiedownT-addable</property>
</output>
</logic>
<!-- ================================================================== -->
<!-- Lighting -->
<!-- ================================================================== -->
<logic>
<name>Navigation Light Left Damaged</name>
<input>
<and>
<equals>
<property>/sim/model/c172p/damage/left-wing</property>
<value>2</value>
</equals>
<not>
<property>/fdm/jsbsim/crash</property>
</not>
</and>
</input>
<output>
<property>sim/model/c172p/lighting/nav-lights/left-damaged</property>
</output>
</logic>
<logic>
<name>Navigation Light Right Damaged</name>
<input>
<and>
<equals>
<property>/sim/model/c172p/damage/right-wing</property>
<value>2</value>
</equals>
<not>
<property>/fdm/jsbsim/crash</property>
</not>
</and>
</input>
<output>
<property>sim/model/c172p/lighting/nav-lights/right-damaged</property>
</output>
</logic>
<!-- ================================================================== -->
<!-- Checking if doors are opened or closed in order to skip or not -->
<!-- the handle animation -->
<!-- ================================================================== -->
<filter>
<name>Right door opened</name>
<type>gain</type>
<enable>
<condition>
<or>
<equals>
<property>/sim/model/door-positions/rightDoor/position-norm</property>
<value>1.0</value>
</equals>
<equals>
<property>/sim/model/door-positions/rightDoor/position-norm</property>
<value>0.0</value>
</equals>
</or>
</condition>
</enable>
<input>
<condition>
<equals>
<property>/sim/model/door-positions/rightDoor/position-norm</property>
<value>1.0</value>
</equals>
</condition>
<value>1.0</value>
</input>
<input>
<condition>
<equals>
<property>/sim/model/door-positions/rightDoor/position-norm</property>
<value>0.0</value>
</equals>
</condition>
<value>0.0</value>
</input>
<output>
<property>/sim/model/door-positions/rightDoor/opened</property>
</output>
</filter>
<filter>
<name>Left door opened</name>
<type>gain</type>
<enable>
<condition>
<or>
<equals>
<property>/sim/model/door-positions/leftDoor/position-norm</property>
<value>1.0</value>
</equals>
<equals>
<property>/sim/model/door-positions/leftDoor/position-norm</property>
<value>0.0</value>
</equals>
</or>
</condition>
</enable>
<input>
<condition>
<equals>
<property>/sim/model/door-positions/leftDoor/position-norm</property>
<value>1.0</value>
</equals>
</condition>
<value>1.0</value>
</input>
<input>
<condition>
<equals>
<property>/sim/model/door-positions/leftDoor/position-norm</property>
<value>0.0</value>
</equals>
</condition>
<value>0.0</value>
</input>
<output>
<property>/sim/model/door-positions/leftDoor/opened</property>
</output>
</filter>
<filter>
<name>Baggage door opened</name>
<type>gain</type>
<enable>
<condition>
<or>
<equals>
<property>/sim/model/door-positions/baggageDoor/position-norm</property>
<value>1.0</value>
</equals>
<equals>
<property>/sim/model/door-positions/baggageDoor/position-norm</property>
<value>0.0</value>
</equals>
</or>
</condition>
</enable>
<input>
<condition>
<equals>
<property>/sim/model/door-positions/baggageDoor/position-norm</property>
<value>1.0</value>
</equals>
</condition>
<value>1.0</value>
</input>
<input>
<condition>
<equals>
<property>/sim/model/door-positions/baggageDoor/position-norm</property>
<value>0.0</value>
</equals>
</condition>
<value>0.0</value>
</input>
<output>
<property>/sim/model/door-positions/baggageDoor/opened</property>
</output>
</filter>
<!-- ============================================================== -->
<!-- Converting baggage weight from pounds to kilograms -->
<!-- ============================================================== -->
<filter>
<name>Baggage: Pounds to Kilograms</name>
<type>gain</type>
<gain>0.45359237</gain>
<input>
<property>/payload/weight[4]/weight-lb</property>
</input>
<output>
<property>/payload/weight[4]/weight-kg</property>
</output>
</filter>
<!-- ================================================================== -->
<!-- Max range for doors and baggage doors -->
<!-- ================================================================== -->
<filter>
<name>Effective range for right door</name>
<type>gain</type>
<input>
<expression>
<product>
<property>/sim/model/door-positions/rightDoor/position-norm</property>
<max>
<min>
<difference>
<value>1.0</value>
<product>
<sum>
<property>/velocities/airspeed-kt</property>
<sin>
<product>
<value>1.07</value>
<property>/velocities/airspeed-kt</property>
</product>
</sin>
</sum>
<value>0.01</value>
</product>
</difference>
<value>1.0</value>
</min>
<value>0.51</value>
</max>
</product>
</expression>
</input>
<output>
<property>/sim/model/door-positions/rightDoor/position-norm-effective</property>
</output>
</filter>
<filter>
<name>Effective range for left door</name>
<type>gain</type>
<input>
<expression>
<product>
<property>/sim/model/door-positions/leftDoor/position-norm</property>
<max>
<min>
<difference>
<value>1.0</value>
<product>
<sum>
<property>/velocities/airspeed-kt</property>
<sin>
<product>
<value>1.38</value>
<property>/velocities/airspeed-kt</property>
</product>
</sin>
</sum>
<value>0.01</value>
</product>
</difference>
<value>1.0</value>
</min>
<value>0.51</value>
</max>
</product>
</expression>
</input>
<output>
<property>/sim/model/door-positions/leftDoor/position-norm-effective</property>
</output>
</filter>
<filter>
<name>Effective range for baggage door</name>
<type>gain</type>
<input>
<expression>
<product>
<property>/sim/model/door-positions/baggageDoor/position-norm</property>
<max>
<min>
<difference>
<value>1.0</value>
<product>
<sum>
<property>/velocities/airspeed-kt</property>
<sin>
<product>
<value>0.73</value>
<property>/velocities/airspeed-kt</property>
</product>
</sin>
</sum>
<value>0.02</value>
</product>
</difference>
<value>1.0</value>
</min>
<value>0.02</value>
</max>
</product>
</expression>
</input>
<output>
<property>/sim/model/door-positions/baggageDoor/position-norm-effective</property>
</output>
</filter>
</PropertyList>