VEH-46: Update Journeys module for new stats



Issue Information

Issue Type: Improvement
 
Priority: Major
Status: Closed

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: VehMan (VEH)
Resolution: Done (2013-12-01 18:51:44)
Target version: 1.0.15,
Components: Journeys ,

Created: 2013-11-17 17:47:29
Time Spent Working


Description
New stats have been implemented in GPXIngest. Add support for these


Issue Links

Toggle State Changes

Activity


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
btasker added '1.0.15' to Fix Version
btasker removed '1.0.2' from Fix Version
Created feature branch VEH46
Stats are

- Elevation stats
- Elevation change
- Accel
- Decel
- Time moving/stationary
- Time accel/decel
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
Database upgrade SQL tested against dev site successfully
btasker changed status from 'Open' to 'In Progress'


[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
The Journey record was created in the DB, but the track wasn't suggests it's the creation query there that's failing.
Fixed issue with missing comma (line 472) - commit ec672e7 refers


[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


Track has been created but segment hasn't
Similar issue, missing comma and use of an apostrophe instead of a magic quote. Commit eb7af1a refers
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
All changes tested, merged feature branch into dev and removed it.

Still needs to be deployed to the live site
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
Files imported correctly. Marking feature as implemented. 1.0.15 is live and released!
btasker changed status from 'In Progress' to 'Resolved'
btasker added 'Done' to resolution
btasker changed status from 'Resolved' to 'Closed'