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
665 stars 186 forks source link

About the U-Turns #106

Closed CallumWang closed 6 years ago

CallumWang commented 6 years ago

Hi: Recently,when i read about your source code. I find you write comment like this below:

https://github.com/bmwcarit/barefoot/blob/fc2c097f712ca2ac34631481498d561fd728ddda/src/main/java/com/bmwcarit/barefoot/matcher/Matcher.java#L280

In the comment, you mean you choose lambda Math.exp((-1.0) lambda * Math.max(0, route.length() - dt)) to avoid unnecessary routes in case of u-turns. Well, in my opinion, the route.length is always greater than dt, isn't? So the Math.max(0,route.length()-dt) is actually route.length()-dt . which is in fact,the same as the transmission prob for Newson and Krumm 2009.

So what do you mean by avoiding unnecessary routes in case of u-turns?

Thanks you in advance.