Ok thought about it further, and I think I have found the "magic" formula;)
The calculation is only correct if you do full refuels, as said before. But if you do partial fills it gets confused. So we need something to indicate its not a full refuel.
With this in place you can summarize all partial refills and add it up to the next full refill and calculate with this.
e.g.
you do 3 partial refills and then a full refill
so you driven the distance from the last refill and the 3 partial refills before.
same for the gasvolume: volumefullrefuel + 3 partialrefillvolumes
with this then: totalfuel * 100 / totaldistance
(I hope you understand as I'm not a native speaker)
Ok thought about it further, and I think I have found the "magic" formula;)
The calculation is only correct if you do full refuels, as said before. But if you do partial fills it gets confused. So we need something to indicate its not a full refuel.
With this in place you can summarize all partial refills and add it up to the next full refill and calculate with this.
e.g. lumes
you do 3 partial refills and then a full refill
so you driven the distance from the last refill and the 3 partial refills before.
same for the gasvolume: volumefullrefuel + 3 partialrefillvo
with this then: totalfuel * 100 / totaldistance
(I hope you understand as I'm not a native speaker)
What do you think?