Skip to content

feat: add driver trips history with reverse geocoding

yassine sabir a demandé de fusionner bugFix/VSN-2123 vers develop

****Trips grouping logic by periods For each driver and day, all stored positions are grouped into fixed time periods to form logical trips:

  • Morning: 06:00 → 11:30
  • Midday: 11:30 → 13:30
  • Evening: 13:30 → 18:30
  • Night: 18:30 → 22:30

For each period, we take all positions whose createdAt falls inside the window, sort them by time, then build one trip:

  • Departure = first point (time, position, address)
  • Arrival = last point (time, position, address)
  • Duration = time between first and last point
  • Distance = sum of distances between consecutive points
  • Average speed = distance / duration (km/h)
  • Points = full list of positions used by the map to display the route.

Rapports de requête de fusion