Filtering

tambiu7 years ago

Hi, I am trying to get filter duplicate entries work, but no success.

In the logs below you can see.

2017-09-22 10:02:33  INFO: [6600FF95] id: 352829055771006, time: 2017-09-22 10:02:32, lat: -23.29556, lon: -51.11354, speed: 0.0, course: 0.0
2017-09-22 10:02:43 DEBUG: [6600FF95: 5023 < 177.160.150.209] HEX: 78781f121109160d022aca027fd4ed057be01400380002d4060413003807015283fe0d0a
2017-09-22 10:02:43 DEBUG: [6600FF95: 5023 > 177.160.150.209] HEX: 787805120003903f0d0a
2017-09-22 10:02:43  INFO: [6600FF95] id: 352829055771006, time: 2017-09-22 10:02:42, lat: -23.29556, lon: -51.11354, speed: 0.0, course: 0.0
2017-09-22 10:02:53 DEBUG: [6600FF95: 5023 < 177.160.150.209] HEX: 78781f121109160d0234ca027fd4ed057be01400380002d406041300380701530ce60d0a
2017-09-22 10:02:53 DEBUG: [6600FF95: 5023 > 177.160.150.209] HEX: 787805120004e4800d0a
2017-09-22 10:02:53  INFO: [6600FF95] id: 352829055771006, time: 2017-09-22 10:02:52, lat: -23.29556, lon: -51.11354, speed: 0.0, course: 0.0
2017-09-22 10:03:03 DEBUG: [6600FF95: 5023 < 177.160.150.209] HEX: 78781f121109160d0302c9027fd4ed057be01400380002d4060413003807015490570d0a
2017-09-22 10:03:03 DEBUG: [6600FF95: 5023 > 177.160.150.209] HEX: 787805120005f5090d0a
2017-09-22 10:03:03  INFO: [6600FF95] id: 352829055771006, time: 2017-09-22 10:03:02, lat: -23.29556, lon: -51.11354, speed: 0.0, course: 0.0
2017-09-22 10:03:13 DEBUG: [6600FF95: 5023 < 177.160.150.209] HEX: 78781f121109160d030cc9027fd4ed057be01400380002d40604130038070155c3570d0a
2017-09-22 10:03:13 DEBUG: [6600FF95: 5023 > 177.160.150.209] HEX: 787805120006c7920d0a
2017-09-22 10:03:14  INFO: [6600FF95] id: 352829055771006, time: 2017-09-22 10:03:12, lat: -23.29556, lon: -51.11354, speed: 0.0, course: 0.0
2017-09-22 10:03:23 DEBUG: [6600FF95: 5023 < 177.160.150.209] HEX: 78781f121109160d0316ca027fd4ed057be01400380002d40604130038070156abad0d0a
2017-09-22 10:03:23 DEBUG: [6600FF95: 5023 > 177.160.150.209] HEX: 787805120007d61b0d0a
2017-09-22 10:03:24  INFO: [6600FF95] id: 352829055771006, time: 2017-09-22 10:03:22, lat: -23.29556, lon: -51.11354, speed: 0.0, course: 0.0
2017-09-22 10:03:34 DEBUG: [6600FF95: 5023 < 177.160.150.209] HEX: 78781f121109160d0321c9027fd4ed057be01400380002d4060413003807015780a70d0a
2017-09-22 10:03:34 DEBUG: [6600FF95: 5023 > 177.160.150.209] HEX: 7878051200082eec0d0a
2017-09-22 10:03:34  INFO: [6600FF95] id: 352829055771006, time: 2017-09-22 10:03:33, lat: -23.29556, lon: -51.11354, speed: 0.0, course: 0.0
2017-09-22 10:03:44 DEBUG: [6600FF95: 5023 < 177.160.150.209] HEX: 78781f121109160d032bc9027fd4ed057be01400380002d406041300380701580ddf0d0a
2017-09-22 10:03:44 DEBUG: [6600FF95: 5023 > 177.160.150.209] HEX: 7878051200093f650d0a
2017-09-22 10:03:44  INFO: [6600FF95] id: 352829055771006, time: 2017-09-22 10:03:43, lat: -23.29556, lon: -51.11354, speed: 0.0, course: 0.0
2017-09-22 10:03:54 DEBUG: [6600FF95: 5023 < 177.160.150.209] HEX: 78781f121109160d0335c9027fd4ed057be01400380002d4060413003807015982c70d0a
2017-09-22 10:03:54 DEBUG: [6600FF95: 5023 > 177.160.150.209] HEX: 78780512000a0dfe0d0a
2017-09-22 10:03:54  INFO: [6600FF95] id: 352829055771006, time: 2017-09-22 10:03:53, lat: -23.29556, lon: -51.11354, speed: 0.0, course: 0.0
2017-09-22 10:04:04 DEBUG: [6600FF95: 5023 < 177.160.150.209] HEX: 78781f121109160d0403c9027fd4ed057be01400380002d4060413003807015a782d0d0a
2017-09-22 10:04:04 DEBUG: [6600FF95: 5023 > 177.160.150.209] HEX: 78780512000b1c770d0a
2017-09-22 10:04:04  INFO: [6600FF95] id: 352829055771006, time: 2017-09-22 10:04:03, lat: -23.29556, lon: -51.11354, speed: 0.0, course: 0.0
2017-09-22 10:04:05 DEBUG: [6600FF95: 5023 < 177.160.150.209] HEX: 78780a134500630001015ba0f70d0a
2017-09-22 10:04:05 DEBUG: [6600FF95: 5023 > 177.160.150.209] HEX: 78780513000c32140d0a
2017-09-22 10:04:05  INFO: [6600FF95] id: 352829055771006, time: 2017-09-22 10:04:03, lat: -23.29556, lon: -51.11354, speed: 0.0, course: 0.0

