<?xml version="1.0"?>







<system name="External Components">

    <property>fcs/canopy-control</property>
    <property>fcs/blister-cmd-norm</property>
    <property>fcs/cowl-flap-cmd-norm</property>
    <property>systems/animations/start-smoke-out</property>
    <property>systems/animations/engine-start</property>
    <property>systems/gear/gear[1]/tyre-smoke</property>
    <property>systems/gear/gear[2]/tyre-smoke</property>


    <channel name="Externals">
       


        <kinematic name="Blister Pos Norm">
            <input>fcs/blister-cmd-norm</input>
            <traverse>
                <setting>
                    <position>0</position>
                    <time>0</time>
                </setting>
                <setting>
                    <position>1</position>
                    <time>10</time>
                </setting>
            </traverse>
        </kinematic>

        <pure_gain name="Blister Pos">
            <input>fcs/blister-pos-norm</input>
            <gain>1</gain>
            <output>animation/blister-gauche-pos-norm</output>
            <output>animation/blister-droite-pos-norm</output>
        </pure_gain>

        <switch name="fcs/cowl-flap-pos-cmd-norm">
                <default value="0"/>
                <test  logic="OR" value="1">
                    propulsion/engine[0]/map-inhg gt 40
                    propulsion/engine[1]/map-inhg gt 40
                </test>
                <test  logic="AND" value="1">
		    fcs/cowl-flap-cmd-norm == 1
                </test>
        </switch>

        <kinematic name="Cowl Flap Pos Norm">
            <input>fcs/cowl-flap-pos-cmd-norm</input>
            <traverse>
                    <setting>
                            <position>0</position>
                            <time>0</time>
                    </setting>
                    <setting>
                            <position>1</position>
                            <time>2</time>
                    </setting>
            </traverse>
            <output>animation/cowl-flap-pos-norm</output>
        </kinematic>

        <!--effets de  fumée sur le train-->
        <summer name="systems/gear/gear[1]/wheel-speed-diff">
            <input>velocities/u-fps</input>
            <input>-gear/unit[1]/wheel-speed-fps</input>
        </summer>

        <switch name="systems/gear/gear[1]/tyre-smoke-on-sw">
            <default value="systems/gear/gear[1]/tyre-smoke-on"/>
            <test  logic="AND" value="1">
                systems/gear/gear[1]/wheel-speed-diff gt 0.4
                gear/unit[1]/WOW == 1
            </test>
            <test  logic="AND" value="0">
                systems/gear/gear[1]/tyre-smoke-on == 1
                systems/gear/gear[1]/tyre-smoke == 1
            </test>
            <output>systems/gear/gear[1]/tyre-smoke-on</output>
        </switch>

        <kinematic name="systems/gear/gear[1]/tyre-smoke-timer">
            <input>systems/gear/gear[1]/tyre-smoke-on</input>
            <traverse>
                <setting>
                    <position>0</position>
                    <time>0</time>
                </setting>
                <setting>
                    <position>1</position>
                    <time>1.5</time>
                </setting>
            </traverse>
            <output>systems/gear/gear[1]/tyre-smoke</output>
        </kinematic>

        <summer name="systems/gear/gear[2]/wheel-speed-diff">
            <input>velocities/u-fps</input>
            <input>-gear/unit[2]/wheel-speed-fps</input>
        </summer>

        <switch name="systems/gear/gear[2]/tyre-smoke-on-sw">
            <default value="systems/gear/gear[2]/tyre-smoke-on"/>
            <test  logic="AND" value="1">
                systems/gear/gear[2]/wheel-speed-diff gt 0.4
                gear/unit[2]/WOW == 1
            </test>
            <test  logic="AND" value="0">
                systems/gear/gear[2]/tyre-smoke-on == 1
                systems/gear/gear[2]/tyre-smoke == 1
            </test>
            <output>systems/gear/gear[2]/tyre-smoke-on</output>
        </switch>


        <kinematic name="systems/gear/gear[2]/tyre-smoke-timer">
            <input>systems/gear/gear[2]/tyre-smoke-on</input>
            <traverse>
                <setting>
                    <position>0</position>
                    <time>0</time>
                </setting>
                <setting>
                    <position>1</position>
                    <time>1.5</time>
                </setting>
            </traverse>
            <output>systems/gear/gear[2]/tyre-smoke</output>
            </kinematic>

            <!--piston-->

            <switch name="systems/animations/start-smoke-sw">
                <default value="systems/animations/start-smoke"/>
                <test logic="AND" value="1">
                    systems/animations/engine-start == 1
                </test>
                <test logic="AND" value="0">
                    systems/animations/start-smoke-out == 1
                    propulsion/engine[0]/starter  == 0
                </test>
                <output>systems/animations/start-smoke</output>
            </switch>


            <kinematic name="systems/animations/start-smoke-timer">
                <input>systems/animations/start-smoke</input>
                <traverse>
                    <setting>
                        <position>0</position>
                        <time>0</time>
                    </setting>
                    <setting>
                        <position>1</position>
                        <time>6</time>
                    </setting>
                </traverse>
                <output>systems/animations/start-smoke-out</output>
            </kinematic>

            <kinematic name="systems/animations/start-smoke-trans">
                <input>systems/animations/start-smoke</input>
                <traverse>
                    <setting>
                        <position>0</position>
                        <time>0</time>
                    </setting>
                    <setting>
                        <position>0.07</position>
                        <time>6</time>
                    </setting>
                    <setting>
                        <position>1</position>
                        <time>0.1</time>
                    </setting>
                </traverse>
                <output>systems/animations/start-smoke-alpha</output>
            </kinematic>



     </channel>




</system>
