Summary report - strange values - traccar 5.12

Lukasz10 months ago

Hi,

I'm using traccar 5.12.
I have noticed that the summary report may show strange values for average speed.
Conditions:

  • the car has to be parked all day
  • the ignition must be turned on for a few seconds

Once the summary report is generated, the report will calculate average speed using distance from GPS fluctuations and driving time from engine running time, this causes strange values for average speed.
The photo below shows this:

Is there any improvement planned?
lukasha

Anton Tananaev10 months ago

First thing you should do is check the raw data for the same period.

Lukasz10 months ago

Unfortunately, my logs are of the WARN type, so I do not store RAW data. But I checked all the data for this period in the route report.

In some records, the distance > 0 appears - this is due to GPS fluctuations (the effect of the car drifting even though it is stationary). In several records, the ignition is on - which is true, but the car did not start, but had the ignition on for a moment.
I looked through the source code and, in my opinion, the error is caused by the fact that the average speed is calculated based on the distance (which is > 0 due to GPS fluctuation) divided by the engine operating time, hence these values.
Maybe it is worth introducing an additional condition when determining the distance, that we only count the distance when the ignition is turned on?

lukasha

Anton Tananaev10 months ago

I meant individual positions. They should be in the database.

Lukasz10 months ago

I looked at the position data in the database and they are indeed different, but these differences are due to GPS fluctuations - which is normal (on the route report on the map, it looks as if the car was drifting, even though it was standing still). I know I can use a distance filter to eliminate this but I don't want to do that. I think it is worth considering adding a condition to the distance calculation summary report only when the ignition is turned on. What do you think about it?

Anton Tananaev10 months ago

but I don't want to do that

Please provide details on why.

Lukasz10 months ago

I have had cases where there was a large fluctuation, e.g. 40m. The car moved, and then there were smaller fluctuations and for a longer time the server kept showing the wrong position. Without the distance filter enabled, in this case the car will show a distant position for a moment and then return closer to its true position.

Anton Tananaev10 months ago

There are a bunch of other filtering options. For example you can set skipLimit.

Lukasz10 months ago

I will test the solution - thank you

Lukasz10 months ago

I tested this solution and unfortunately it doesn't work for me. It is very important for me to know when the ignition has been turned on/off. When the distance filter is turned on, records informing about turning the ignition on/off are filtered out.
I tried using the configuration:
filter.skipAttributes
But then it saves all records containing information about ignition, which means that the distance filter does not work (because it is skipped by filter.skipAttributes).
Is there any filter that saves a record when an attribute changes (e.g. the ignition changes its value from true to false, the record is saved and vice versa)?