added variable points for round trip

This commit is contained in:
afischerdev 2025-02-14 10:18:50 +01:00
parent 9fd52f02d3
commit e19101ee26
2 changed files with 7 additions and 1 deletions

View File

@ -77,6 +77,7 @@ public final class RoutingContext {
public boolean correctMisplacedViaPoints;
public double correctMisplacedViaPointsDistance;
public boolean useDynamicDistance;
public int roundTripPoints;
private void setModel(String className) {
if (className == null) {
@ -171,6 +172,11 @@ public final class RoutingContext {
useDynamicDistance = expctxGlobal.getVariableValue("use_dynamic_range", 0f) == 1f;
roundTripPoints = (int) expctxGlobal.getVariableValue("roundTripPoints", 5.f);
if (roundTripPoints < 3 || roundTripPoints > 20) {
roundTripPoints = 5;
}
boolean test = expctxGlobal.getVariableValue("check_start_way", 1f) == 1f;
if (!test) freeNoWays();

View File

@ -500,7 +500,7 @@ public class RoutingEngine extends Thread {
waypoints.add(onn);
} else {
//buildPointsFromAngle(waypoints, direction, directionAdd, searchRadius, true);
buildPointsFromCircle(waypoints, direction, searchRadius, 5);
buildPointsFromCircle(waypoints, direction, searchRadius, routingContext.roundTripPoints);
}
routingContext.waypointCatchingRange = 1000;