map matching using only single route object

I want to use map matching feature from “libosrm C++” in my navigator app, but I’m not planning to download maps on my server. I request point to point route from mapbox(directions api) and want to know if I’m on this route currently, having only route object(array of coordinates from start point to finish) and my messy gps data. Thanks for attention.

duplicate to: https://help.openstreetmap.org/questions/70624/map-matching-using-only-single-route-object