How to filter illogical and incorrect positions

Nils Leideck a month ago

Dear all,

I have a tracker device that is sending data that looks incorrect or at least illogical. I cannot change the device for now, so I would like to understand if there are some "smart" filter options in Traccar Server to ignore those illogical positions. I do not care much about the display on the map, but the real issue is, that the device is triggering incorrect Geo Fence events all the time.

Here you can see a screenshot of a replay from this month. The positions along the red lines and within the red circle are OK. All other positions are NOT OK.

Selected April 08 2026 12:48:09.png

I am not very sure what additional information can be helpful and I do not want to SPAM this post with information. I do have all raw data and everything if needed.

Thank you very much!

-- Cheers, Nils

Anton Tananaev a month ago

You can try using distance filter, but the jumps look too large.

Nils Leideck a month ago

Hi Anton,

is there more non-code documentation about these filters? I have seen these in the forums, but do not really understand how they work:

<entry key='filter.distance'>##</entry>
<entry key='coordinates.filter'>true</entry>
<entry key='coordinates.minError'>##</entry>
<entry key='coordinates.maxError'>##</entry>

I suppose that you were refering to the filter.distance or FILTER_DISTANCE option. Can you explain those a little bit and also if filter.distance only works with coordinates.filter set to true?

Anton Tananaev a month ago

filter.distance is completely unrelated to coordinates filter. It fill filter data points if they're within certain radius from the last data point.

Nils Leideck a month ago

I do not think that this will help, as I have some data points that are expected to be close to each other.

Is there a filter that can check for jumps of more than 20 meter in less than 1 second, for example?

Anton Tananaev a month ago

Max speed filter.

Nils Leideck a month ago

Ah, I have seen this filter somewhere... What do you think of this combination for my problem?

<entry key='filter.enable'>true</entry>
<entry key='filter.maxSpeed'>72</entry>      <!-- 72 km/h = 20 m/s -->
<entry key='filter.zero'>true</entry>        <!-- Ignore zero coordinates -->
<entry key='filter.invalid'>true</entry>     <!-- Ignore invalid positions -->

Additionally, I have come across this filter:

<entry key='coordinates.filter'>true</entry>
<entry key='coordinates.minError'>20</entry> <!-- Minimum accuracy for coordinate filters -->

But I have seen you often warn of this leading to no position updates. Not sure if it can help with my problem, too.

-- Cheers, Nils

Anton Tananaev a month ago

It is dangerous setting because if you reach 72 km/h then everything will be filtered after that.

Nils Leideck a month ago

I understand - that might be too restrictive ... Any other idea?

Anton Tananaev a month ago

You should know the most context on how to detect invalid positions. The ones I mentioned are the typical options.

Nils Leideck a month ago

Anton, will filter.zero result into LBS data not calculated anymore? My devices are sending LBS data but then the lat and lon data is usally just zero values. Is LBS/wifi data evaluated first and then filter.zero is applied, or the other way round?

Anton Tananaev a month ago

LBS handling is done before filtering.

Track-trace 15 days ago

@Nils Leideck

Why dont you first look at de raw data that the device sends from the worst positions. From the device popup window on the map you can see the exact time of the position. Look it up in the server Log and see the exact real raw data. With that raw data you might find other idears to filter the bad positions. Logicly you would also check what might cause the device to send bad positions (where is the device placed on the vehicle etc). And what radius is actually your Geo fence ?

Nils Leideck 15 days ago

Dear @Track-trace,

My geofence is set between 50 and 200 meters.

I studied both the raw data and the data available in the Traccar UI very thoroughly before turning to the forum. In my setup, I have Traccar forward the data to another web app (webhook). There, the data is processed and supplemented. For example, I filter out all locations that Traccar marks as invalid, but I save the battery charge level and other information. I have a filter there that performs various checks to filter out illogical locations—unfortunately, not very successfully. That’s why I turned to the forum to see if there are already “smart filters” in Traccar itself that can help me identify such—essentially illogical—locations, since the people working on Traccar likely know much more about this topic than I do. But I’ve now reached a point where I can’t make any further progress, so I’ve simply accepted it. Maybe there will be another opportunity to revisit the topic at a later date—but I’ve already invested so much time in it that I need to focus on other things now. That’s just how life goes sometimes. Unfortunately, quality doesn’t always come first.

-- Cheers, Nils

Track-trace 14 days ago

Well, there might be data within the raw data that the device sends that you are not considering. I dont know what your device sends but there are devices that send the accuracy or amount of gps sattelites with every valid location. Those values can also be used.