fix: Pi trip builder drops GPS lock-in drift trips (BUG-23)

Add the server's minimum-trip filter to build_trip_summaries() — duration
< 30s OR distance < 0.05km is rejected — so GPS lock-in drift no longer
spawns false trips on the Pi. Also sort normalized rows by datetime (the
server already orders by recorded_at ASC), fixing clock-rollback trip
boundaries. Bump TRIP_BUILD_VERSION to force a Pi-side rebuild.
This commit is contained in:
Mathieu Moran
2026-08-15 16:05:27 -04:00
parent 94dcffa2cb
commit 78aea2dc88
3 changed files with 44 additions and 31 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ IDLE_LOG_INTERVAL = 60
GPS_LOG_DISTANCE_METERS = 8
TRIP_REFRESH_INTERVAL = 30
TRIP_REBUILD_OVERLAP_ROWS = 120
TRIP_BUILD_VERSION = 3
TRIP_BUILD_VERSION = 4
_conn = None
_conn_lock = Lock()