########################################################################################## VEH-22: Journey Stats Generation ########################################################################################## Issue Type: Sub-task ----------------------------------------------------------------------------------------- Issue Information ==================== Priority: Major Status: Closed Resolution: Won't Fix (2019-09-09 16:22:07) Project: VehMan (VEH) Reported By: btasker Assigned To: btasker Child of: VEH-17 - Stats Submodule Targeted for fix in version: - 1.5 Time Estimate: 0 minutes Time Logged: 0 minutes ----------------------------------------------------------------------------------------- Issue Description ================== Need to create a module similar to that in VEH-19 to generate statistics based on JourneyTracks (chosen as adding a stat indicator to the trackpoints table would massively increase the table size due to the number of records) ----------------------------------------------------------------------------------------- Issue Relations ================ - relates to VEH-33: Monthly/Daily Modal speeds may not be accurate ----------------------------------------------------------------------------------------- Activity ========== ----------------------------------------------------------------------------------------- 2013-11-02 18:51:19 ----------------------------------------------------------------------------------------- btasker added '1.0.1' to Fix Version ----------------------------------------------------------------------------------------- 2013-11-09 04:13:47 btasker ----------------------------------------------------------------------------------------- Stats might include - Daily journey time - Time moving - Time stationary - Avg Speed - Modal Speed - Distance travelled (Might be a bit processor intensive though) - Number of journeys recorded ----------------------------------------------------------------------------------------- 2013-11-09 05:39:34 btasker ----------------------------------------------------------------------------------------- Part way through implementation, but current implementation is likely to fail if journeys falling within a day are processed in seperate stats runs - something that's more likely with the monthly stats. Will need to rework the selection mechanism to ensure that the full day/month gets reworked. An alternative would be to create a couple of stats points so that average speeds could be worked out incrementally. So as well as the stats above, we'd have the following stored in the stats table (though not necessarily user visible) - Total speed (a sum of all trackpoints) - Trackpoint count Wouldn't help with modal speed though, the only way to (accurately) recalculate that would be to run back over all the trackpoints (which for an entire month might be an incredibly expensive operation) ----------------------------------------------------------------------------------------- 2013-11-09 06:00:37 btasker ----------------------------------------------------------------------------------------- The only way to accurately get a modal speed is going to be to re-process the speeds. Take the following example |Day|Speeds|Modal| |1|65 65 65 65 65 65 70 70|65| |2|65 70 70 70|70| |3|65 65 65 65 70 70 70 70 70|70| There are 10x70, 11x65 in that table. If we use the calculated modals we get a modal speed of 70, wherehas if we combine the number we (correctly) get 65. One option might be to defer generation of monthly stats until the end of the month, and then re-run the month if a new journey trackpoint is added. Would need to get the scheduler up and running first though. In the meantime, it probably makes sense to just not store the modal speed for the month (as hitting this issue for days is less likely) and where needed to aggregate the daily. Will raise a seperate bug for the fix. ----------------------------------------------------------------------------------------- 2013-11-09 06:10:07 ----------------------------------------------------------------------------------------- btasker changed status from 'Open' to 'In Progress' ----------------------------------------------------------------------------------------- 2013-11-10 01:17:54 btasker ----------------------------------------------------------------------------------------- As a temporary workaround, the aggregate modal should be used when generating charts/stats. As it's a temporary workaround we'll just not store that data in the stats table until a proper fix is created for VEH-33. ----------------------------------------------------------------------------------------- 2013-11-10 01:19:24 btasker ----------------------------------------------------------------------------------------- Actually, given the potential for mis-calculations until this is resolved, I'm going to defer the fix until a later version. ----------------------------------------------------------------------------------------- 2013-11-10 01:19:36 ----------------------------------------------------------------------------------------- btasker added '1.5' to Fix Version ----------------------------------------------------------------------------------------- 2013-11-10 01:19:36 ----------------------------------------------------------------------------------------- btasker removed '1.0.1' from Fix Version ----------------------------------------------------------------------------------------- 2019-09-09 16:22:07 btasker ----------------------------------------------------------------------------------------- Bulk Close. Realistically, this project's not going to see any further development (other than possibly some bug fixes for anything new that's found). Closing any outstanding issues as Won't Fix ----------------------------------------------------------------------------------------- 2019-09-09 16:22:07 ----------------------------------------------------------------------------------------- btasker changed status from 'In Progress' to 'Closed' ----------------------------------------------------------------------------------------- 2019-09-09 16:22:07 ----------------------------------------------------------------------------------------- btasker added 'Won't Fix' to resolution