Decrease penalty for traffic signals

This commit is contained in:
vshcherb 2013-11-06 23:04:55 +01:00
parent 29d1fe315c
commit 367ca7f3ee

View file

@ -46,6 +46,12 @@ public class RouteResultPreparation {
double speed = ctx.getRouter().defineSpeed(road);
if (speed == 0) {
speed = ctx.getRouter().getMinDefaultSpeed();
} else {
if(speed > 15) {
// decrease speed proportionally from 15ms=50kmh -
// reference speed 30ms=108kmh - 7kmh
speed = speed - ((speed - 15f) / (30f - 15f) * 2f);
}
}
boolean plus = rr.getStartPointIndex() < rr.getEndPointIndex();
int next;