traccar / traccar

Traccar GPS Tracking System
https://www.traccar.org
Apache License 2.0
5.3k stars 2.59k forks source link

Fuel level calculation based on distance and other #3336

Open Abyss777 opened 7 years ago

Abyss777 commented 7 years ago

I liked the idea from https://www.traccar.org/forums/topic/help-with-computed-attributes/ I think that calculated "fuel level"/"spent fuel" based on distance and theoretical consumption might be useful and rather general and might be implemented in code.

There are two options for me:

tananaev commented 7 years ago

I think we need to implement it properly. If device reports consumption and not fuel level, we should use that in reports. That's because some devices can report it natively.

Abyss777 commented 7 years ago

You are right, in case device reports average consumption we simply can multiply traveled distance on average consumption, but I think usually it reports instant consumption and we should go through all positions and accumulate it.

And as final fallback we can simply multiply traveled distance on average consumption if it is set in device attributes.

tananaev commented 7 years ago

Agree. I think there are some devices that do report average consumption.

LucasBSC commented 6 years ago

Is this feature somehow already implemented?