Fuel report

bn 5 years ago

The fuel report is incorrect.
Did anyone decide on fuel
Do you have any advice on this?

Anton Tananaev 5 years ago

Decide what?

bn 5 years ago

want to control truck fuel. however, the amount of fuel is incorrectly reported.

Anton Tananaev 5 years ago

So, what do you expect from this forum thread? You haven't provided any information to determine the problem.

bn 5 years ago

The fuel code is all wrong

How to calculate fuel charged level and consumption

Please share your code if possible

Ronald Rodriguez 5 years ago

friend bh hace,

The application works correctly, you must first make a good configuration of your device next to the sensor where you are capturing the information.

Then create a computed attribute with the parameters Refer to your device, everything else you are inventing it.

junk 3 years ago

I have found solution to calculate the spent fuel for a trip on the trip report. Edit the template of the report trip.xlsx located in templates of the traccar directory. Place in cell Fuel spent- ${distanceUnit.equals("mi") ? "".format("%.1f mi", trip.distance * 0.0065) : distanceUnit.equals("nmi") ? "".format("%.1f nmi", trip.distance * 0.065 / 1000) : "".format("%.1f l", trip.distance * 0.065 / 1000)}
replace the number 0.065 with yours average consumption of the fuel.