Distance calculation from DB and server time

Sasa2 years ago
  1. What is the best approach to calculate distance in some period directly from DB? If table tc_positions is right table, which attribute should we use, distance or totalDistance? Which attributes and tables web app use for distance calculation, because we get some difference while comparing app results vs manual query results?
  2. How to adjust server time in config\default.xml file to use time zone GMT+2 (CEST)?

We are using Traccar v.4.12 on linux, and MySql db

Anton Tananaev2 years ago
  1. We use total distance or odometer.
  2. Why do you need to adjust server time? Adjusting server time is usually a mistake. You should instead set user timezone correctly.
Sasa2 years ago

Anton,

  1. Where we can find odometer attribute in DB, because as we said when we are using total distance attribute there is the mismatch between distance that traccar webapp show and distance that we get manually by calculating total distance with that attribute from DB?

  2. Where to set user time zone? We need to adjust server time to have precise time when we are looking car movement from for example 20.01.2022 at 00:00 to 21.01.2022 at 00:00 we get exactly that result for our time zone

  3. What is you recomendation for OS and DB for Traccar. With versions (4.12) we have some problems with CPU utilization on Windows, and not on Linux. Are that is solved with version 5.4

Anton Tananaev2 years ago
  1. Same place where you have total distance, but it's only available if your device reports it.

  2. In the account settings.

  3. I would recommend Linux and MySQL database.