<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="plough">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <name>
        <en>Kongskilde HTRW AX</en>
        <de>Kongskilde HTRW AX</de>
    </name>
    <typeDesc>$l10n_TypeDesc_Plough</typeDesc>
    <filename>Kongskilde.i3d</filename>

    <size width="3" length="5" widthOffset="1.5" lenghtOffset="-2.5"/>

    <speedLimit value="12" />

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="0|0" linkNode="0>2|0|0|0|0|2|0|0|0|0|0|0|0" filename="trelleborgAW305_340_55_16.i3d" />
    </dynamicallyLoadedParts>

    <lightCoronas>
        <lightCorona index="0>2|0|0|0|0|11|0" />
    </lightCoronas>

    <brakeLights>
        <brakeLight index="0>2|0|0|0|0|11|1" />
    </brakeLights>

    <turnSignals>
        <turnSignalLeft index="0>2|0|0|0|0|11|2|0" />
        <turnSignalRight index="0>2|0|0|0|0|11|2|1" />
    </turnSignals>

    <workAreas>
        <workArea startIndex="0>2|0|0|0|0|5" widthIndex="0>2|0|0|0|0|6" heightIndex="0>2|0|0|0|0|7" refNodeIndex="0" type="plough" />
    </workAreas>

    <groundReferenceNodes>
        <groundReferenceNode index="0>2|0|0|0|0" threshold="1" />
        <groundReferenceNode index="0>2|0|0|0|0|13" threshold="0.2" depthNode="0>2|0|0|0|0|13"/>
        <groundReferenceNode index="0>2|0|0|0|0|15" threshold="0.2" depthNode="0>2|0|0|0|0|15"/>
    </groundReferenceNodes>

    <powerConsumer neededPtoPower="0" forceNode="0>" maxForce="48" />

    <ploughTurnSound file="$data/vehicles/shared/hydraulicUp.wav" pitchOffset="0.5" volume="1.0"/>
    <ploughSound file="$data/vehicles/tools/ploughSound.wav" pitchOffset="0.5" volume="1.0"/>

    <groundParticleAnimations>
        <groundParticleAnimation file="$data/vehicles/particleAnimations/amazone/amazoneCayron200.i3d" >
            <node index="0>2|0|0|0|0|12" animMeshIndex="0|0|0" refNodeIndex="1" />
            <node index="0>2|0|0|0|0|14" animMeshIndex="1|0|0" refNodeIndex="2" />
        </groundParticleAnimation>

        <groundParticle file="$data/vehicles/particleAnimations/amazone/amazoneCayron200.i3d" >
            <node index="0>2|0|0|0|0|12" particleIndex="0|1" refNodeIndex="1" />
            <node index="0>2|0|0|0|0|14" particleIndex="1|1" refNodeIndex="2" />
        </groundParticle>
    </groundParticleAnimations>

    <aiLeftMarker index="0>2|0|0|0|0|8" />
    <aiRightMarker index="0>2|0|0|0|0|9" />
    <aiBackMarker index="0>2|0|0|0|0|10" />

    <inputAttacherJoints>
        <inputAttacherJoint index="0>0" jointType="implement" topReferenceNode="0>1" />
    </inputAttacherJoints>

    <speedRotatingParts>
        <speedRotatingPart shaderNode="0>2|0|0|0|0|4|0"    radius="-0.238" invertDirectionOnRotation="true" turnAnimLimit="0.05" turnAnimLimitSide="-1" refNodeIndex="0" />
        <speedRotatingPart shaderNode="0>2|0|0|0|0|4|1"    radius="-0.238" invertDirectionOnRotation="true" turnAnimLimit="0.05" turnAnimLimitSide="1"  refNodeIndex="0" />
        <speedRotatingPart index="0>2|0|0|0|0|2|0|0|0|0|0|0|0" radius="0.4"  invertDirectionOnRotation="true" turnAnimLimit="0.05" turnAnimLimitSide="1"  refNodeIndex="0" />
        <speedRotatingPart index="0>2|0|0|0|0|2|0|0|0|0|0|0|0" radius="0.4"  invertDirectionOnRotation="true" turnAnimLimit="0.05" turnAnimLimitSide="-1" refNodeIndex="0" />
        <speedRotatingPart index="0>2|0|0|0|0|2|0|0|0" driveNode="0>2|0|0|0|0|2|0|0|0|0|0|0|0" radius="-0.4" foldMinLimit="0.95" foldMaxLimit="1" versatileYRot="true"  minYRot="-40" maxYRot="40" />
    </speedRotatingParts>

    <foldingParts startMoveDirection="0" turnOnFoldDirection="-1">
        <foldingPart animationName="foldPlough" speedScale="1" />
    </foldingParts>

    <animations>
        <!-- move wheel down/up -->
        <animation name="rotatePlough">
            <part node="0>2|0|0"     startTime="0" endTime="1.5" startRot="0 0 0" endRot="0 16 0" />

            <!-- plough rot -->
            <part node="0>2|0"     startTime="1.5" endTime="4" startRot="0 0 0" endRot="0 0 -90" />
            <part node="0>2|0"     startTime="4.5" endTime="7" startRot="0 0 -90" endRot="0 0 -180" />

            <!-- support arm switch -->
            <part node="0>2|0|0|0|0|3|0" startTime="4" endTime="4" startRot="0 0 0" endRot="180 180 0"  />

            <!-- wheel rot -->
            <part node="0>2|0|0|0|0|2|0|0|0"  direction="1"  startTime="4.5" endTime="7"   startRot="0 0 0" endRot="0 -58 0" />
            <part node="0>2|0|0|0|0|2|0|0|0"  direction="-1" startTime="1.5" endTime="4"   startRot="0 0 0" endRot="0 -58 0" />
            <!-- locks -->
            <part node="0>2|0|0|0|0|2|2" direction="1"  startTime="3" endTime="4" startRot="0 0 0" endRot="0 0 20" />
            <part node="0>2|0|0|0|0|2|2" direction="-1" startTime="1" endTime="2" startRot="0 0 0" endRot="0 0 20" />
            <part node="0>2|0|0|0|0|2|3" direction="1"  startTime="6" endTime="7" startRot="0 0 -20" endRot="0 0 0" />
            <part node="0>2|0|0|0|0|2|3" direction="-1" startTime="2" endTime="3" startRot="0 0 -20" endRot="0 0 0" />

            <part node="0>2|0|0"     startTime="7" endTime="8.5" startRot="0 16 0" endRot="0 0 0" />
        </animation>

        <animation name="foldPlough">
            <part node="1>0"                   startTime="0"    endTime="1.5" startTrans="0.533 -0.026 -0.306" endTrans="1.304 -0.026 -0.306" />
            <part node="0>2|0|0"               startTime="0"    endTime="1.5" startRot="0 0 0" endRot="0 35 0" />
            <part node="0>2|0|0|0|0|2|0"       startTime="1.5"  endTime="4"   startRot="-90 0 0" endRot="-90 0 78.8" />
            <part node="0>2|0|0|0|0|2|0|0"     startTime="1.5"  endTime="4"   startRot="0 -11.2 0" endRot="0 0 0" />
            <part node="0>2|0|0|0|0|2|0|0|0|0|0" startTime="1.5"  endTime="4"   startRot="0 0 0" endRot="0 0 -89" />

            <part node="0>2|0"               startTime="1.5"  endTime="4"   startRot="0 0 0" endRot="0 0 -90" />
            <part componentJointIndex="0"    startTime="4"    endTime="6" startRotLimit="0 0 0" endRotLimit="0 30 0" />
            <part node="0>2|0|0|0|0|11"      startTime="5"    endTime="5.05" visibility="false" />
            <part node="0>2|0|0|0|0|11"      startTime="5.05" endTime="5.1"  visibility="true" />
        </animation>

        <!-- move support wheel down/up -->
        <animation name="moveSupport">
            <part node="0>2|0|0|0|0|3|0|0" startTime="0" endTime="0.5" startRot="0 0 0" endRot="-90 0 0" />
        </animation>
    </animations>

    <movingTools>
        <movingTool index="0>2|0" componentJointIndex="0" anchorActor="0">
            <dependentPart index="0>2|1" />
            <dependentPart index="0>2|0|0|0" />
        </movingTool>
        <movingTool index="0>2|0|0" componentJointIndex="0" anchorActor="0" >
             <dependentPart index="0>2|0|0|0" />
        </movingTool>

        <movingTool index="0>2|0|0|0|0|2|0|0">
            <dependentPart index="0>2|0|0|0|0|2|1" />
        </movingTool>
    </movingTools>

    <movingParts>
        <movingPart index="0>2|0|0|0" referencePoint="1>" referenceFrame="0>2|0|0|0" isActiveDirty="true" playSound="false" >
            <dependentPart index="0>2|0|2" />
        </movingPart>
        <movingPart index="0>2|0|0|2" referencePoint="0>2|0|0|0|0" referenceFrame="0>2|0|0|0|0" >
            <translatingPart index="0>2|0|0|2|0" />
        </movingPart>
        <movingPart index="0>2|0|2" referencePoint="0>2|0|0|0|0|1" referenceFrame="0>2|0|0|0|0|1" playSound="false">
            <translatingPart index="0>2|0|2|0" />
        </movingPart>

        <movingPart index="0>2|1" referencePoint="0>2|0|1" referenceFrame="0>2|2" >
            <translatingPart index="0>2|1|0" />
        </movingPart>

        <movingPart index="0>2|0|0|0|0|2|1" referencePoint="0>2|0|0|0|0|2|0|0|0|1" referenceFrame="0>2|0|0|0|0|2|0|0|0" >
            <translatingPart index="0>2|0|0|0|0|2|1|0" />
        </movingPart>
    </movingParts>

    <isDefaultLowered value="false"/>
    <needsLowering value="true" />
    <allowsLowering value="true" />
    <support animationName="moveSupport" />
    <rotationPart turnAnimationName="rotatePlough" limitFoldRotationMax="true" foldRotationMinLimit="0" foldRotationMaxLimit="0" rotationFoldMinLimit="0" rotationFoldMaxLimit="0" foldMinLimit="0" foldMaxLimit="0.1"/>
    <washable dirtDuration="30" washDuration="1" workMultiplier="20" />

    <components count="2">
        <component1 solverIterationCount="10" />
        <component2 solverIterationCount="10" />
        <joint component1="0" component2="1" index="0>2|0|0|1" rotLimit="0 0 0" transLimit="0 0 0" /><!-- 0 30 0 -->
    </components>

    <schemaOverlay file="$dataS2/menu/schemas/implementSchema.png" fileSelected="$dataS2/menu/schemas/implementSchemaSelected.png" width="0.5" height="0.5" attacherJointPosition="0 0"/>
</vehicle>