Re-calculate distance after deleting Lat/Long 0,0 rows from DB

Paul 7 years ago

Is there a sql query, tool, or other method to re-calculate distance from the database history of the device? I deleted a bunch of bad position reports and my odometer still shows nearly a million miles. I understand Traccar calculates this value and does not retroactively update it when bad records are cleared.

Ernesto Vallejo 7 years ago

Run trip report again and update accumulators? Will that do?

Paul 7 years ago

No, the value is accumulative and trac car just computes it based on the last value and updates the subsequent one. There would need to be a maintenance job to re-process all distance records sequentially in the DB.