diff --git a/DataExtractionOSM/src/net/osmand/router/BinaryRoutePlanner.java b/DataExtractionOSM/src/net/osmand/router/BinaryRoutePlanner.java index dcdc2fb99d..76e2c442d2 100644 --- a/DataExtractionOSM/src/net/osmand/router/BinaryRoutePlanner.java +++ b/DataExtractionOSM/src/net/osmand/router/BinaryRoutePlanner.java @@ -842,8 +842,6 @@ public class BinaryRoutePlanner { Collections.reverse(result); // calculate time - float completeTime = 0; - float completeDistance = 0; for (int i = 0; i < result.size(); i++) { RouteSegmentResult rr = result.get(i); RouteDataObject road = rr.getObject(); @@ -893,8 +891,6 @@ public class BinaryRoutePlanner { rr.setEndPointIndex(next); result.add(i + 1, splitted); - completeTime += distOnRoadToPass; - completeDistance += distance; // switch current segment to the splitted rr = splitted; distOnRoadToPass = 0; @@ -908,10 +904,15 @@ public class BinaryRoutePlanner { rr.setSegmentSpeed((float) speed); rr.setDistance((float) distance); - completeTime += distOnRoadToPass; - completeDistance += distance; + } addTurnInfo(leftside, result); + float completeTime = 0; + float completeDistance = 0; + for(RouteSegmentResult r : result) { + completeTime += r.getSegmentTime(); + completeDistance += r.getDistance(); + } println("ROUTE : "); double startLat = MapUtils.get31LatitudeY(start.road.getPoint31YTile(start.segmentStart)); diff --git a/DataExtractionOSM/src/net/osmand/router/routing.xml b/DataExtractionOSM/src/net/osmand/router/routing.xml index 97749d5cf3..d25a3b7a1f 100644 --- a/DataExtractionOSM/src/net/osmand/router/routing.xml +++ b/DataExtractionOSM/src/net/osmand/router/routing.xml @@ -32,11 +32,11 @@ - - + + - - + + @@ -47,14 +47,14 @@ - - + + - + - + @@ -64,7 +64,7 @@ - + diff --git a/DataExtractionOSM/src/net/osmand/router/test/nl.test.xml b/DataExtractionOSM/src/net/osmand/router/test/nl.test.xml index 05b31af00e..89a915337e 100644 --- a/DataExtractionOSM/src/net/osmand/router/test/nl.test.xml +++ b/DataExtractionOSM/src/net/osmand/router/test/nl.test.xml @@ -1,706 +1,356 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DataExtractionOSM/src/net/osmand/router/test/nl2.test.xml b/DataExtractionOSM/src/net/osmand/router/test/nl2.test.xml index 2522d5d009..c35ef0ec43 100644 --- a/DataExtractionOSM/src/net/osmand/router/test/nl2.test.xml +++ b/DataExtractionOSM/src/net/osmand/router/test/nl2.test.xml @@ -1,243 +1,273 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file