Traccar inconsistency #21
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Unsure why why there are so many gaps between the coverage. Missing many pings that are interfering with the map plotting.
Investigated and fixed multiple causes of GPS gaps:
The map now shows both live position markers AND historical route trails, so gaps in coverage are visually clear and the routes connect properly.
Is there any way that you can take the data points and tie the positions to the most likely route so we can get accurate mileage? As the user is driving a car (and not flying) this route is impossible.
Are there client setting to ensure that the route/position is captured every 10 seconds?
Fixed with OSRM road-snapping (commit
33fda57)Root cause: GPS routes were drawn as straight-line polylines between GPS points, cutting through buildings and non-existent roads. Mileage was also inaccurate because Haversine distance measures "as the crow flies" between points.
Solution: OSRM Map Matching
OsrmServicecalls the free OSRM Match API to snap GPS coordinates to actual road networksGET /gps/locations/:driverId/history?matched=truereturns road-snapped geometryFiles changed:
backend/src/gps/osrm.service.ts(NEW) - OSRM client with chunking, rate limitingbackend/src/gps/gps.service.ts- getMatchedRoute(), OSRM-based statsbackend/src/gps/gps.controller.ts- history endpoint with matched paramfrontend/src/pages/GpsTracking.tsx- road-snapped polylines + distance badgesfrontend/src/hooks/useGps.ts- matched route requests