minimalTripDistance not working as expected

Merabtene2 years ago

Using the following settings :

    <entry key='report.trip.minimalTripDuration'>360</entry>
    <entry key='report.trip.minimalTripDistance'>1000</entry>
    <entry key='report.trip.minimalParkingDuration'>360</entry>

    <entry key='report.trip.minimalNoDataDuration'>1200</entry>
    <entry key='report.trip.greedyParking'>false</entry>

I got trip reports with a distance of zero.

https://ibb.co/6bFXPyJ
Capture

I think I'm not supposed to get Trips with zero distance.

I used traccar android client to record positions.

Anton Tananaev2 years ago

Is that all you have in the config for the trip configuration? Have you restarted the service after changing the config?

Merabtene2 years ago

Yes I did restart the server.
The full xml config is as follow :

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

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

<properties>

    <entry key='config.default'>./conf/default.xml</entry>

    <!--
    This is the main configuration file. All your configuration parameters should be placed in this file.
    Default configuration parameters are located in the "default.xml" file. You should not modify it to avoid issues
    with upgrading to a new version. Parameters in the main config file override values in the default file. Do not
    remove "config.default" parameter from this file unless you know what you are doing.
    For list of available parameters see following page: https://www.traccar.org/configuration-file/
    -->

    <!-- <entry key='database.driver'>org.h2.Driver</entry>
    <entry key='database.url'>jdbc:h2:./data/database</entry>
    <entry key='database.user'>sa</entry>
    <entry key='database.password'>xxxxxx</entry> -->

    <entry key='database.driver'>org.postgresql.Driver</entry>
    <entry key='database.url'>jdbc:postgresql://db:5432/traccar</entry>
    <entry key='database.user'>traccar</entry>
    <entry key='database.password'>xxxxxx</entry>

    <entry key='geocoder.enable'>true</entry>
    <entry key='geocoder.type'>nominatim</entry>
    <entry key='geocoder.url'>http://nominatim:8080/reverse</entry>
    <entry key='geocoder.format'>%h %r, %u, %t, %s</entry>
    <entry key='geocoder.onRequest'>true</entry>
    <entry key='geocoder.ignorePositions'>true</entry>
    <entry key='geocoder.reuseDistance'>35</entry>

    <entry key='report.trip.minimalTripDuration'>360</entry>
    <entry key='report.trip.minimalTripDistance'>1000</entry>
    <entry key='report.trip.minimalParkingDuration'>360</entry>

    <entry key='report.trip.minimalNoDataDuration'>1200</entry>
    <entry key='report.trip.greedyParking'>false</entry>

    <entry key='distance.enable'>true</entry>

    <entry key='filter.enable'>true</entry>
    <entry key='filter.zero'>true</entry>
    <entry key='filter.skipLimit'>300</entry>
    <entry key='filter.accuracy'>29</entry>
    <entry key='filter.duplicate'>true</entry>
    <entry key='filter.maxSpeed'>230</entry>

    <entry key='coordinates.filter'>true</entry> 
    <entry key='coordinates.minError'>30</entry>
    

    <entry key='event.motion.speedThreshold'>1.11</entry>
    <entry key='event.enable'>true</entry>
    <entry key='logger.enable'>true</entry>


    <entry key='speedLimit'>64.795</entry>

</properties>

Do you see anything that can cause this issue ?

Anton Tananaev2 years ago

For the minimalTripDistance we always use server calculated distance, but the final trip distance could be odometer if odometer is provided. That's where the source of the problem could be.