My trips are always split

neph 23 days ago

Hi,

With my Teltonika FMB003 tracker in GNSS Sleep mode and Traccar v6.12.2 on Docker, my trips are always split.

Yesterday I had the following settings:

<entry key='filter.enable'>true</entry>
<entry key='filter.static'>true</entry>
<entry key='filter.invalid'>true</entry>
<entry key='filter.accuracy'>100</entry>
<entry key='filter.maxSpeed'>300</entry>

<entry key='event.ignition.minimalDuration'>10</entry>
<entry key='event.motion.speedThreshold'>1.5</entry>

<entry key='report.trip.distancePrecision'>2</entry>
<entry key='report.trip.fuelPrecision'>2</entry>
<entry key='report.trip.newLogic'>true</entry>
<entry key='report.trip.useIgnition'>true</entry>
<entry key='report.trip.minDistance'>500</entry>
<entry key='report.trip.minDuration'>60</entry>
<entry key='report.trip.minStopDuration'>300</entry>
<entry key='report.trip.stopGap'>300000</entry>
<entry key='report.trip.selectFuel'>last</entry>
<entry key='report.trip.fuelDropThreshold'>1.5</entry>
<entry key='report.trip.minimalTripFuel'>0.05</entry>

<entry key='server.timeout'>300</entry>
<entry key='status.timeout'>300</entry>

<entry key='processing.copyAttributes'>ignition,fuel</entry>
<entry key='processing.computedAttributes.deviceAttributes'>true</entry>
<entry key='processing.engineHours.ignitionTimeout'>180</entry

traccar_1.png

Trips 1, 2, and 3 from 7:09 PM to 7:21 PM are the same (but split into 3), then I turned off the engine. The same applies to trips 3, 4, and 5 from 8:18 PM to 8:26 PM


I changed 3 settings because I never got the end of my trip (Traccar indicated that the engine was still running even though the car was parked and therefore switched off) and to try to have a complete trip (not split into 2 or 5 parts) :

<entry key='filter.static'>false</entry>
<entry key='filter.invalid'>false</entry>
<entry key='filter.accuracy'>200</entry>

And look at my trips today. It's even worse. Even though I now have the car's actual status (especially when the engine is off).

traccar_2.png

I'd like Traccar to record trips based solely on the ignition field. I start my car, drive 1 or 10 km, turn off the ignition: trip recorded.

How can I do this? I've been trying things for days, without success, unfortunately...

Thanks for your help.

Anton Tananaev 23 days ago

You have extremely low report.trip.minDuration value. You also have some hallucinated parameters. You should double-check your configuration against the official documentation.

neph 19 days ago

Hi,

You're right, I modified my configuration and had to use a computed attribute for Ignition because it was working poorly with my HEV vehicle.

Now my trips are perfectly structured:

traccar_trips.png

But fuel consumption (in liters) is still empty in the trip list :/ However, I still have the fuel value (in deciliters, io390) in all positions, even when the car is parked and switched off.

Since I entered my tracker model (FMB003) in Settings > Device, fuel consumption per trip no longer works... Previously, I had set report.trip.selectFuel=last and a computed attribute based on fuel consumption using this expression:

io390 ? (io390 / 10.0) : (lastFuel > 0 ? lastFuel : 0)

For testing purposes, I removed my computed fuel attribute... and there's no change (fuel consumption is always recorded in the positions, but not in the trips). How can I get the actual fuel consumption per trip? Even if it's only 0.1L...

Look at the list of my positions at the beginning and end of my first trip of the day:

traccar_positions1.png

traccar_positions2.png

My configuration file:

<entry key='filter.enable'>true</entry>
<entry key='filter.static'>false</entry>
<entry key='filter.invalid'>false</entry>
<entry key='filter.accuracy'>50</entry>
<entry key='filter.maxSpeed'>250</entry>

<entry key='event.motion.speedThreshold'>2.5</entry>

<entry key='report.trip.distancePrecision'>2</entry>
<entry key='report.trip.fuelPrecision'>2</entry>
<entry key='report.trip.newLogic'>false</entry>
<entry key='report.trip.useIgnition'>true</entry>
<entry key='report.trip.minimalStopDuration'>600</entry>
<entry key='report.trip.minimalTripDistance'>500</entry>
<entry key='report.trip.minimalTripDuration'>300</entry>
<entry key='report.trip.selectFuel'>last</entry>
<entry key='report.trip.fuelDropThreshold'>0.01</entry>
<entry key='report.trip.minimalTripFuel'>0.01</entry>

<entry key='server.timeout'>300</entry>
<entry key='status.timeout'>300</entry>

<entry key='processing.copyAttributes'>fuel,power,batteryLevel,hybridBatteryLevel</entry>
<entry key='processing.computedAttributes.deviceAttributes'>true</entry>
<entry key='processing.computedAttributes.lastAttributes'>true</entry>

Thanks in advance for your help, because I'm completely stuck.

Anton Tananaev 19 days ago

Do you have any other fuel attributes? Like fuelUsed?

neph 19 days ago

Yes, I do have the fuelUsed attribute, but it's been stuck at 1.7 for several days. I don't see the point compared to fuel, which is much more interesting and relevant to me.

traccar_positions3.png

Anton Tananaev 19 days ago

The point is that Traccar will prefer that attribute if it's available. That explains exactly what you see.

neph 19 days ago

Ah ok, is it impossible to change the priority order (used fuel instead of fuelUsed for the calculation)? Or do I need to disable sending the fuelUsed attribute from Teltonika Configurator? Or should I set a null value for fuelUsed in Traccar with a computed attribute?

Thanks anyway.

Anton Tananaev 19 days ago

Not possible to change priority, but either disabling on device or clearing with computed attributes should work.

neph 19 days ago

Okay, thank you very much for your help.

Will it work if I put this in the configuration?

<entry key='processing.ignoreAttributes'>fuelUsed</entry>
neph 19 days ago

My two AIs made a mistake, sorry... processing.ignoreAttributes doesn't exist.

If I create a computed attribute fuelUsed and set it to null, will that work?

Anton Tananaev 19 days ago

Yes. And please double check information before asking in the future.

neph 19 days ago

Yes, I'll be careful. Am I doing this correctly with the computed attribute?

traccar_fuel.png

Anton Tananaev 19 days ago

Looks correct.

neph 15 days ago

It works, I finally have the fuel consumption per trip. So thank you very much ;)

I'm trying to calculate/display the average fuel consumption per trip (in liters per 100 km) and the cost of the trip in fuel in EUR. I can't seem to do this with a computed attribute. What's the best method, as I only have the "fuel" field available?