bmwcarit / barefoot

Java map matching library for integrating the map into software and services with state-of-the-art online and offline map matching that can be used stand-alone and in the cloud.
Apache License 2.0
667 stars 186 forks source link

Possible mistake in path.cost() #161

Open GeoWonk opened 2 years ago

GeoWonk commented 2 years ago

in Path.java I note the following method which sums the length of edges in the route including partial lengths of the source and target edges. In both cases this proportion is calculated as 1 - edge.fraction(). If I understand what is going on this should only be true for source whereas the proportion for the target edge should just be target.fraction(). The proportion of the source is the length of the edge less how far the vehicle is already along it, whereas the proportion of the target is how far the vehicle is along it. `/**