jerm014 / android-mileage

Automatically exported from code.google.com/p/android-mileage
0 stars 0 forks source link

Average cost per km is higher than Maximum cost per km (swapped?) #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Import attached sql db export
2. View statistics
3. Notice that Average cost / km = 0.16 and Maximum cost / km = 0.14

Expected behavior: I would expect the numbers to be correct, or at least adhere 
to mathematical rules that an average can not exceed the maximum.

Actual behavior: Averga is higher than maximum. I don't if the numbers are 
correct at all. Could be that average and maximum are swapped?

Mileage version: 3.0.7
Android version: 2.2
Device: HTC Desire

Please provide any additional information below.

Original issue reported on code.google.com by valentijnscholten on 17 Mar 2011 at 9:52

Attachments:

GoogleCodeExporter commented 9 years ago
I'm a new user, and just noticed this with just 3 entries.

The reason is that the arithmetic is wrong. The cost of the first entry must be 
omitted from the total cost when calculating average consumption, because the 
mileage total is the mileage that's been driven since the first entry. It's a 
simple fix!

Original comment by rickpjo...@gmail.com on 3 Apr 2011 at 5:40

GoogleCodeExporter commented 9 years ago
Fixed! Sorry about that, folks! It'll be released with the next update.

http://code.google.com/p/android-mileage/source/detail?r=3e05d8a79d18606ef0f1b53
c0552815fe18f8959

Original comment by evancharlton on 15 Apr 2012 at 3:31

GoogleCodeExporter commented 9 years ago

Original comment by e...@evancharlton.com on 22 Apr 2012 at 3:44