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 ); OsmPath startPath = routingContext.createPath( startLink );
startLink.addLinkHolder( startPath, null ); 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 ); return routingContext.createPath( startPath, link, null, guideTrack != null );
} }
@ -1064,7 +1064,7 @@ public class RoutingEngine extends Thread
{ {
if ( isFinalLink ) 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 ); routingContext.setWaypoint( endPos, true );
} }
OsmPath testPath = routingContext.createPath( otherPath, link, refTrack, guideTrack != null ); OsmPath testPath = routingContext.createPath( otherPath, link, refTrack, guideTrack != null );
@ -1075,7 +1075,10 @@ public class RoutingEngine extends Thread
} }
finally finally
{ {
routingContext.unsetWaypoint(); if ( isFinalLink )
{
routingContext.unsetWaypoint();
}
} }
} }
if ( bestPath != null ) if ( bestPath != null )