﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="selfPropelledPotatoHarvester">
	<annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <name>
        <en>Grimme Maxtron 620</en>
        <de>Grimme Maxtron 620</de>
    </name>
	<typeDesc>$l10n_TypeDesc_Harvester</typeDesc>
    <filename>data/vehicles/steerable/grimme/grimmeMaxtron620.i3d</filename>

	<size width="5" length="15" lengthOffset="-1"/>

    <wheels autoRotateBackSpeed="2">
        <wheel rotSpeed="-70" rotMax="40" rotMin="-40" driveMode="1" repr="0>4" driveNode="0>4|0" radius="0.935" deltaY="0.05" suspTravel="0.1" spring="50" damper="20" mass="1.448" longitudalStiffness="0.9" lateralStiffness="2" />
        <wheel rotSpeed="0" driveMode="1" repr="0>0" driveNode="0>0|0" isSynchronized="false" radius="0.568" deltaY="0.025" suspTravel="0.05" spring="100" damper="20" mass="0.5" longitudalStiffness="0.9" lateralStiffness="2" />
        <wheel rotSpeed="0" driveMode="1" repr="0>1"                   isSynchronized="false" radius="0.568" deltaY="0.025" suspTravel="0.05" spring="100" damper="20" mass="0.5" longitudalStiffness="0.9" lateralStiffness="2" />
        <wheel rotSpeed="0" driveMode="1" repr="0>2" driveNode="0>2|0" isSynchronized="false" radius="0.568" deltaY="0.025" suspTravel="0.05" spring="100" damper="20" mass="0.5" longitudalStiffness="0.9" lateralStiffness="2" />
        <wheel rotSpeed="0" driveMode="1" repr="0>3"                   isSynchronized="false" radius="0.568" deltaY="0.025" suspTravel="0.05" spring="100" damper="20" mass="0.5" longitudalStiffness="0.9" lateralStiffness="2" />
    </wheels>
    <motor minRpm="100" maxRpm="770 945 2350" maxTorques="-1 -1 -1" brakeForce="14" lowBrakeForceScale="0.5" lowBrakeForceSpeedLimit="1" compensateWheelRadius="true" accelerations="1 1 1" forwardGearRatio="32" backwardGearRatio="16" differentialRatio="1" rpmFadeOutRange="20">
		<torque rpm="2400" torque="1.65"/>
		<backwardTorque rpm="550" torque="2.2"/>
		<backwardTorque rpm="700" torque="0"/>
    </motor>
	<accelerationSpeed maxAcceleration="0.5" deceleration="0.6" backwardDeceleration="0.7" />
    <fuelCapacity>1400</fuelCapacity>
    <fuelUsage>0.014</fuelUsage>
    <downForce>7</downForce>

    <cameras count="2">
        <camera1 index="0>5|0" rotatable="true" rotateNode="0>5" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="8" transMax="18"  >
			<raycastNode index="0>7"/>
			<raycastNode index="0>3"/>
		</camera1>
        <camera2 index="0>6" rotatable="true" limit="true" rotMinX="-1.1" rotMaxX="0.4" transMin="0" transMax="0" />
    </cameras>

    <characterNode index="23" cameraMinDistance="1.5" />

	<lights>
        <light realLight="0>24|0" fakeLight="0>25" decoration="0>26|0" lightType="0"/>
		<light decoration="1>0|0|0|0|4|0|5" lightType="0"/>
        <light realLight="0>24|1" decoration="0>26|1" lightType="1"/>
    </lights>

	<brakeLights>
		<brakeLight index="0>26|2" />
	</brakeLights>

	<beaconLights>
		<beaconLight index="0>27|0" speed="0.015" />
		<beaconLight index="0>27|1" speed="0.0155" />
		<beaconLight index="0>27|2" speed="0.016" />
	</beaconLights>

    <combineTrailerTriggers>
        <combineTrailerTrigger index="43" />
    </combineTrailerTriggers>

    <aiTrafficCollisionTrigger index="28" />

    <exhaustParticleSystems count="1">
        <exhaustParticleSystem1 node="29" file="data/vehicles/particleSystems/exhaustParticleSystem.i3d" />
    </exhaustParticleSystems>

    <steering index="10|0" rotationSpeed="6"/>
    <enterReferenceNode index="0>" />
    <exitPoint index="9" />

    <motorStartDuration>2500</motorStartDuration>
    <attachSound file="data/vehicles/steerable/deutz/attach.wav" pitchOffset="1" />
	<threshingStartSound file="data/vehicles/steerable/grimme/grimmeSP_startwork.wav" pitchOffset="1" />
    <threshingSound file="data/vehicles/steerable/grimme/grimmeSP_work.wav" pitchOffset="1" pitchScale="0.001" pitchMax="1.1" radius="35" innerRadius="25" />
    <threshingStopSound file="data/vehicles/steerable/grimme/grimmeSP_stopwork.wav" pitchOffset="1" />
    <motorStartSound file="data/vehicles/steerable/grimme/grimmeMaxtron_start.wav" pitchOffset="0.8" volume="1.0" />
    <motorSound file="data/vehicles/steerable/grimme/grimmeMaxtron_idle.wav" pitchOffset="0.8" pitchScale="0.025" pitchMax="1.2" volume="1.0" radius="50" innerRadius="20" />
    <motorSoundRun file="data/vehicles/steerable/krone/hydraulic_run.wav" pitchOffset="0.5" pitchScale="0.02" pitchMax="1.02" volume="0.8" />
    <motorStopSound file="data/vehicles/steerable/grimme/grimmeMaxtron_stop.wav" pitchOffset="0.9" />
	<reverseDriveSound file="data/vehicles/steerable/deutz/reverseDrivingBeep.wav" volume="0.5" />
    <compressedAirSound file="data/vehicles/steerable/deutz/brakeBig.wav" pitchOffset="1" volume="1.0"/>
    <compressionSound file="data/vehicles/steerable/deutz/compressorWork.wav" pitchOffset="1" volume="1.5"/>
	<honkSound file="dataS2/sounds/hornBig.wav" volume="1" radius="80" innerRadius="35" />

    <grainTankCapacity>32850</grainTankCapacity>
    <grainTankUnloadingCapacity>1000</grainTankUnloadingCapacity>
    <grainTankFruitTypes fruitTypes="sugarBeet" />

    <!-- Cutter fruit type -->
    <fruitTypes fruitTypes="sugarBeet"/>
    <cutterMovingDirection>1</cutterMovingDirection>

    <combineThreshingScrollers>
        <!-- potato pickup -->
        <combineThreshingScroller index="0>12|1" scrollSpeed="-0.2" scrollLength="1" shaderParameterName="offsetUV" shaderParameterComponent="1" toggleVisibility="false" />
        <combineThreshingScroller index="0>33" scrollSpeed="-0.3" scrollLength="1" shaderParameterName="offsetUV" shaderParameterComponent="1" toggleVisibility="false" />
        <!-- potato filling -->
        <combineThreshingScroller index="0>16|0" scrollSpeed="-0.2" scrollLength="1" shaderParameterName="offsetUV" shaderParameterComponent="1" toggleVisibility="false" />
        <combineThreshingScroller index="0>16|1" scrollSpeed="-0.2" scrollLength="1" shaderParameterName="offsetUV" shaderParameterComponent="1" toggleVisibility="false" />
    </combineThreshingScrollers>

    <combineThreshingFillScrollers>
        <!-- potato pickup dirt+potatos-->
        <combineThreshingFillScroller type="sugarBeet" index="0>12|2" scrollSpeed="-0.55" scrollLength="1" shaderParameterName="offsetUV" shaderParameterComponent="2" toggleVisibility="true" />
        <!-- potato filling -->
        <combineThreshingFillScroller type="sugarBeet" index="0>16|2" scrollSpeed="-0.43" scrollLength="1" shaderParameterName="offsetUV" shaderParameterComponent="2" toggleVisibility="true" />
    </combineThreshingFillScrollers>

    <combineThreshingFillParticleSystems>
        <combineThreshingFillParticleSystem type="sugarBeet" node="16|3" rotation="0 -90 0" file="data/vehicles/particleSystems/maxtron620FillParticleSystem.i3d" />
    </combineThreshingFillParticleSystems>

    <pipeScrollers>
        <pipeScroller type="sugarBeet" index="0>17|0|0" scrollSpeed="0.25" scrollLength="1" shaderParameterName="offsetUV" shaderParameterComponent="1" toggleVisibility="false" />
        <pipeScroller type="sugarBeet" index="0>17|0|2" scrollSpeed="-0.6" scrollLength="1" shaderParameterName="offsetUV" shaderParameterComponent="2" toggleVisibility="true" />
        <pipeScroller type="sugarBeet" index="0>17|3" scrollSpeed="0.2" scrollLength="1" shaderParameterName="offsetUV" shaderParameterComponent="1" toggleVisibility="false" />
        <pipeScroller type="sugarBeet" index="0>17|4" scrollSpeed="-0.8" scrollLength="1" shaderParameterName="offsetUV" shaderParameterComponent="2" toggleVisibility="true" />
		<pipeScroller type="sugarBeet" index="0>42" scrollSpeed="-0.2" scrollLength="1" shaderParameterName="offsetUV" shaderParameterComponent="1" toggleVisibility="false" />
	</pipeScrollers>

    <pipeParticleSystems>
        <pipeParticleSystem type="sugarBeet" node="0>17|0|3" rotation="0 -90 0" file="data/vehicles/particleSystems/maxtron620FillParticleSystem.i3d" />
    </pipeParticleSystems>

    <pipe numStates="2" unloadingStates="2" raycastNodeIndex="0>36" raycastDistance="6" foldMinState="1" foldMaxState="1">
        <node index="0>17" rotationSpeeds="0 0 8">
            <state1 rotation="0 0 0"/>
            <state2 rotation="0 0 -19"/>
        </node>
	</pipe>

    <skinnedNodes>
        <skinnedNode index="0>41|0" />
        <skinnedNode index="0>41|1" />
    </skinnedNodes>

    <cuttingAreas count="1">
        <cuttingArea1 startIndex="0>34|0" widthIndex="0>34|1" heightIndex="0>34|2" losing="false" foldMinLimit="0" foldMaxLimit="0.01"/>
    </cuttingAreas>

    <aiLeftMarker index="0>34|6" />
    <aiRightMarker index="0>34|7" />
    <turnBackwardAngleThreshold>15</turnBackwardAngleThreshold>

    <turnedOnRotationNodes>
        <turnedOnRotationNode index="0>32|0" rotSpeed="500"/>
        <turnedOnRotationNode index="1>0|0|4|0" rotSpeed="350"/>
        <turnedOnRotationNode index="1>0|0|0|0|4|0|0|0" rotSpeed="750"/>
    </turnedOnRotationNodes>

    <cutterSpeedRotatingParts>
        <cutterSpeedRotatingPart index="1>0|0|0|0|0|0" radius="0.3" foldMinLimit="0" foldMaxLimit="0.01" />
        <cutterSpeedRotatingPart index="1>0|0|1|0|0" radius="0.3" foldMinLimit="0" foldMaxLimit="0.01" />
        <cutterSpeedRotatingPart index="1>0|0|1|1|0" radius="0.3" foldMinLimit="0" foldMaxLimit="0.01" />
        <cutterSpeedRotatingPart index="1>0|0|1|2|0" radius="0.3" foldMinLimit="0" foldMaxLimit="0.01" />
        <cutterSpeedRotatingPart index="1>0|0|1|3|0" radius="0.3" foldMinLimit="0" foldMaxLimit="0.01" />
        <cutterSpeedRotatingPart index="1>0|0|1|4|0" radius="0.3" foldMinLimit="0" foldMaxLimit="0.01" />
        <cutterSpeedRotatingPart index="1>0|0|1|5|0" radius="0.3" foldMinLimit="0" foldMaxLimit="0.01" />
        <cutterSpeedRotatingPart index="1>0|0|1|6|0" radius="-0.3" foldMinLimit="0" foldMaxLimit="0.01" />
        <cutterSpeedRotatingPart index="1>0|0|1|7|0" radius="-0.3" foldMinLimit="0" foldMaxLimit="0.01" />
        <cutterSpeedRotatingPart index="1>0|0|1|8|0" radius="-0.3" foldMinLimit="0" foldMaxLimit="0.01" />
        <cutterSpeedRotatingPart index="1>0|0|1|9|0" radius="-0.3" foldMinLimit="0" foldMaxLimit="0.01" />
        <cutterSpeedRotatingPart index="1>0|0|1|10|0" radius="-0.3" foldMinLimit="0" foldMaxLimit="0.01" />
        <cutterSpeedRotatingPart index="1>0|0|1|11|0" radius="-0.3" foldMinLimit="0" foldMaxLimit="0.01" />
    </cutterSpeedRotatingParts>

    <fruitPreparer fruitType="sugarBeet" />

    <fruitPreparerMaxSpeed level="0" />

    <fruitPreparerAreas>
        <fruitPreparerArea startIndex="0>34|3" widthIndex="0>34|4" heightIndex="0>34|5" foldMinLimit="0" foldMaxLimit="0.01" />
    </fruitPreparerAreas>

    <grainTankPlanes>
		<grainTankPlane type="sugarBeet">
            <node index="0>35">
				<key time="0" y="1.884" scale="0.7 0.1 0.6"/>
                <key time="1" y="1.884" scale="1 1 1"/>
            </node>
        </grainTankPlane>
    </grainTankPlanes>

    <crawlers>
        <crawler index="0>0|3" speedRefNode="0>0|3" scrollSpeed="0.18" shaderParameterName="offsetUV" shaderParameterComponent="1" length="1">
            <rotatingPart index="0>0|1" radius="0.6094" />
            <rotatingPart index="0>0|2" radius="0.6094" />
        </crawler>
        <crawler index="0>2|3" speedRefNode="0>2|3" scrollSpeed="0.18" shaderParameterName="offsetUV" shaderParameterComponent="1" length="1">
            <rotatingPart index="0>2|1" radius="0.6094" />
            <rotatingPart index="0>2|2" radius="0.6094" />
        </crawler>
    </crawlers>

    <foldingParts startMoveDirection="1" foldMiddleAnimTime="0.1">
        <foldingPart componentJointIndex="0" anchorActor="0" animationName="foldFront1" speedScale="1.1" />
        <foldingPart componentJointIndex="1" anchorActor="0" animationName="foldFront2" speedScale="1.1" />
        <foldingPart animationName="foldGrainTank" speedScale="1.1" />
	</foldingParts>

	<threshingFold foldMinLimit="0" foldMaxLimit="0.101" />

   <animations>
        <animation name="foldFront1">
			<part node="0>15" startTime="0" duration="2" startRot="0 0 0" endRot="-17 0 0"/>
			<part node="0>12" startTime="0" duration="2" startRot="0 0 0" endRot="-13 0 0"/>
        </animation>

        <animation name="foldFront2">
			<part node="1>0|0|0|0|4|0" startTime="0" duration="2" startRot="0 0 0" endRot="17 0 0"/>

			<part node="1>0|0|0|0|4" startTime="2" duration="5" startRot="0 0 0" endRot="-100 0 0"/>
			<part node="1>0|0|0|0|4|0" startTime="2" duration="5" startRot="17 0 0" endRot="120 0 0"/>
			<part node="1>0|0|0|0|4|0|1" startTime="7" duration="3" startRot="0 0 0" endRot="-155 0 0"/>
        </animation>

        <animation name="foldGrainTank">
			<part node="0>18" startTime="2" duration="5" startRot="0 0 0" endRot="0 0 -30"/>

			<part node="0>40|0|1" startTime="2" duration="2.3" startTrans="1.93 0.032 -1.095" endTrans="2.116 0.134 -0.655"/>
			<part node="0>40|0|1" startTime="4.3" duration="2.7" startTrans="2.116 0.134 -0.655" endTrans="2.209 0.192 -0.079"/>

			<part node="0>40|1|1" startTime="2" duration="2.3" startTrans="1.928 0.033 1.08" endTrans="2.111 0.138 0.642"/>
			<part node="0>40|1|1" startTime="4.3" duration="2.7" startTrans="2.111 0.138 0.642" endTrans="2.201 0.198 0.07"/>

			<part node="0>16" startTime="5" duration="3" startRot="25 0 0" endRot="45 0 0"/>
			<part node="0>16" startTime="14" duration="3" startRot="45 0 0" endRot="0 0 0"/>

			<!-- main side arm / output conveyor -->
			<part node="0>17" startTime="5" duration="3" startRot="0 0 0" endRot="0 0 -54"/>
			<part node="0>17|0" startTime="8" duration="3" startRot="0 0 0" endRot="0 0 88"/>
			<part node="0>17" startTime="11" duration="4" startRot="0 0 -54" endRot="0 0 24"/>

			<part node="0>22|0" startTime="13" duration="1" startRot="0 0 0" endRot="0 0 23.5"/>
			<part node="0>22" startTime="14" duration="1" startRot="0 0 0" endRot="0 0 25"/>

			<!-- back lids -->
			<part node="0>19" startTime="16" duration="2" startRot="0 0 0" endRot="117 0 0"/>
			<part node="0>20" startTime="18" duration="2" startRot="0 0 0" endRot="0 0 66"/>
        </animation>
    </animations>

    <movingTools>
        <movingTool index="0>15" componentJointIndex="0" anchorActor="0">
            <!-- make sure cylinders are updated if animation is playing while not active -->
            <dependentPart index="0>11" />
            <dependentPart index="0>13" />
        </movingTool>
        <movingTool index="1>0|0|0|0|4|0|4" componentJointIndex="1" anchorActor="0"></movingTool>

        <!-- collector -->
        <movingTool index="1>0|0|0|0|4">
            <dependentPart index="1>0|0|0|0|1" /> <!-- collectorHydraulics -->
            <dependentPart index="1>0|0|0|0|2" /> <!-- collectorHydraulics -->
        </movingTool>

        <movingTool index="1>0|0|0|0|4|0">
            <dependentPart index="1>0|0|0|0|2" /> <!-- collectorHydraulics -->
        </movingTool>

		<!-- collector -->
        <movingTool index="0>12">
            <dependentPart index="0>14" />
        </movingTool>

		<!-- mainArm / output conveyor -->
        <movingTool index="0>17" componentJointIndex="2">
            <dependentPart index="0>21" />
        </movingTool>
		<!-- outer mainArm -->
        <movingTool index="0>17|0" componentJointIndex="2">
            <dependentPart index="0>17|2" />
        </movingTool>

		<!-- backLid Hydraulic -->
        <movingTool index="0>19">
            <dependentPart index="0>30" />
        </movingTool>

		<!-- sideDoor Hydraulic -->
        <movingTool index="0>18">
            <dependentPart index="0>31" />
        </movingTool>
	</movingTools>

    <movingParts>
		<movingPart index="0>11" referencePoint="1>0|1" referenceFrame="0>" isActiveDirty="true">
			<translatingPart index="0>11|0" />
		</movingPart>

		<movingPart index="1>0|0|0|0|4|0|2" referencePoint="1>0|0|0|0|4|0|1|0" referenceFrame="1>" isActiveDirty="true">
			<translatingPart index="1>0|0|0|0|4|0|2|0" />
		</movingPart>

		<movingPart index="0>13" referencePoint="1>0|2" referenceFrame="0>" scaleZ="true" isActiveDirty="true"/>

		<movingPart index="1>0|0|0|0|1" referencePoint="1>0|0|0|0|4|1" referenceFrame="1>" isActiveDirty="true">
			<translatingPart index="1>0|0|0|0|1|0" />
		</movingPart>

		<movingPart index="1>0|0|0|0|2" referencePoint="1>0|0|0|0|4|0|3" referenceFrame="1>" scaleZ="true" isActiveDirty="true"/>

		<movingPart index="0>14" referencePoint="0>12|0" referenceFrame="0>" scaleZ="true" isActiveDirty="true"/>

		<movingPart index="0>21" referencePoint="0>17|1" referenceFrame="0>21">
			<translatingPart index="0>21|0" />
		</movingPart>
		<movingPart index="0>17|2" referencePoint="0>17|0|1" referenceFrame="0>17|2">
			<translatingPart index="0>17|2|0" />
		</movingPart>

		<!-- backLid Hydraulic -->
		<movingPart index="0>30" referencePoint="0>19|0" referenceFrame="0>30">
			<translatingPart index="0>30|0" />
		</movingPart>

		<!-- sideDoor Hydraulic -->
        <movingPart index="0>31" referencePoint="0>18|0" referenceFrame="0>31">
            <translatingPart index="0>31|0" />
        </movingPart>
    </movingParts>

    <components count="4">
        <component1 centerOfMass="0 0 -3.5" solverIterationCount="15" />
        <component2 centerOfMass="0 0.4 -0.2" solverIterationCount="15" />
        <component3 centerOfMass="0 0.3 -0.2" solverIterationCount="15" />
        <component4 centerOfMass="0 0 0" solverIterationCount="15" />
        <joint component1="0" component2="1" index="0>15" rotLimit="2 0 0" transLimit="0 0 0" />
        <joint component1="1" component2="2" index="1>0|0|0|0|4|0|4" rotLimit="2 0 0" transLimit="0 0 0" />
        <joint component1="0" component2="3" index="0>17|0|4" rotLimit="0 0 0" transLimit="0 0 0" />
    </components>

    <schemaOverlay file="data/vehicles/schemas/vehicleSchema.png" fileSelected="data/vehicles/schemas/vehicleSchemaSelected.png" width="0.5" height="0.5" attacherJointPosition="0.5 0"/>

</vehicle>
