hargata / lubelog

LubeLogger is a web-based vehicle maintenance and fuel mileage tracker
https://lubelogger.com
MIT License
1.07k stars 54 forks source link

Min / Max Fuel Economy when using l/100km #478

Closed auer1329 closed 6 months ago

auer1329 commented 6 months ago

I just noticed when calculating the fuel economy using Liters per 100 Kilometers, the Min and Max values in the Fuel tab are reversed.

image

Min displays the maximum fuel consumption and Max displays the minimum fuel consumption. Is this behavior intended, because I think it originates from the MPG calculation (where Min would mean higher consumption and Max would mean lower consumption)?

hargata commented 6 months ago

Yes, this is functioning as intended, 7L/100Km is lower fuel mileage than 6L/100Km

auer1329 commented 6 months ago

Yes but that does not change the fact that 7 l/100km is not a mileage value but a consumption value.

Mileage: kilometers traveled per liter fuel Consumption: liters consumed per 100 km

7 l/100km is equivalent to a lower mileage, e.g. about 14 km/l but they are just the oposite of one another.

It would be great to have an option to switch the displayed value between the two (with the correct labels), but I think it would require a differentiation between consumption and mileage.

hargata commented 6 months ago

You can toggle the fuel consumption units between l/100km and Km/L, it will also update the labels up top:

https://docs.lubelogger.com/Records/Fuel%20Records#alternate-fuel-units

auer1329 commented 6 months ago

That's a very convenient feature, but my point is that for the calculated values on top of the fuel table there should be a difference between Mileage and Consumption dependent on which value is shown.

Since e.g. in Germany values of l/100km are used in most cars, I would propose to introduce a second set of strings to differentiate between MPG and l/100km calculation, to ensure the lower value always gets the Min label and the higher value always gets the Max label:

Min/Max Mileage: when using Imperial calculation for km/l or MPG

Min/Max Consumption: when using the other calculation method for l/100km gal/100mi

kgraefe commented 1 week ago

I think the translation is wrong. In English it says Min/Max Fuel Economy which would be Kraftstoffsparsamkeit or sth. Now nobody uses this term in reality. So, could we switch that in the translation?

I guess that makes sense even when imperial calculation is selected.

auer1329 commented 1 week ago

Yes, good idea, I'm going to switch the translations.

Since the logic behind it is still "miles per galon", the colors in the dashboard bar chart are still reversed. Low consumption (high economy) is red and high consumption (low economy) is green, maybe something in the code is reversed.