﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="windrower">
	<annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <name>
        <en>Kuhn GA 8521</en>
        <de>Kuhn GA 8521</de>
    </name>
	<typeDesc>$l10n_TypeDesc_Windrower</typeDesc>
    <filename>data/vehicles/tools/kuhn/kuhnGA8521.i3d</filename>

    <size width="4.8" length="7" lengthOffset="-0.5"/>

    <wheels autoRotateBackSpeed="2.0">
        <wheel driveMode="0" repr="0" driveNode="0>0|0" radius="0.37" deltaY="0.15" suspTravel="0.2" spring="40" damper="20" mass="1.75" steeringAxleScale="-0.7" steeringAxleRotMax="30" steeringAxleRotMin="-30" lateralStiffness="1" />
        <wheel driveMode="0" repr="1" driveNode="0>1|0" radius="0.37" deltaY="0.15" suspTravel="0.2" spring="40" damper="20" mass="1.75"  steeringAxleScale="-0.7" steeringAxleRotMax="30" steeringAxleRotMin="-30" lateralStiffness="1" />

		<wheel driveMode="0" repr="4>0" radius="0.22" deltaY="0.2" suspTravel="0.2" spring="125" damper="15" mass="0.1" lateralStiffness="0" longitudalStiffness="1" />
		<wheel driveMode="0" repr="4>1" radius="0.22" deltaY="0.2" suspTravel="0.2" spring="125" damper="15" mass="0.1" lateralStiffness="0" longitudalStiffness="1" />
		<wheel driveMode="0" repr="4>2" radius="0.22" deltaY="0.2" suspTravel="0.2" spring="125" damper="15" mass="0.1" lateralStiffness="0" longitudalStiffness="1" />
		<wheel driveMode="0" repr="4>3" radius="0.22" deltaY="0.2" suspTravel="0.2" spring="125" damper="15" mass="0.1" lateralStiffness="0" longitudalStiffness="1" />
		<wheel driveMode="0" repr="5>0" radius="0.22" deltaY="0.2" suspTravel="0.2" spring="125" damper="15" mass="0.1" lateralStiffness="0" longitudalStiffness="1" />
		<wheel driveMode="0" repr="5>1" radius="0.22" deltaY="0.2" suspTravel="0.2" spring="125" damper="15" mass="0.1" lateralStiffness="0" longitudalStiffness="1" />
		<wheel driveMode="0" repr="5>2" radius="0.22" deltaY="0.2" suspTravel="0.2" spring="125" damper="15" mass="0.1" lateralStiffness="0" longitudalStiffness="1" />
		<wheel driveMode="0" repr="5>3" radius="0.22" deltaY="0.2" suspTravel="0.2" spring="125" damper="15" mass="0.1" lateralStiffness="0" longitudalStiffness="1" />
	</wheels>
	<downForce>4</downForce>
	<steeringAxleAngleScale startSpeed="5" endSpeed="30" backwards="true" />

	<groundReferenceNode index="4>" threshold="0.85" />
	<powerTakeoffInput index="1>2" rotSpeed="0" />

	<lightCoronas>
		<lightCorona index="0>3" />
	</lightCoronas>

	<brakeLights>
		<brakeLight index="0>4" />
	</brakeLights>

    <cuttingAreas count="2">
        <cuttingArea1 startIndex="4>4|4" widthIndex="4>4|5" heightIndex="4>4|6" />
		<cuttingArea2 startIndex="5>4|4" widthIndex="5>4|5" heightIndex="5>4|6" />
    </cuttingAreas>

    <windrowerDropAreas count="2">
        <windrowerDropArea1 startIndex="0>5" widthIndex="0>6" heightIndex="0>7"/>
		<windrowerDropArea2 startIndex="0>5" widthIndex="0>6" heightIndex="0>7"/>
    </windrowerDropAreas>

    <windrowerSound file="data/vehicles/tools/tedder.wav" pitchOffset="1" volume="1.4"/>

    <attacherJoint rootNode="1>" index="1>1" jointType="implement" transLimitScale="0 0 0" lowerDistanceToGround="0.62" upperDistanceToGround="0.62" />

	<isDefaultLowered value="true"/>
    <needsLowering value="false" />
    <allowsLowering value="false" />

    <support animationName="moveSupport" />

    <animation animationClip="kuhnGA8521_rotorSource" rootNode="4>4|0" speedScale="4"/>

	<movingTools>
        <!-- support -->
        <movingTool index="1>0|1" componentJointIndex="5" anchorActor="0"/>

		<!-- arms -->
        <movingTool index="0>2|0" componentJointIndex="1" anchorActor="0">
			<dependentPart index="0>2|2" />
			<dependentPart index="0>2|4" />
		</movingTool>
		<movingTool index="0>2|1" componentJointIndex="2" anchorActor="0">
			<dependentPart index="0>2|3" />
			<dependentPart index="0>2|5" />
		</movingTool>

		<movingTool index="2>0|1|1" componentJointIndex="3" anchorActor="0"/>
		<movingTool index="3>0|1|1" componentJointIndex="4" anchorActor="0"/>

		<movingTool index="2>0|1" componentJointIndex="3" anchorActor="0"/>
		<movingTool index="3>0|1" componentJointIndex="4" anchorActor="0"/>
	</movingTools>

	<movingParts>
		<!-- springs -->
		<movingPart index="0>2|4" referencePoint="2>0|2" referenceFrame="2>0" scaleZ="true" isActiveDirty="true" playSound="false"/>
		<movingPart index="2>0|1|0" referencePoint="4>4|3" referenceFrame="2>0" scaleZ="true" isActiveDirty="true" playSound="false"/>
		<movingPart index="0>2|5" referencePoint="3>0|2" referenceFrame="3>0" scaleZ="true" isActiveDirty="true" playSound="false"/>
		<movingPart index="3>0|1|0" referencePoint="5>4|3" referenceFrame="3>0" scaleZ="true" isActiveDirty="true" playSound="false"/>

		<!-- hydraulic -->
		<movingPart index="0>2|2" referencePoint="2>0|0" referenceFrame="2>0" isActiveDirty="true" playSound="false">
            <translatingPart index="0>2|2|0" />
        </movingPart>
		<movingPart index="0>2|3" referencePoint="3>0|0" referenceFrame="3>0" isActiveDirty="true" playSound="false">
            <translatingPart index="0>2|3|0" />
        </movingPart>

        <!-- wheel cylinders -->
        <movingPart index="0>2|8|0|0" referencePoint="0>0|1" referenceFrame="0>" scaleZ="true" isActiveDirty="true" playSound="false"/>
		<movingPart index="0>2|8|0|1" referencePoint="0>1|1" referenceFrame="0>" scaleZ="true" isActiveDirty="true" playSound="false"/>
		<movingPart index="0>2|6|0|0" referencePoint="1>3" referenceFrame="0>" scaleZ="true" isActiveDirty="true" playSound="false"/>
		<movingPart index="0>2|6|0|1" referencePoint="0>2|7|0|1" referenceFrame="0>" scaleZ="true" isActiveDirty="true" playSound="false"/>
		<movingPart index="0>2|7|0|0" referencePoint="0>2|8|0|2" referenceFrame="0>" scaleZ="true" isActiveDirty="true" playSound="false"/>
    </movingParts>

	<animations>
        <!-- move support wheel down/up -->
        <animation name="moveSupport">
            <part node="1>0|0" startTime="0" duration="0.3" startRot="90 0 0" endRot="0 0 0" />
			<part node="1>0|1" startTime="0" duration="0.3" startTrans="0 -0.42248 0.15611" endTrans="0 -1.01243 0.15611" />
        </animation>

		<animation name="folding">
			<!-- lowering -->
			<part componentJointIndex="3" startTime="0.0" endTime="3" startRotLimit="0 0 25" endRotLimit="0 0 0" />
			<part componentJointIndex="4" startTime="0.0" endTime="3" startRotLimit="0 0 25" endRotLimit="0 0 0" />
			<part componentJointIndex="1" startTime="0.0" endTime="3" startRotLimit="0 0 25" endRotLimit="0 0 0" />
			<part componentJointIndex="2" startTime="0.0" endTime="3" startRotLimit="0 0 25" endRotLimit="0 0 0" />
			<part node="2>0|1|1" startTime="0.0" endTime="3" startRot="0 0 0" endRot="0 0 -2" />
			<part node="3>0|1|1" startTime="0.0" endTime="3" startRot="0 0 0" endRot="0 0 2" />
			<part node="0>2|0" startTime="0" endTime="3" startRot="0 0 0" endRot="0 0 15" />
			<part node="0>2|1" startTime="0" endTime="3" startRot="0 0 0" endRot="0 0 -15" />
			<!-- folding -->
			<part node="2>0|1|1" startTime="3" endTime="4" startRot="0 0 -2" endRot="0 0 0" />
			<part node="3>0|1|1" startTime="3" endTime="4" startRot="0 0 2" endRot="0 0 0" />
			<part node="2>0|1" startTime="3" endTime="10" startTrans="1.1911 0.01107 -0.06292" endTrans="0.63421 0.01107 -0.06292" />
			<part node="3>0|1" startTime="3" endTime="10" startTrans="-1.1911 0.01107 -0.06292" endTrans="-0.63421 0.01107 -0.06292" />
			<part node="0>2|0" startTime="3" endTime="10" startRot="0 0 15" endRot="0 0 100" />
			<part node="0>2|1" startTime="3" endTime="10" startRot="0 0 -15" endRot="0 0 -100" />
        </animation>
    </animations>

	<foldingParts startMoveDirection="1" foldMiddleAnimTime="0.3">
        <foldingPart animationName="folding" speedScale="1.0" />
    </foldingParts>

	<steeringAnimationNodes>
		<animationNode index="0>2|6|0" wheelIndex="0" minXRot="30" maxXRot="-30" />
		<animationNode index="0>2|7|0" wheelIndex="0" minXRot="30" maxXRot="-30" />
		<animationNode index="0>2|8|0" wheelIndex="0" minXRot="30" maxXRot="-30" />
	</steeringAnimationNodes>

    <components count="7">
        <component1 centerOfMass="0 0 -0.65" solverIterationCount="25" /><!--  -->
		<component2 centerOfMass="0 -0.8 0" solverIterationCount="25" /><!--  -->
		<component3 centerOfMass="0 0 0" solverIterationCount="25" /><!--  -->
		<component4 centerOfMass="0 0 0" solverIterationCount="25" /><!--  -->
		<component5 centerOfMass="0 0 0" solverIterationCount="25" /><!--  -->
		<component6 centerOfMass="0 0 0" solverIterationCount="25" /><!--  -->
		<component7 centerOfMass="0 0 0" solverIterationCount="25" /><!--  -->
		<joint component1="0" component2="1" index="1>0"     rotLimit="0 80 0" transLimit="0 0 0" />
		<joint component1="0" component2="2" index="0>2|0"   rotLimit="0 0 0" transLimit="0 0 0" />
		<joint component1="0" component2="3" index="0>2|1"   rotLimit="0 0 0" transLimit="0 0 0" />
		<joint component1="2" component2="4" index="2>0|1|1" rotLimit="0 0 0" transLimit="0 0 0" />
		<joint component1="3" component2="5" index="3>0|1|1" rotLimit="0 0 0" transLimit="0 0 0" />
		<joint component1="1" component2="6" index="1>0|1"   rotLimit="0 0 0" transLimit="0 0 0" />
    </components>

    <schemaOverlay file="data/vehicles/schemas/implementSchema.png" fileSelected="data/vehicles/schemas/implementSchemaSelected.png" width="0.5" height="0.5" attacherJointPosition="0 0"/>

</vehicle>