I am trying to do is discard entries when the vehicle is stationed.

My default.xml

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>

<properties>

    <!-- SERVER CONFIG -->

    <entry key='web.enable'>true</entry>
    <entry key='web.port'>81</entry>
    <entry key='web.path'>./web</entry>
    <entry key='web.cacheControl'>max-age=3600,public</entry>

    <entry key='geocoder.enable'>true</entry>
    <entry key='geocoder.type'>nominatim</entry>
    <entry key='geocoder.url'>http://127.0.0.1/nominatim/reverse.php</entry>
    <entry key='geocoder.processInvalidPositions'>false</entry>

    <entry key='logger.enable'>true</entry>
    <entry key='logger.level'>all</entry>
    <entry key='logger.file'>./logs/tracker-server.log</entry>

    <entry key='event.enable'>true</entry>
    <entry key='processing.copyAttributes.enable'>true</entry>
    <entry key='processing.copyAttributes'>power,ignition,battery</entry>
    <entry key='gt06.alternative'>true</entry>
    <entry key='gt06.enable'>true</entry>
    <entry key='gt06.timezone'>0</entry>

    <entry key='event.overspeedHandler'>true</entry>
    <entry key='event.overspeed.notRepeat'>true</entry>
    <entry key='event.motionHandler'>true</entry>
    <entry key='event.geofenceHandler'>true</entry>
    <entry key='event.alertHandler'>true</entry>
    <entry key='event.ignitionHandler'>true</entry>
    <entry key='event.statusHandler'>true</entry>
    <entry key='event.maintenanceHandler'>true</entry>
    <entry key="mail.smtp.host">smtp.gmail.com</entry>
    <entry key="mail.smtp.port">465</entry>
    <entry key="mail.smtp.ssl.enable">true</entry>
    <entry key="mail.smtp.from">gt06@alertamax.com.br</entry>
    <entry key="mail.smtp.auth">true</entry>
    <entry key="mail.smtp.username">gt06@alertamax.com.br</entry>
    <entry key="mail.smtp.password">Alerta@2017</entry>

    <entry key="filter.enable">true</entry>
    <entry key="filter.invalid">true</entry>
    <entry key="filter.zero">true</entry>
    <entry key="filter.duplicate">true</entry>

    <entry key='database.ignoreUnknown'>false</entry>
    <entry key='database.registerUnknown'>true</entry>
    <entry key='database.registerUnknown.defaultGroupId'>1</entry>


    <!-- DATABASE CONFIG -->

    <entry key='database.ignoreUnknown'>true</entry>

    <entry key='database.generateQueries'>true</entry>

    <entry key='database.changelog'>./schema/changelog-master.xml</entry>
Anton Tananaev7 years ago

I would recommend you to carefully read documentation:

https://www.traccar.org/configuration-file/

tambiu7 years ago

I have already read, but if you could help to make the better config, I would like to discard entries when the coordinates is the same and the speed is zero. thanks

Anton Tananaev7 years ago

I would recommend to enable filtering by distance. You can also use filter.static to filter out position with zero speed.

tambiu7 years ago

thanks, this filter.static is not mentioned in the documentation page, I will try to use it. thanks again

bemeto20177 years ago

I would also like to filter the positions when the car is parked. I have enabled filter.static and I still have those positions. The problem is that the location moves in a range of meters when de car is parked, and those small variations have a speed of between 0.1 and 0.3 km / h, and as the velocity is not zero positions are shown.

Which filter should I use? Thanks.

Anton Tananaev7 years ago

You can filter by distance.