version 1.4.9
This commit is contained in:
parent
0171ba39a0
commit
c517ccc2df
43 changed files with 2002 additions and 508 deletions
|
|
@ -109,7 +109,7 @@ public class OsmNodeP extends OsmLinkP implements Comparable<OsmNodeP>, OsmPos
|
|||
|
||||
double dlat = (ilat - p.getILat() )/1000000.;
|
||||
double dlon = (ilon - p.getILon() )/1000000. * coslat;
|
||||
double d = Math.sqrt( dlat*dlat + dlon*dlon ) * (6378000. / 57.3);
|
||||
double d = Math.sqrt( dlat*dlat + dlon*dlon ) * 110984.; // 6378000. / 57.3;
|
||||
return (int)(d + 1.0 );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -379,7 +379,9 @@ System.out.println( "*** finishedOffsets = " + finishedOffsets );
|
|||
if ( trip.originNode != null )
|
||||
{
|
||||
// penalty proportional to direction change
|
||||
double cos = rc.calcCosAngle( trip.originNode.ilon, trip.originNode.ilat, currentNode.ilon, currentNode.ilat, node.ilon, node.ilat );
|
||||
double angle = rc.calcAngle( trip.originNode.ilon, trip.originNode.ilat, currentNode.ilon, currentNode.ilat, node.ilon, node.ilat );
|
||||
double cos = 1. - rc.getCosAngle();
|
||||
|
||||
int turncost = (int) ( cos * rc.expctxWay.getTurncost() + 0.2 ); // e.g. turncost=90 -> 90 degree = 90m penalty
|
||||
waycost += turncost;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue