Andy,
Individual tank data is absolutely, positively correct. The distance figures are stored directly. The mileage figure is stored directly. Should the member input gallons instead of mileage, distance/gallons = the mileage that is stored.
Since the database stores the distance and the mileage for each tank (not gallons), I must use calculations to determine the overall weighted mileage for each car. There is, of course, the possibility that my equation is incorrect, and perhaps you have discovered this. However, is the weighted averaging done wrong? Where did the error come from?
If you can provide a better equation to determine weighted mileage and gallons based on the distance and mileage of each tank, I will do my best to implement that equation. I cannot for the life of me, however, understand how the discrepancy happened in the first place.
|