1.2.6 Odometer Tab and Distance Traveled Chart Changes. #385
hargata
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
Good day, in 1.2.6 there will be some changes on the odometer tab along with the Distance Traveled chart available on the reports page. Below I will list the reason(s) for these changes as well as what you as the user will need to do going forward.
Reasons
We introduced the distance traveled chart in 1.2.0 and it has since spurred quite a few discussions and questions regarding how the distance traveled per month is calculated such as #318 The biggest issue we have faced was that it is very difficult and expensive to determine the distance traveled per month by users solely based on the singular odometer readings across multiple tabs(Odometer, Service/Repair/Upgrades/Fuel).
At the time, we picked the option of least effort short of redesigning how the app handles odometer readings by calculating the difference between the Max and Min odometer reading given a specific month, but this has only spurred more questions. What we have learned is that users were likely only inserting one odometer reading per month and there is no hard and fast rule that specifies when they have to insert an odometer reading.
The Problem with Interpolating Distance Traveled from Odometer Readings
The world pretty much runs on the Gregorian calendar, which dictates certain months have either 30 or 31 days except February which has 28 or 29 days. This is important, because if a user only inserts an odometer reading once a month on say February 15th and their next odometer reading was inserted on April 10th, the distance traveled chart will show a total distance traveled of 0 for the months February, March, and April, because with only one odometer reading per month, the max and min odometer reading is the the same and subtracting them from one another will result in 0. The obvious answer to that would be to interpolate the distance traveled between February 15th and April 10th; however, the calculations of interpolating data can get very expensive, very quickly, it more or less have to perform the following:
It doesn't seem too bad on the surface, until you realize it(the app) has to do this for every month, every year, and if we're calculating for the month of January, it will have to do this with data of the previous year, e.g.: Interpolating distance for January 2024 will have to look for the last odometer record in the year 2023 and then do all of the steps above.
Initial testing has shown that this can potentially tack on an additional minute or 2 depending on amount of records, with about 1000 records we saw a 10 minute long processing time. It is simply not feasible.
The current workaround is that we encourage the user to create an odometer reading at the beginning and end of each month, as outlined here. Problem with this is that some users don't really see the point in creating an entry on the last day of the previous month(e.g.: February 29th) and the beginning of the current month(e.g.: March 1st), and you know what, we agree. It's not practical. Chances are it will have the same odometer reading unless you decided to drive a ton of miles overnight.
Changes
Odometer Tab
Odometer records will now have an additional, optional field called "Initial Odometer", the current "Odometer" field will still be called "Odometer". There will now be a "Distance" column added to the odometer tab that will display the distance traveled between the Initial Odometer and current Odometer. If left blank, the initial odometer field will be populated with the last reported odometer reading in the odometer tab.
Existing Data
If you have a ton of existing odometer records, the app will automatically update those to have an initial odometer reading which basically uses the odometer reading of the last record.
So if you have two odometer records: February 1st with 12000 miles and February 15th with 15000 miles it will convert it to the following:
Note that for the very first record the initial odometer reading will always match the ending odometer reading so that the distance traveled is 0.
Automatic Odometer Insert
When this setting is checked, the auto odometer insert from service/repair/upgrade/fuel records will automatically insert an odometer reading with the initial reading being the last reported odometer reading in the odometer tab.
API
You will be given the option to add an optional "initialOdometer" parameter, if not provided or default to 0, it will auto populate with the last reported odometer reading in the odometer tab.
Distance Traveled Chart
The distance traveled chart in the Reports tab will now solely be based off the "Distance" column in the Odometer tab. It will no longer attempt to calculate the min and max mileage across the different tabs(service/repair/upgrade/fuel)
Action Items(what you have to do)
When will these changes be released
1.2.6 is scheduled to be released 03/15/2024 but can potentially be delayed depending on dev circumstances.
Beta Was this translation helpful? Give feedback.
All reactions