Trips are grouped instead of seperate

Freekers7 years ago

Hi!

First of all, thank you very much for Traccar. It's awesome!

However, I'm facing an issue with the Trips feature; Traccar groups several seperate trips into one large trip. For example, I made three seperate trips but Traccar thinks it's just one big trip. How can I tune/change this behaviour?

Here's is my logfile demonstrating the issue I have: https://pastebin.com/SE0yVhJ9

Thank you!

Kind regards.

Anton Tananaev7 years ago

You can configure trip calculation parameters. Check following page:

https://www.traccar.org/documentation/trips-stops/

Freekers7 years ago

Thanks for your quick reply, Anton. I appreciate it!

I set report.trip.minimalNoDataDuration to 600 in my config file and now it works much better, thank you!
However, sometimes it still fails to register a trip. For example this one: https://pastebin.com/6b9Rv8E4
I'm trying to figure out why Traccar doesn't see this as two seperate trips but I don't know why. Do you have an idea?
The first trip starts at 07:07:36 and ends at 07:42:48. The second trip starts at 16:25:29 and ends at 17:08:08. Both trips start with a speed equal to zero KM/h.

Thank you!

Anton Tananaev7 years ago

Please read the documentation. It clearly explains how the algorithm work.

Freekers7 years ago

Hello Anton,

I did read the 'trips-stops' documentation and I roughly understand how it works, but I don't understand why traccar detects just one trip in the previous example I linked;

report.trip.minimalTripDuration - Trips of less than minimal duration and minimal distance are ignored. 300 seconds and 500 meters are default.
--> My trip was over 300 seconds and more than 500 meters

report.trip.minimalTripDistance - Trips of less than minimal duration and minimal distance are ignored. 300 seconds and 500 meters are default.
--> My trip was over 300 seconds and more than 500 meters

report.trip.minimalParkingDuration - Parking for less than minimal duration does not detected as stop. Default 300 seconds.
--> My parking was over 300 seconds

report.trip.minimalNoDataDuration - Gaps in reported positions longer than the value are considered as stops. Default 3600 second.
--> I set this value to 600 seconds and the gap was over this limit.

report.trip.useIgnition - Force switch to stop state if ignition is reported and OFF. Default false.
--> I use the default, so it is set to False.

status.updateDeviceState - Force additional state check when device status changes to "offline" or "unknown". Default false.
--> I use the default, so it is set to False.

So why does traccar still see this as just one trip? https://pastebin.com/6b9Rv8E4
The first trip starts at 07:07:36 and ends at 07:42:48. The second trip starts at 16:25:29 and ends at 17:08:08. Both trips start with a speed equal to zero KM/h.

Thank you very much!

Anton Tananaev7 years ago

Where is the end of the last trip? Traccar won't mark it as a trip unless it detects a beginning of the stop after it.

Freekers7 years ago

Thanks for your reply, Anton!

The trip ends at 17:08:08 with a speed of 0 KM/h. After that time, no further data is sent to Traccar, so report.trip.minimalNoDataDuration = 600 should say to Traccar that the trip has ended, right?

Anton Tananaev7 years ago

Traccar needs to see the stop after the trip. If there is just no data, it doesn't consider it as a stop.

Freekers7 years ago

Thanks for your reply, Anton.

I'm still confused. Traccar documentation states that a stop is determined as follows:

Value of the "motion" attribute
--> 0 KM/h in my case, so should be good.

Directly compare speed to event.motion.speedThreshold configuration parameter
--> 0KM/h is smaller than 0.1 Knots so should be good

Detect gaps between reported position and treat them as parking period
--> Set to 10 minutes. Stop was longer than 10 minutes, so should be good.

I still don't understand why it doesn't treat it as a stop.

Anton Tananaev7 years ago

Your first two points are no valid because both need to be maintained for at least minimalParkingDuration.

Last one about the gap doesn't apply as well because there needs to be at least one location report after the "gap" for Traccar to detect it.

Freekers7 years ago

Thanks Anton. Hmm, then I don't know how to fix this. Thanks for your answer though.

Milosoft6 years ago

where and how can I set the value of 3600 to a lower value of report.trip.minimalNoDataDuration

Anton Tananaev6 years ago

In the config file.