Fuel report

dodododododxa year ago

I have a Teltonika FMB920 setup.

The Device reports fuel by io9 as "mV" depending on the fuel level. So i made this:

Desc: fuel
Attribute: Fuel

if (io9 == 131) {
    fuel = null;
}
else if (io9 >= 6100) fuel = 3;
else if (io9 >= 5316) fuel = 5;
else if (io9 >= 4530) fuel = 7;
else if (io9 >= 3744) fuel = 9;
else if (io9 >= 2958) fuel = 11;
else if (io9 >= 2172) fuel = 13;
else if (io9 >= 1386) fuel = 15;
else if (io9 >= 600) fuel = 19;

Report Fuel

Why is that?
Notice that the scale is not starting at 0.

Anton Tananaeva year ago

Is the question why it doesn't start at 0? Why would it if you don't have any zeroes in the data?

dodododododxa year ago

Kind of. The y Axis does not have a 0 which is normally fine as the fuel tank usually never is 0.
However all the dots are either totally at the top or at the bottom. However when you see the tooltip in the picture it says 13 liters but there is no 13 on the y axis.

Anton Tananaeva year ago

Please provide a data export and we can take a look.

Are you using the latest official release without any customization?

dodododododxa year ago

Using docker on a raspberry with image: traccar/traccar:debian
No customization that I am aware of. I will try to find out how to do a data export.

dodododododxa year ago

For others:

Seems that a change in traccar.xml fixed the issue.

<entry key='processing.copyAttributes.enable'>true</entry>
<entry key = 'processing.copyAttributes'>fuel</entry>

The graph shows properly.