fix: rewrite GPS stats to calculate from stored history (#22)
- Replace Traccar summary API dependency with local Haversine distance calculation - Calculate mileage from GpsLocationHistory table (sum consecutive positions) - Filter out GPS jitter (<0.01mi), gaps (>10min), and unrealistic speeds (>100mph) - Calculate trips, driving time, average/top speed from position history - Add detailed stats logging for debugging Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -420,7 +420,7 @@ model GpsLocationHistory {
|
||||
latitude Float
|
||||
longitude Float
|
||||
altitude Float?
|
||||
speed Float? // km/h
|
||||
speed Float? // mph (converted from knots during sync)
|
||||
course Float? // Bearing in degrees
|
||||
accuracy Float? // Meters
|
||||
battery Float? // Battery percentage (0-100)
|
||||
|
||||
Reference in New Issue
Block a user