Skip to content

Commit 831d271

Browse files
author
Peter Vaiko
committed
wip: pathfinder
1 parent 4151f2e commit 831d271

7 files changed

Lines changed: 53851 additions & 6 deletions

File tree

.idea/vcs.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fields/CalmsdenFarm.xml

Lines changed: 53312 additions & 0 deletions
Large diffs are not rendered by default.

include.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package.path = package.path .. ";FS25_Courseplay/scripts/?.lua"
22
package.path = package.path .. ";FS25_Courseplay/scripts/util/?.lua"
3+
package.path = package.path .. ";FS25_Courseplay/scripts/test/?.lua"
34
package.path = package.path .. ";FS25_Courseplay/scripts/pathfinder/?.lua"
45
package.path = package.path .. ";FS25_Courseplay/scripts/geometry/?.lua"
56
package.path = package.path .. ";FS25_Courseplay/scripts/courseGenerator/?.lua"

main.lua

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@
1010
--
1111
--
1212
dofile('include.lua')
13+
require('pathfinder.pathfinder')
1314

1415
local logger = Logger('main', Logger.level.debug)
1516
local parameters = {}
1617
-- working width of the equipment
17-
local workingWidth = AdjustableParameter(4.9, 'width', 'W', 'w', 0.1, 0, 100)
18+
local workingWidth = AdjustableParameter(10, 'width', 'W', 'w', 0.1, 0, 100)
1819
table.insert(parameters, workingWidth)
19-
local turningRadius = AdjustableParameter(15, 'radius', 'T', 't', 0.1, 0, 20)
20+
local turningRadius = AdjustableParameter(7, 'radius', 'T', 't', 0.1, 0, 20)
2021
table.insert(parameters, turningRadius)
2122
local fieldMargin = AdjustableParameter(0, 'margin', 'N', 'n', 0.1, -5, 5)
2223
table.insert(parameters, fieldMargin)
2324
-- number of headland passes around the field boundary
24-
local nHeadlandPasses = AdjustableParameter(4, 'headlands', 'P', 'p', 1, 0, 100)
25+
local nHeadlandPasses = AdjustableParameter(1, 'headlands', 'P', 'p', 1, 0, 100)
2526
table.insert(parameters, nHeadlandPasses)
26-
local nHeadlandsWithRoundCorners = AdjustableParameter(0, 'headlands with round corners', 'R', 'r', 1, 0, 100)
27+
local nHeadlandsWithRoundCorners = AdjustableParameter(2, 'headlands with round corners', 'R', 'r', 1, 0, 100)
2728
table.insert(parameters, nHeadlandsWithRoundCorners)
2829
local headlandClockwise = ToggleParameter('headlands clockwise', true, 'c')
2930
table.insert(parameters, headlandClockwise)
@@ -82,7 +83,7 @@ local reverseCourse = ToggleParameter('reverse', false, 'v', true)
8283
table.insert(parameters, reverseCourse)
8384
local smallOverlaps = ToggleParameter('small overlaps', false, 'm', true)
8485
table.insert(parameters, smallOverlaps)
85-
local nVehicles = AdjustableParameter(1, 'number of vehicles', 'Y', 'y', 1, 1, 5)
86+
local nVehicles = AdjustableParameter(2, 'number of vehicles', 'Y', 'y', 1, 1, 5)
8687
table.insert(parameters, nVehicles)
8788
local useSameTurnWidth = ToggleParameter('use same turn width', false, 'u')
8889
table.insert(parameters, useSameTurnWidth)
@@ -811,3 +812,4 @@ function love.mousemoved(x, y, dx, dy)
811812
mouseTransform:setTransformation(x + 20, y + 20)
812813
currentVertices = findCurrentVertices(x, y)
813814
end
815+

pathfinder/constraints.lua

Whitespace-only changes.

0 commit comments

Comments
 (0)