-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong calculation of fuel economy if missing odometer on fuel records #796
Comments
yeah...we're not sure if this is something that really needs fixing. The context behind making the odometer field optional is because of #619 where a user might not fill out the odometer at the point of fueling up but they are expected to fill out the odometer field eventually. Your use-case doesn't seem right. What is the use case for only recording the odometer every 10-20 fuel ups? |
I often find myself in situations where accurately tracking my fuel usage is a challenge. For example:
I don't see why missing a single odometer reading on a fuel record should mess up all of the data with making the "delta" equal the odometer reading and basically making the fuel efficiency close to zero. In the end this is a manual process and people might forget to do a step or two out of it |
That makes sense, let me look into this |
Thanks, mate! Appreciate it! Let me know if I can help further. |
that should be fixed now |
Fix released. |
Checklist
Please make sure you have performed the following steps before opening a new bug ticket, change
[ ]
to[x]
to mark it as donePlatform
Description
When calculating the fuel economy, the data is incorrect if there are missing odometer records attached to it.
e.g. on dates 2024-12-01 and 2024-09-28
I think it'd be correct if it's using the following formulas:
Δ(km) = ${currentOdometerForTheRecord} - ${previousOdometerInFuel}
Fuel Economy(l/100km) = sum(ConsumptionExcludingPreviousRecordWithOdometer) / Δ(km)
So the result will become something like this:
To calculate it I created a simple JS algorithm:
The text was updated successfully, but these errors were encountered: