GPS Filtering and Ignition Events Optimization — Traccar 6.15.3

limastor 21 days ago

Hello,

We use Traccar 6.15.3 with PostgreSQL for our GPS tracking platform.

We enabled static filtering to reduce unnecessary GPS positions while vehicles are parked and minimize server load.

Our current configuration is:

<entry key="filter.enable">true</entry>
<entry key="filter.invalid">true</entry>
<entry key="filter.zero">true</entry>
<entry key="filter.static">true</entry>
<entry key="filter.accuracy">100</entry>
<entry key="filter.skipLimit">1800</entry>

However, we are experiencing two issues:

Stop detection can take 30–60 minutes because our backend requires two distinct stationary GPS fixes to confirm a stop.

Ignition ON/OFF events may be delayed or missed due to static position filtering.

We tested filter.skipLimit=300 in a local simulation, which improved stop detection but increased the number of stored positions.

My question: What is the best way to process GPS positions and ignition events in real time while minimizing PostgreSQL writes?

Is it possible to separate real-time processing from position storage without modifying Traccar's source code?

Thank you for your advice!

Anton Tananaev 21 days ago

Is your concern storage size or database connection bandwidth? Have you tried batching writes?

limastor 21 days ago

Hi Anton,

Our main concern is reliable real-time stop detection and ignition events, while avoiding unnecessary database growth and write overhead.

We enabled static filtering primarily to reduce the number of redundant positions stored while vehicles are parked, not because we have confirmed a database bandwidth bottleneck.

Unfortunately, filtering these positions delays stop confirmation and may suppress ignition transitions.

We haven't verified whether position write batching is enabled in our current configuration. We'll check that.

Would you recommend enabling batching and relaxing static filtering in this situation?

Would batching help with write performance while keeping all incoming positions, or is there a better native approach to preserve real-time events without storing every redundant stationary position?

Thank you for your guidance!

Anton Tananaev 20 days ago

Batching will improve database writing performance, if that's an issue.

limastor 20 days ago

Thanks for clarifying the batching aspect.

I understand that batching addresses database write performance, but our main issue is actually stop detection accuracy and event timestamps when static filtering is enabled.

Our backend currently requires two distinct stationary positions to confirm a stop. With filter.static=true and filter.skipLimit=1800, the second position may arrive much later, causing stop detection to be delayed by 30–60 minutes.

I also noticed that Traccar supports filter.skipAttributes to preserve positions when attributes such as ignition change.

I have two specific questions:

  1. For accurate stop detection, is there a native Traccar mechanism that can preserve the actual stop time even when intermediate stationary positions are filtered? Or should we reconsider our backend's two-position confirmation logic and rely on Traccar's native motion/trip processing?

  2. Would you recommend using filter.skipAttributes=ignition together with static filtering to preserve ignition transitions, or are there limitations we should be aware of?

Our priority is reliable stop timestamps and ignition events, while keeping unnecessary stationary position storage low.

Thanks again for your guidance!

Anton Tananaev 19 days ago

Native stop detection also depends on positions passing the filters. It can preserve the detected stop’s timestamp while waiting for confirmation, but it cannot recover the actual stop time if the initial stationary positions were filtered out.

Yes, filter.skipAttributes=ignition can preserve ignition transitions through static filtering, provided the device reports ignition. However, other filters, including invalid positions and accuracy, can still reject those positions.

For reliable stop detection, I would relax static filtering and configure the device to report less frequently while parked, while still reporting motion and ignition changes promptly.