Improve gpx route calculation

This commit is contained in:
vshcherb 2014-03-03 18:44:17 +01:00
parent 05e763f60c
commit 3c1104b1d0
2 changed files with 3 additions and 3 deletions

View file

@ -384,9 +384,9 @@ public class BinaryRoutePlanner {
float distStartObstacles = segment.distanceFromStart + calculateTimeWithObstacles(ctx, road, segmentDist , obstaclesTime); float distStartObstacles = segment.distanceFromStart + calculateTimeWithObstacles(ctx, road, segmentDist , obstaclesTime);
if(ctx.precalculatedRouteDirection != null && ctx.precalculatedRouteDirection.isFollowNext()) { if(ctx.precalculatedRouteDirection != null && ctx.precalculatedRouteDirection.isFollowNext()) {
// reset to f // reset to f
distStartObstacles = 0; // distStartObstacles = 0;
// more precise but slower // more precise but slower
//distStartObstacles = ctx.precalculatedRouteDirection.getDeviationDistance(x, y) / ctx.getRouter().getMinDefaultSpeed(); distStartObstacles = ctx.precalculatedRouteDirection.getDeviationDistance(x, y) / ctx.getRouter().getMaxDefaultSpeed();
} }
// We don't check if there are outgoing connections // We don't check if there are outgoing connections