initial version

This commit is contained in:
2025-05-01 00:46:36 +02:00
parent c40d790bd0
commit ab36746c6b
15 changed files with 40107 additions and 0 deletions

35
tests/test_multi_night_stop.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/bash
cd "$(dirname "$0")/.."
# Create a test GPX file with a simple route
cat > test_route.gpx << EOF
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="Test">
<trk>
<name>Test Route</name>
<trkseg>
<trkpt lat="59.0" lon="18.0"><ele>10</ele></trkpt>
<trkpt lat="59.1" lon="18.1"><ele>20</ele></trkpt>
<trkpt lat="59.2" lon="18.2"><ele>30</ele></trkpt>
<trkpt lat="59.3" lon="18.3"><ele>40</ele></trkpt>
<trkpt lat="59.4" lon="18.4"><ele>50</ele></trkpt>
<trkpt lat="59.5" lon="18.5"><ele>60</ele></trkpt>
<trkpt lat="59.6" lon="18.6"><ele>70</ele></trkpt>
<trkpt lat="59.7" lon="18.7"><ele>80</ele></trkpt>
<trkpt lat="59.8" lon="18.8"><ele>90</ele></trkpt>
<trkpt lat="59.9" lon="18.9"><ele>100</ele></trkpt>
</trkseg>
</trk>
</gpx>
EOF
# Run the bicycle planner with a 2-night forced stop
echo "Testing with 2-night forced stop at 59.5,18.5"
go run main.go --input="test_route.gpx" --days=6 --elevFactor=4 --forestRadius=5 --resupplyRadius=5000 --multiStop="59.5,18.5:2"
# The number of segments is now shown in the output
echo "Check the output above for the number of segments created"
# Clean up
rm test_route.gpx