diff --git a/OsmAnd-java/src/net/osmand/router/PrecalculatedRouteDirection.java b/OsmAnd-java/src/net/osmand/router/PrecalculatedRouteDirection.java index 24d65adba4..48ea8ae72c 100644 --- a/OsmAnd-java/src/net/osmand/router/PrecalculatedRouteDirection.java +++ b/OsmAnd-java/src/net/osmand/router/PrecalculatedRouteDirection.java @@ -40,11 +40,12 @@ public class PrecalculatedRouteDirection { pointsX = new int[s2 - s1 + 1]; pointsY = new int[s2 - s1 + 1]; for (int i = s1; i <= s2; i++) { - pointsX[i - s1] = parent.pointsX[i]; - pointsY[i - s1] = parent.pointsY[i]; + int shiftInd = i - s1; + pointsX[shiftInd] = parent.pointsX[i]; + pointsY[shiftInd] = parent.pointsY[i]; // indexedPoints.registerObjectXY(parent.pointsX.get(i), parent.pointsY.get(i), pointsX.size() - 1); - quadTree.insert(pointsX.length - 1, parent.pointsX[i], parent.pointsY[i]); - tms[i - s1] = parent.tms[i] - parent.tms[s2]; + quadTree.insert(shiftInd, parent.pointsX[i], parent.pointsY[i]); + tms[shiftInd] = parent.tms[i] - parent.tms[s2]; } } diff --git a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java index 876c93ac26..c38c0b0dfb 100644 --- a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java +++ b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java @@ -18,7 +18,7 @@ import net.osmand.util.MapUtils; public class RouteResultPreparation { - public static boolean PRINT_TO_CONSOLE_ROUTE_INFORMATION_TO_TEST = true; + public static boolean PRINT_TO_CONSOLE_ROUTE_INFORMATION_TO_TEST = false; private static final float TURN_DEGREE_MIN = 45; /** * Helper method to prepare final result diff --git a/OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java b/OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java index 9a395982e0..03f314aa7d 100644 --- a/OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java +++ b/OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java @@ -15,7 +15,7 @@ import org.xmlpull.v1.XmlPullParserException; public class RoutingConfiguration { public static final int DEFAULT_MEMORY_LIMIT = 30; - public final float DEVIATION_RADIUS = 5000; + public final float DEVIATION_RADIUS = 3000; public Map attributes = new LinkedHashMap(); // 1. parameters of routing and different tweaks diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index 1797214cf3..d8ee112184 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -420,7 +420,6 @@ public class RouteProvider { params.start.getBearing() / 180d * Math.PI : null, memoryLimit, specialization); RoutingContext ctx = router.buildRoutingContext(cf, params.ctx.getInternalAPI().getNativeLibrary(), files, - // TODO introduce params.mode.isDerivedRoutingFrom(ApplicationMode.CAR) ? RouteCalculationMode.COMPLEX : RouteCalculationMode.NORMAL); ctx.calculationProgress = params.calculationProgress;