endpoint catching range 5m -> 1,5m to avoid test regression

This commit is contained in:
Arndt Brenschede 2018-12-16 13:34:09 +01:00
parent a81d1685db
commit a9684d58db

View file

@ -742,7 +742,7 @@ public class RoutingEngine extends Thread
OsmPath startPath = routingContext.createPath( startLink );
startLink.addLinkHolder( startPath, null );
if ( wp != null ) wp.radius = 5.;
if ( wp != null ) wp.radius = 1.5;
return routingContext.createPath( startPath, link, null, guideTrack != null );
}
@ -1064,7 +1064,7 @@ public class RoutingEngine extends Thread
{
if ( isFinalLink )
{
endPos.radius = 5.0;
endPos.radius = 1.5; // 1.5 meters is the upper limit that will not change the unit-test result..
routingContext.setWaypoint( endPos, true );
}
OsmPath testPath = routingContext.createPath( otherPath, link, refTrack, guideTrack != null );
@ -1074,10 +1074,13 @@ public class RoutingEngine extends Thread
}
}
finally
{
if ( isFinalLink )
{
routingContext.unsetWaypoint();
}
}
}
if ( bestPath != null )
{
boolean trafficSim = endPos == null;