added variable points for round trip
This commit is contained in:
parent
9fd52f02d3
commit
e19101ee26
@ -77,6 +77,7 @@ public final class RoutingContext {
|
|||||||
public boolean correctMisplacedViaPoints;
|
public boolean correctMisplacedViaPoints;
|
||||||
public double correctMisplacedViaPointsDistance;
|
public double correctMisplacedViaPointsDistance;
|
||||||
public boolean useDynamicDistance;
|
public boolean useDynamicDistance;
|
||||||
|
public int roundTripPoints;
|
||||||
|
|
||||||
private void setModel(String className) {
|
private void setModel(String className) {
|
||||||
if (className == null) {
|
if (className == null) {
|
||||||
@ -171,6 +172,11 @@ public final class RoutingContext {
|
|||||||
|
|
||||||
useDynamicDistance = expctxGlobal.getVariableValue("use_dynamic_range", 0f) == 1f;
|
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;
|
boolean test = expctxGlobal.getVariableValue("check_start_way", 1f) == 1f;
|
||||||
if (!test) freeNoWays();
|
if (!test) freeNoWays();
|
||||||
|
|
||||||
|
|||||||
@ -500,7 +500,7 @@ public class RoutingEngine extends Thread {
|
|||||||
waypoints.add(onn);
|
waypoints.add(onn);
|
||||||
} else {
|
} else {
|
||||||
//buildPointsFromAngle(waypoints, direction, directionAdd, searchRadius, true);
|
//buildPointsFromAngle(waypoints, direction, directionAdd, searchRadius, true);
|
||||||
buildPointsFromCircle(waypoints, direction, searchRadius, 5);
|
buildPointsFromCircle(waypoints, direction, searchRadius, routingContext.roundTripPoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
routingContext.waypointCatchingRange = 1000;
|
routingContext.waypointCatchingRange = 1000;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user