Implements issue #324. Thanks tyrasd.
This commit is contained in:
parent
ebc3d09f0f
commit
411803919d
@ -416,7 +416,7 @@ int main (int argc, char *argv[]) {
|
|||||||
double distance = ApproximateDistance(edgeIT->startCoord.lat, edgeIT->startCoord.lon, nodesIT->lat, nodesIT->lon);
|
double distance = ApproximateDistance(edgeIT->startCoord.lat, edgeIT->startCoord.lon, nodesIT->lat, nodesIT->lon);
|
||||||
assert(edgeIT->speed != -1);
|
assert(edgeIT->speed != -1);
|
||||||
double weight = ( distance * 10. ) / (edgeIT->speed / 3.6);
|
double weight = ( distance * 10. ) / (edgeIT->speed / 3.6);
|
||||||
int intWeight = std::max(1, (int)(edgeIT->isDurationSet ? edgeIT->speed : weight) );
|
int intWeight = std::max(1, (int)std::floor((edgeIT->isDurationSet ? edgeIT->speed : weight)+.5) );
|
||||||
int intDist = std::max(1, (int)distance);
|
int intDist = std::max(1, (int)distance);
|
||||||
short zero = 0;
|
short zero = 0;
|
||||||
short one = 1;
|
short one = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user