UPDATE:
I tried to manually update in the positions table the latitude and longitude for the last record for that particular device. Once the coordinates are updated, the vehicle is shown on the correct location on the map.
However, when the next record from the device comes in, the coordinates get switched back to the old wrong values, despite the HEX having the correct data.
How is that possible?
You use other filters also?
The only other filters I have are but I don't think it's related:
<entry key='filter.enable'>true</entry>
<entry key='event.overspeed.notRepeat'>true</entry>
<entry key='filter.zero'>true</entry>
First one shouldn't case this.
The second and third one might but not in this case - there is no overspeed alert and the coordinates are not zeros (the record gets saved, just with the wrong coordinates).
You can't manually update position in the database and expect it to work. There's internal cache, so when you update database directly, the behavior is completely unpredictable.
Thanks Anton! I suspected it might be the cache overwriting the manual changes. That's fine.
Still, this doesn't explain why the valid coordinates are being filtered by coordinates.maxError
setting. Any suggestion where to look for the problem?
PS. I will fix this particular issue by disabling the filter but I would also like to make sure this doesn't happen again. If it's a bug in Traccar we have a chance to find and fix it.
You have you to compare the distance. Max error is a very dangerous parameter because you can get stuck in an invalid location. For example if you start with 0,0 coordinates and then move to whatever you real location is, it will filter that jump and you will stay at 0,0 forever.
Thank you for the feedback but I got a bit confused.
In your example if we start with 0,0 coordinates and then move to the real location with valid coordinates why would that jump be skipped? Isn't the coordinates.maxError
filtering only the invalid GPS coordinates if they exceed the threshold?
In my case, the coordinates.maxError
is 500000m, i.e. 500 km. The distance between the old and the real location is about 3,800km. So the maxError setting should filter the new coordinates (this is correct), only if the new coordinates are invalid (this is incorrect because the coordinates are valid according to Traccar).
What am I missing?
Actually you're right. We have a check for invalid location.
And yet the valid coordinates get overwritten. Any suggestions at where I should look for the problem?
I just checked the code and the invalid flag check is not there. I guess it was removed at some point. Maybe by mistake.
Well, issue resolved then. I will wait for the next version to get this fixed.
Thank you for the help, Anton!
Don't forget to file a bug report, so it actually gets fixed.
It's done.
El parámetro coordinates.minError establece el error mínimo permitido para las coordenadas. En este caso, el valor es 20. Este parámetro es relevante para garantizar que las coordenadas reportadas sean lo suficientemente precisas y no incluyan lecturas inestables o incorrectas.
Si este valor es demasiado restrictivo, podría filtrar ubicaciones válidas que están dentro de un rango de error normal. Por ejemplo, si el dispositivo se está moviendo lentamente o está sujeto a fluctuaciones normales en la precisión del GPS, el error puede ser mayor que 20 metros en ciertos momentos. Si se establece coordinates.minError en un valor muy bajo, las coordenadas que superen este límite podrían ser consideradas incorrectas y filtrarse.
Por otro lado, establecer coordinates.minError en un valor razonable y adecuado permite la flexibilidad necesaria para acomodar pequeñas variaciones en la precisión del GPS sin rechazar ubicaciones válidas.
Hi,
So I have a strange problem with coordinates filtering in Traccar using the following setting:
<entry key='coordinates.filter'>true</entry> <entry key='coordinates.minError'>20</entry> <entry key='coordinates.maxError'>500000</entry>
According to the configuration instructions, those settings will filter coordinates if the distance is larger than 500km AND the second record is Invalid.
My second record is valid and the coordinates still get filtered.
Here is the log exmaple:
From Traccar interface:
outdated No
valid Yes
Any idea why the coordinates get filtered?