Map Matching creates unnecessary U-turns

Hello,
I’m using Self-hosting GH map matching for my needs.
Using master branch, check-outed these commits:


I’m trying to match my routes but get issues on some segments where matched path actually do unnecessary U-turns:

Also, with another route:

Are there any configuration params which could be adjusted to avoid these “unnecessary U-turns” ?

Routes:
mm-uturns1.txt (2.3 KB)
mm-uturns2.txt (2.3 KB)

Thanks

Can you try a bigger value for gps_accuracy?

Hi Peter,

here are screenshots for various values of gps_accuracy:

gps_accuracy=50: (same as from my previous comment)


gps_accuracy=60:

gps_accuracy=70:

gps_accuracy=80:

gps_accuracy=90:

gps_accuracy=100:

values 60 and 90 fixed case 1 but not case 2 also.

Thanks, we’ll have to debug this. Maybe you would have some time :slight_smile: ?

This is important to get fixed and worth a new issue: https://github.com/graphhopper/map-matching/issues/70

Can you try with the latest development version? This should be improved.

I’ve tried the latest development version, and it still creates unnecessary u-turns.