|
10 | 10 | -- |
11 | 11 | -- |
12 | 12 | dofile('include.lua') |
13 | | -require('pathfinder.pathfinder') |
14 | 13 |
|
15 | 14 | local logger = Logger('main', Logger.level.debug) |
16 | 15 | local parameters = {} |
17 | 16 | -- working width of the equipment |
18 | | -local workingWidth = AdjustableParameter(10, 'width', 'W', 'w', 0.1, 0, 100) |
| 17 | +local workingWidth = AdjustableParameter(5, 'width', 'W', 'w', 0.1, 0, 100) |
19 | 18 | table.insert(parameters, workingWidth) |
20 | | -local turningRadius = AdjustableParameter(7, 'radius', 'T', 't', 0.1, 0, 20) |
| 19 | +local turningRadius = AdjustableParameter(3, 'radius', 'T', 't', 0.1, 0, 20) |
21 | 20 | table.insert(parameters, turningRadius) |
22 | 21 | local fieldMargin = AdjustableParameter(0, 'margin', 'N', 'n', 0.1, -5, 5) |
23 | 22 | table.insert(parameters, fieldMargin) |
24 | 23 | -- number of headland passes around the field boundary |
25 | 24 | local nHeadlandPasses = AdjustableParameter(1, 'headlands', 'P', 'p', 1, 0, 100) |
26 | 25 | table.insert(parameters, nHeadlandPasses) |
27 | | -local nHeadlandsWithRoundCorners = AdjustableParameter(2, 'headlands with round corners', 'R', 'r', 1, 0, 100) |
| 26 | +local nHeadlandsWithRoundCorners = AdjustableParameter(0, 'headlands with round corners', 'R', 'r', 1, 0, 100) |
28 | 27 | table.insert(parameters, nHeadlandsWithRoundCorners) |
29 | 28 | local headlandClockwise = ToggleParameter('headlands clockwise', true, 'c') |
30 | 29 | table.insert(parameters, headlandClockwise) |
@@ -83,7 +82,7 @@ local reverseCourse = ToggleParameter('reverse', false, 'v', true) |
83 | 82 | table.insert(parameters, reverseCourse) |
84 | 83 | local smallOverlaps = ToggleParameter('small overlaps', false, 'm', true) |
85 | 84 | table.insert(parameters, smallOverlaps) |
86 | | -local nVehicles = AdjustableParameter(2, 'number of vehicles', 'Y', 'y', 1, 1, 5) |
| 85 | +local nVehicles = AdjustableParameter(1, 'number of vehicles', 'Y', 'y', 1, 1, 5) |
87 | 86 | table.insert(parameters, nVehicles) |
88 | 87 | local useSameTurnWidth = ToggleParameter('use same turn width', false, 'u') |
89 | 88 | table.insert(parameters, useSameTurnWidth) |
@@ -229,6 +228,9 @@ local function generate() |
229 | 228 | love.profiler.reset() |
230 | 229 | love.profiler.stop() |
231 | 230 | end |
| 231 | + -- export the first headland as CSV |
| 232 | + local exporter = Exporter(course) |
| 233 | + exporter:exportHeadlandAsCsv(1, 'headland-1.csv') |
232 | 234 | -- make sure all logs are now visible |
233 | 235 | io.stdout:flush() |
234 | 236 | errors = context:getErrors() |
|
0 commit comments