Improving Distance Calculation with Real-Time GPS Data: Handling Inaccuracies and Errors (Taxi app)
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.