ignore 0 coordinates

Angelo2 years ago

hi,
got something in the log:

2024-03-01 20:04:25  INFO: [T377df513] id: 860501044912117, time: 2024-03-01 20:04:20, lat: 0.00000, lon: -0.00000, course: 0.0
2024-03-01 20:04:25  INFO: [T377df513] id: 860501044912117, time: 2024-03-01 20:04:20, lat: 0.00000, lon: -0.00000, course: 0.0

how to configure the server to ignore this kind of data?
also since it's already in the database, how to remove that?
Thanks

Cristian2 years ago
<entry key='filter.zero'>true</entry>

filter.zero config

Filter zero coordinates. Zero latitude and longitude are theoretically valid values, but it practice it usually indicates invalid GPS data.

Angelo2 years ago

thanks

Henrick Langner2 years ago

I copied your line, entered it to my config and restarted the traccar.service but when I open a device history, there are still zero coordinates shown… is it working for you?

Anton Tananaev2 years ago

Filtering won't change history. It will only apply to the new data.

Henrick Langner2 years ago

Thanks. I fixed it with this MySQL-command:

DELETE FROM tc_positions WHERE latitude = "0";