Make nogo weight proportional to nogo distance

Compute the nogo cost as proportional to the length of the segment
inside the nogo area.
This commit is contained in:
Phyks (Lucas Verney) 2018-12-03 00:34:21 +01:00
parent 3479fd7323
commit 2591f22348
7 changed files with 347 additions and 34 deletions

View file

@ -305,9 +305,9 @@ System.out.println( "*** finishedOffsets = " + finishedOffsets );
}
// calc distance and check nogos
rc.nogomatch = null;
rc.nogoCost = 0.;
int distance = rc.calcDistance( currentNode.ilon, currentNode.ilat, node.ilon, node.ilat );
if ( rc.nogomatch != null )
if ( Math.abs(rc.nogoCost) > 0.)
{
return;
}