-
-
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
[Feature Request] "Percent Filled" option when not filled to full #817
Comments
Figure out how the calculations for efficiency/mileage should work with the percentage(write an equation) and we will consider it. For reference, here's how the app currently calculates MPG between two fuel records which are filled to full:
and here's how it calculates MPG across two fuel records filled to full with a bunch of partial fuel ups in between:
The burden is on you to figure out how MPG should be calculated for partial fill ups with a percentage thrown in the mix :) |
Thanks for taking the time to detail the equations. With them in mind, it's clear to me now that another number is needed in order for this to work: the tank size/capacity. There are four cases:
The first two are the same, as the fuel replenished is also the amount of fuel spent. In the other two cases, the fuel spent (which we need for the mpg calculation) doesn't match the amount refueled (which is the number we have). If we also know the tank size, then calculating the fuel spent, even when the old/new tank levels differ isn't too hard:
This looks for the difference in the old & new tank levels, and adds or removes the appropriate percent of the overall tank size so it appropriately accounts for the fuel spent. As a simple proof for
If the user does not choose to fill a tank size, and zero is assumed for tank size, the new parts of this equation will multiply by zero, effectively falling back to the current mpg calculation. Though this is a silent failure, so a UI hint/restriction/tooltip is probably needed around this, to prevent or inform the user that they need to fill tank size. This will also work in the case of one or more intermediate partial fillup(s) without a known level:
|
Thanks for the prompt response, the math mostly checks out, the biggest assumption in the equation is that the fuel tank size stays constant throughout the lifespan of the vehicle, which in the case of an electric car, is probably not the case since that would refer to the battery's capacity which is subject to change over the course of the life of the vehicle. I don't own an electric car, but from what limited research I have done online it would seem like most electric vehicles will have a degradation between 4-10% the first year but it slows down after that. If accuracy is what you're shooting for by adding the charged to % field for partial fill ups then we'd also have to add a field for the battery capacity at that point in time, which poses an entire question by its own as to how to actually determine the full capacity of the battery at the specific time. The second, smaller assumption is that the SoC readout is accurate and not subjected to buffers/margins of error, it's not like an ICE vehicle where there is an actual level in the fuel tank that measures how much liquid is in there, and even then the fuel gauges have margins of error built into them. The implementation for this just doesn't seem super feasible given the assumptions it hinges on, and the resulting MPG calculation isn't really being improved on. |
After some consideration, we have decided that we will not be implementing this feature as it will open up more questions down the road. There's just a lot of imprecision involved regarding the percentages and usable battery capacity if you're calculating efficiency post-charge. However! We actually talked to someone with a Tesla who use this app and here's how they use it: They would actually add a fuel record before they start charging their Tesla. They would record the odometer of the vehicle, and for the consumption they will record the amount of kWh used Since Charge For cost, they would just put in the cost of charger they're using, admittedly this is not very precise as the cost should be derived from the last charge, but they're not super concerned about the individual cost for the record but rather as an aggregate on the dashboard. Every fuel record they have is marked as a full fill record regardless of whether they charged to 50% or 80%. From what they've mentioned, this method provides them with a pretty good fuel mileage reading, since Tesla keeps very good track of how much energy was expensed between charges, and it also eliminates the possibility of charging losses. |
Battery degradation... yeah, that will complicate things. I don't have a Tesla, but that's a good idea. I'll see if there's something on my car infotainment (no details like that in the app). What I've been doing is using HomeAssistant to record the recharge. When the charger turns from Charging to Not Changing, HomeAssistant will fire an automation that will send an API call to LubeLogger to record a fuel record, using the current odometer from the car, the amount of power delivered by the charger to the car, and the current electricity rate from another HomeAssistant plugin. The missing piece is when I tell the car to charge to different levels. Thanks anyway! |
I have an electric car, most of the time I charge it to 80%, but on occasion (and more often in the winter), I need to charge it to 100%.
In Lubelogger, I could select "Filled to full" only when I charge it to 100%, but this is not ideal, because I would only get mileage tracking at full charges, which is infrequent (maybe every other month in the summer for me).
Right now, I select "filled to full" on every charge (80% or 100%), tag the 100% charges for my own reference, but that throws off the mileage calculation, for both the current charge (because it took 20% more power), and the next charge (where I went 20% further). This, more or less, averages out in the dashboard view, but is a messy fuel table.
What would be ideal for me is when "filled to full" is toggled off, give the user the ability to provide a percent filled (eg: 80%), which is used in the mileage calculation, for that line (if provided).
The text was updated successfully, but these errors were encountered: