########################################################################################## VEH-46: Update Journeys module for new stats ########################################################################################## Issue Type: Improvement ----------------------------------------------------------------------------------------- Issue Information ==================== Priority: Major Status: Closed Resolution: Done (2013-12-01 18:51:44) Project: VehMan (VEH) Reported By: btasker Assigned To: btasker Components: - Journeys Targeted for fix in version: - 1.0.15 Time Estimate: 0 minutes Time Logged: 0 minutes ----------------------------------------------------------------------------------------- Issue Description ================== New stats have been implemented in GPXIngest. Add support for these ----------------------------------------------------------------------------------------- Issue Relations ================ - relates to GPXIN-5: Trackpoints: Elevation Change - relates to GPXIN-1: Acceleration/Deceleration Stats - relates to GPXIN-2: Add Version number to JSON Object - relates to GPXIN-3: Add speed unit to Header - relates to GPXIN-4: Elevation Stats - is blocked by VEH-45: Acceleration/Deceleration stats - relates to GPXIN-7: Time Moving Stats - blocks VEH-48: Acceleration/Deceleration chart - blocks VEH-49: Speed vs Elevation Chart ----------------------------------------------------------------------------------------- Activity ========== ----------------------------------------------------------------------------------------- 2013-11-30 14:06:02 btasker ----------------------------------------------------------------------------------------- Changing Fix version to new version 1.0.15 as don't want to import any further journeys until these new stats are at least stored in the database ----------------------------------------------------------------------------------------- 2013-11-30 14:06:02 ----------------------------------------------------------------------------------------- btasker added '1.0.15' to Fix Version ----------------------------------------------------------------------------------------- 2013-11-30 14:06:02 ----------------------------------------------------------------------------------------- btasker removed '1.0.2' from Fix Version ----------------------------------------------------------------------------------------- 2013-11-30 14:06:52 btasker ----------------------------------------------------------------------------------------- Created feature branch VEH46 ----------------------------------------------------------------------------------------- 2013-11-30 14:09:43 btasker ----------------------------------------------------------------------------------------- Stats are - Elevation stats - Elevation change - Accel - Decel - Time moving/stationary - Time accel/decel ----------------------------------------------------------------------------------------- 2013-11-30 14:25:27 btasker ----------------------------------------------------------------------------------------- More specifically, pulled from the commits, stats are *Journey* - maxacceleration - maxdeceleration - minacceleration - mindeceleration - avgacceleration - avgdeceleration - timeMoving - timeStationary - timeAccelerating - timeDecelerating *Track* - maxacceleration - maxdeceleration - minacceleration - mindeceleration - avgacceleration - avgdeceleration - speedUoM - elevation->max - elevation->min - elevation->avgChange - timeMoving - timeStationary - timeAccelerating - timeDecelerating *Segment* - elevation->max - elevation->min - elevation->avgChange - timeMoving - timeStationary - timeAccelerating - timeDecelerating *Trackpoint* - acceleration - deceleration - elevationChange ----------------------------------------------------------------------------------------- 2013-11-30 16:10:11 btasker ----------------------------------------------------------------------------------------- Database upgrade SQL tested against dev site successfully ----------------------------------------------------------------------------------------- 2013-11-30 16:10:13 ----------------------------------------------------------------------------------------- btasker changed status from 'Open' to 'In Progress' ----------------------------------------------------------------------------------------- 2013-11-30 16:24:45 btasker ----------------------------------------------------------------------------------------- -- BEGIN QUOTE -- [root@Rimmer www]# php API/cron.php Processing GPX Files Running addJourneyfromGPX for 1......Column count doesn't match value count at row 1You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1Created 1Clearing expired sessions -- END QUOTE -- ----------------------------------------------------------------------------------------- 2013-11-30 16:35:04 btasker ----------------------------------------------------------------------------------------- The Journey record was created in the DB, but the track wasn't suggests it's the creation query there that's failing. ----------------------------------------------------------------------------------------- 2013-11-30 16:38:29 btasker ----------------------------------------------------------------------------------------- Fixed issue with missing comma (line 472) - commit ec672e7 refers -- BEGIN QUOTE -- [root@Rimmer www]# php API/cron.php Processing GPX Files Running addJourneyfromGPX for 1......You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1Created 3Clearing expired sessions -- END QUOTE -- Track has been created but segment hasn't ----------------------------------------------------------------------------------------- 2013-11-30 16:45:09 btasker ----------------------------------------------------------------------------------------- Similar issue, missing comma and use of an apostrophe instead of a magic quote. Commit eb7af1a refers ----------------------------------------------------------------------------------------- 2013-11-30 16:49:51 btasker ----------------------------------------------------------------------------------------- Still need to add the overall journey stats. Tracks don't seem to have the Average Elevation change stored correctly, as its set to 0. Not sure why. Not sure the average is being correctly calculated anyway, the value in Segment is 4768, with a min and max of 45 and 119 ----------------------------------------------------------------------------------------- 2013-11-30 20:11:35 btasker ----------------------------------------------------------------------------------------- All changes tested, merged feature branch into dev and removed it. Still needs to be deployed to the live site ----------------------------------------------------------------------------------------- 2013-12-01 18:29:14 btasker ----------------------------------------------------------------------------------------- Changes deployed to the live site, testing identified issue GPXIN-12 which has now been resolved and committed. Following an initial test Import, 5 days of GPX track files are currently queued for import ----------------------------------------------------------------------------------------- 2013-12-01 18:51:37 btasker ----------------------------------------------------------------------------------------- Files imported correctly. Marking feature as implemented. 1.0.15 is live and released! ----------------------------------------------------------------------------------------- 2013-12-01 18:51:44 ----------------------------------------------------------------------------------------- btasker changed status from 'In Progress' to 'Resolved' ----------------------------------------------------------------------------------------- 2013-12-01 18:51:44 ----------------------------------------------------------------------------------------- btasker added 'Done' to resolution ----------------------------------------------------------------------------------------- 2013-12-01 18:51:49 ----------------------------------------------------------------------------------------- btasker changed status from 'Resolved' to 'Closed'