wannesm / LeuvenMapMatching

Leuven.MapMatching toolbox for aligning GPS measurements to locations on a map.
Other
228 stars 44 forks source link

Improve performance when passing through tunnels #52

Open giorgiovisani opened 9 months ago

giorgiovisani commented 9 months ago

Dear developers, I do appreciate your hard work to produce this nice and handy package.

However, I'm struggling when it comes to tuning the hyperparameters of the matcher. In particular, I am testing it with GPS locations recorded during a motorway trip, in which we crossed few tunnels. Tunnels seem to be difficult to handle and I wanted to ask your opinion on whether it is best to:

Also, I did not get exactly how the non_emitting_length_factor parameter is exploited in the code and how it should be tuned (eg. increasing it we obtain less or more penalty for a sequence of non-emitting states? And what is the neutral value to get no penalty neither reward for the sequence of non-emitting states against a normal sequence?)

wannesm commented 9 months ago

The method is robust if the outliers are spread out. But if there is a longer sequence of scattered measurements you should consider applying a Kalman filter first to denoise the signal.

For example using https://github.com/wannesm/LeuvenMapMatching/blob/9ca9f0b73665252f2ee492fae9dd243feef2f39d/leuvenmapmatching/util/kalman.py#L19

giorgiovisani commented 9 months ago

Thank you Wannes for your suggestion. Indeed it works much better when I first apply the Kalman filter. Keep up the good work :)