Fix #8590
This commit is contained in:
parent
3387a64130
commit
04ec715d95
2 changed files with 3 additions and 3 deletions
|
@ -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) {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue