Reputation: 11
I’m calculating the distance traveled based on consecutive latitude and longitude points (n-1 and n) using the Haversine formula. I’m using the Geolocator package to stream location data every second. It works fine on my device and a few others I tested, but for some drivers, I’ve noticed errors in the calculations. Out of 10 driver's trip(entire trip), 1-2 can sometimes be wrongly calculated, often exagerated manner.
I suspect it might be due to GPS inaccuracies or device-specific issues. How can I improve my distance calculation to handle these errors better? I don’t have predefined points, and the system relies entirely on these streamed location updates. Any suggestions for filtering bad data or alternative approaches to make the calculations more robust?
Upvotes: 1
Views: 20