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

<PropertyList>

    <filter>
        <name>CDI0 lowpass</name>
        <debug>false</debug>
        <type>exponential</type>
        <filter-time>2.0</filter-time>
        <input>instrumentation/nav[0]/heading-needle-deflection</input>
        <output>instrumentation/nav[0]/filtered-cdiNAV0-deflection</output>
    </filter>

    <filter>
        <name>GS0 lowpass</name>
        <debug>false</debug>
        <type>exponential</type>
        <filter-time>2.0</filter-time>
        <input>instrumentation/nav[0]/gs-needle-deflection-norm</input>
        <output>instrumentation/nav[0]/filtered-gsNAV0-deflection</output>
    </filter>

    <filter>
        <name>CDI1 lowpass</name>
        <debug>false</debug>
        <type>exponential</type>
        <filter-time>2.0</filter-time>
        <input>instrumentation/nav[1]/heading-needle-deflection</input>
        <output>instrumentation/nav[1]/filtered-cdiNAV1-deflection</output>
    </filter>

    <filter>
        <name>GS1 lowpass</name>
        <debug>false</debug>
        <type>exponential</type>
        <filter-time>2.0</filter-time>
        <input>instrumentation/nav[1]/gs-needle-deflection-norm</input>
        <output>instrumentation/nav[1]/filtered-gsNAV1-deflection</output>
    </filter>
	
    <logic>
        <name>Comm 0 Serviceable</name>
        <input>
            <greater-than>
                <property>systems/electrical/outputs/comm[0]</property>
                <value>6.0</value>
            </greater-than>
        </input>
        <output>
            <property>instrumentation/comm[0]/serviceable</property>
        </output>
    </logic>

    <logic>
        <name>Comm 0 On/Off</name>
        <input>
            <and>
                <property>instrumentation/comm[0]/serviceable</property>
                <property>instrumentation/comm[0]/power-btn</property>
            </and>
        </input>
        <output>
            <property>/sim/model/c152/lighting/comm0-power</property>
        </output>
    </logic>

    <logic>
        <name>Comm 1 Serviceable</name>
        <input>
            <greater-than>
                <property>systems/electrical/outputs/comm[1]</property>
                <value>6.0</value>
            </greater-than>
        </input>
        <output>
            <property>instrumentation/comm[1]/serviceable</property>
        </output>
    </logic>

    <logic>
        <name>Comm 1 On/Off</name>
        <input>
            <and>
                <property>instrumentation/comm[1]/serviceable</property>
                <property>instrumentation/comm[1]/power-btn</property>
            </and>
        </input>
        <output>
            <property>/sim/model/c152/lighting/comm1-power</property>
        </output>
    </logic>

    <logic>
        <name>kn62 Serviceable</name>
        <input>
            <greater-than>
                <property>systems/electrical/outputs/dme</property>
                <value>6.0</value>
            </greater-than>
        </input>
        <output>
            <property>instrumentation/dme/serviceable</property>
        </output>
    </logic>

    <logic>
        <name>kn62 On/Off</name>
        <input>
            <and>
                <property>instrumentation/dme/serviceable</property>
                <property>instrumentation/dme/power</property>
            </and>
        </input>
        <output>
            <property>/instrumentation/dme/power-btn</property>
        </output>
    </logic>
	
    <filter>
        <name>IM Bright</name>
        <type>gain</type>
        <input>
            <expression>
                <sum>
                    <property>/instrumentation/marker-beacon/inner</property>
                    <property>/instrumentation/marker-beacon/test</property>
                </sum>
            </expression>
        </input>
        <output>
            <property>/instrumentation/marker-beacon/imBright</property>
        </output>
    </filter>

    <filter>
        <name>MM Bright</name>
        <type>gain</type>
        <input>
            <expression>
                <sum>
                    <property>/instrumentation/marker-beacon/middle</property>
                    <property>/instrumentation/marker-beacon/test</property>
                </sum>
            </expression>
        </input>
        <output>
            <property>/instrumentation/marker-beacon/mmBright</property>
        </output>
    </filter>

    <filter>
        <name>OM Bright</name>
        <type>gain</type>
        <input>
            <expression>
                <sum>
                    <property>/instrumentation/marker-beacon/outer</property>
                    <property>/instrumentation/marker-beacon/test</property>
                </sum>
            </expression>
        </input>
        <output>
            <property>/instrumentation/marker-beacon/omBright</property>
        </output>
    </filter>

    <filter>
        <name>Comm 0 Dim/Bright</name>
        <type>gain</type>
        <input>
            <condition>
                <property>/sim/model/c152/lighting/comm0-power</property>
            </condition>
            <property>/controls/lighting/radio-norm</property>
        </input>
        <input>
            <value>0.0</value>
        </input>
        <output>
            <property>/sim/model/c152/lighting/comm0</property>
        </output>
    </filter>

    <filter>
        <name>Comm 1 Dim/Bright</name>
        <type>gain</type>
        <input>
            <condition>
                <property>/sim/model/c152/lighting/comm1-power</property>
            </condition>
            <property>/controls/lighting/radio-norm</property>
        </input>
        <input>
            <value>0.0</value>
        </input>
        <output>
            <property>/sim/model/c152/lighting/comm1</property>
        </output>
    </filter>

    <logic>
        <name>Transponder Serviceable</name>
        <input>
            <greater-than>
                <property>systems/electrical/outputs/transponder</property>
                <value>6.0</value>
            </greater-than>
        </input>
        <output>
            <property>instrumentation/transponder/serviceable</property>
        </output>
    </logic>

    <logic>
        <name>Transponder On/Off</name>
        <input>
            <and>
                <property>instrumentation/transponder/serviceable</property>
                <property>instrumentation/transponder/inputs/knob-mode</property>
            </and>
        </input>
        <output>
            <property>/sim/model/c152/lighting/transponder-power</property>
        </output>
    </logic>

    <filter>
        <name>Transponder Dim/Bright</name>
        <type>gain</type>
        <input>
            <condition>
                <property>/sim/model/c152/lighting/transponder-power</property>
            </condition>
            <property>/controls/lighting/radio-norm</property>
        </input>
        <input>
            <value>0.0</value>
        </input>
        <output>
            <property>/sim/model/c152/lighting/trans</property>
        </output>
    </filter>

    <filter>
        <name>Left fuel tank quantity</name>
        <type>gain</type>
        <input>
            <condition>
				<greater-than>
					<property>/systems/electrical/outputs/fuel_ind</property>
					<value>20.0</value>
				</greater-than>
            </condition>
            <property>/consumables/fuel/tank[1]/level-gal_us</property>
        </input>
        <input>
            <value>0.0</value>
        </input>
        <output>
            <property>/consumables/fuel/tank[1]/level-gal_us_norm</property>
        </output>
    </filter>

    <filter>
        <name>Right fuel tank quantity</name>
        <type>gain</type>
        <input>
            <condition>
				<greater-than>
					<property>/systems/electrical/outputs/fuel_ind</property>
					<value>20.0</value>
				</greater-than>
            </condition>
            <property>/consumables/fuel/tank[2]/level-gal_us</property>
        </input>
        <input>
            <value>0.0</value>
        </input>
        <output>
            <property>/consumables/fuel/tank[2]/level-gal_us_norm</property>
        </output>
    </filter>
	
    <filter>
        <name>GPS Night Mode</name>
        <type>gain</type>
        <input>
            <condition>
                <property>/instrumentation/garmin196/status</property>
            </condition>
            <property>/controls/lighting/gps-norm</property>
        </input>
        <input>
            <value>0.0</value>
        </input>
        <output>
            <property>/instrumentation/garmin196/lite</property>
        </output>
    </filter>

</PropertyList>
