This commit is contained in:
Victor Shcherb 2020-03-27 18:33:33 +01:00
parent 3387a64130
commit 04ec715d95
2 changed files with 3 additions and 3 deletions

View file

@ -788,8 +788,8 @@ public class BinaryRoutePlanner {
TLongObjectHashMap<RouteSegment> visitedSegments, float distFromStart, float distanceToEnd, RouteSegment segment, TLongObjectHashMap<RouteSegment> visitedSegments, float distFromStart, float distanceToEnd, RouteSegment segment,
int segmentPoint, RouteSegment next) { int segmentPoint, RouteSegment next) {
if (next != null) { if (next != null) {
float obstaclesTime = (float) ctx.getRouter().calculateTurnTime(next, next.isPositive()? float obstaclesTime = (float) ctx.getRouter().calculateTurnTime(next,
next.getRoad().getPointsLength() - 1 : 0, next.isPositive() ? next.getRoad().getPointsLength() - 1 : 0,
segment, segmentPoint); segment, segmentPoint);
distFromStart += obstaclesTime; distFromStart += obstaclesTime;
if (TEST_SPECIFIC && next.road.getId() >> 6 == TEST_ID) { if (TEST_SPECIFIC && next.road.getId() >> 6 == TEST_ID) {

View file

@ -580,7 +580,7 @@ public class GeneralRouter implements VehicleRouter {
// more like UT // more like UT
if (diff > 2 * Math.PI / 3) { if (diff > 2 * Math.PI / 3) {
return getLeftTurn(); return getLeftTurn();
} else if (diff > Math.PI / 2) { } else if (diff > Math.PI / 3) {
return getRightTurn(); return getRightTurn();
} }
return 0; return 0;