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
664 stars 185 forks source link

Optimizing for data less accurate than GPS #127

Open cbrincoveanu opened 5 years ago

cbrincoveanu commented 5 years ago

Hi, Do you have advice on how to optimize Barefoot for input data that is less accurate than GPS? In my case, the standard deviation would be around 250 meters. In addition to that, the signals appear far less frequent (possibly just once per minute). I tried changing parameters: sigma=200 max.distance=700

Apart from that, how would I optimize Barefoot for bikes or pedestrians?

Thank you, Constantin

smattheis commented 5 years ago

In a past project, we have used data with three minutes interval which was still okay but results rely consequently mostly on routing between positions. That means, one minute intervals should be okay. However, you should set matcher.distance.max to something that considers the time interval and some tolerance above the maximum speed that your objects move. For instance, considering biycycles with one minute intervals a maximum of 120 km/h should be okay (https://www.quora.com/How-fast-do-people-ride-during-Tour-de-France) and means 2000 meters maximum distance within 60 seconds. For cars, I would suggest 300 km/h maximum speed and 5000 meters max distance for 60 second intervals. Note, if time intervals vary choose the maximum. I see the difficult the accuracy of your position measurements. I have never used data with a standard deviation of more than 50 meters ... Nevertheless, the straight-forward approach would be to set matcher.sigma to 250 meters, maybe go with 150 meters first.

To use Barefoot for bicycles, you should check out the findings of @filipeGuerreiro as described in https://github.com/bmwcarit/barefoot/issues/6. For pedestrians, I have no experience and it may work similar but I don't know about the tagging of ways for pedestrians. Anyways, this could help to define a road type configuration for OSM data and ways for pedestrians: https://wiki.openstreetmap.org/wiki/Pedestrian (Note, you could also include roads to have a map with high coverage but tune it to 'avoid' major roads by assigning a lower priority to be used for routing/matching.)