diff --git a/config/VehicleConfigurations.xml b/config/VehicleConfigurations.xml index 68a7d54f9..3fbd529a9 100644 --- a/config/VehicleConfigurations.xml +++ b/config/VehicleConfigurations.xml @@ -141,12 +141,13 @@ You can define the following custom settings: Moving tool index for the pipe controller to control the pipe height. This index is for the pipe part that is directly connected to the discharge node. -- disableTightTurnOffsetInTurns: boolean - "Tight turn offset" is extending the radius of a turn with a towed implement, in +- tightTurnOffsetDistanceInTurns: float + "Tight turn offset" is extending the radius of turns with a towed implement, in order to keep the implement on the path, while the tractor is driving outside the - generated turn course. Setting this to true disables this, as some implements, - especially big plows turn on the spot and align better with the next row without - tight turn offset. + generated turn course. This is usually applied to the last curvy 10-20 meters of the + turn course. With this value you can override the default to make this section + shorter for some implements, especially big plows turn on the spot and align + better with the next row without tight turn offset. --> @@ -176,7 +177,7 @@ You can define the following custom settings: basePipeMovingToolIndex childPipeMovingToolIndex unloadOffsetX - disableTightTurnOffsetInTurns + tightTurnOffsetDistanceInTurns diff --git a/scripts/ai/turns/AITurn.lua b/scripts/ai/turns/AITurn.lua index 378405b86..4b0935fa7 100644 --- a/scripts/ai/turns/AITurn.lua +++ b/scripts/ai/turns/AITurn.lua @@ -619,9 +619,7 @@ end function CourseTurn:onWaypointChange(ix) AITurn.onWaypointChange(self, ix) - local tightTurnOffsetDisabled = not self.turnContext:isHeadlandCorner() and - g_vehicleConfigurations:getRecursively(self.vehicle, 'disableTightTurnOffsetInTurns') - if self.turnCourse and not tightTurnOffsetDisabled then + if self.turnCourse then if self.forceTightTurnOffset or (self.enableTightTurnOffset and self.turnCourse:useTightTurnOffset(ix)) then -- adjust the course a bit to the outside in a curve to keep a towed implement on the course -- TODO_22 diff --git a/scripts/ai/turns/TurnManeuver.lua b/scripts/ai/turns/TurnManeuver.lua index fa1510c70..235afb30b 100644 --- a/scripts/ai/turns/TurnManeuver.lua +++ b/scripts/ai/turns/TurnManeuver.lua @@ -313,7 +313,9 @@ function AnalyticTurnManeuver:init(vehicle, turnContext, vehicleDirectionNode, t self.course = self:findAnalyticPath(vehicleDirectionNode, 0, turnEndNode, 0, goalOffset, self.turningRadius) -- make sure we use tight turn offset towards the end of the course so a towed implement is aligned with the new row - self.course:setUseTightTurnOffsetForLastWaypoints(10) + + self.course:setUseTightTurnOffsetForLastWaypoints( + g_vehicleConfigurations:getRecursively(vehicle, 'tightTurnOffsetDistanceInTurns') or 10) local ixBeforeEndingTurnSection = self.course:getNumberOfWaypoints() -- and once again, if there is an ending course, keep adjusting the tight turn offset local endingTurnLength = self.turnContext:appendEndingTurnCourse(self.course, steeringLength, true) @@ -428,7 +430,8 @@ function TurnEndingManeuver:init(vehicle, turnContext, vehicleDirectionNode, tur self:generateStraightSection(endArc, endStraight) myCorner:delete() self.course = Course(vehicle, self.waypoints, true) - self.course:setUseTightTurnOffsetForLastWaypoints(20) + self.course:setUseTightTurnOffsetForLastWaypoints( + g_vehicleConfigurations:getRecursively(vehicle, 'tightTurnOffsetDistanceInTurns') or 20) TurnManeuver.setLowerImplements(self.course, math.max(math.abs(turnContext.frontMarkerDistance), steeringLength)) end