########################################################################################## GPXIN-1: Acceleration/Deceleration Stats ########################################################################################## Issue Type: Improvement ----------------------------------------------------------------------------------------- Issue Information ==================== Priority: Minor Status: Closed Resolution: Done (2013-11-17 20:19:09) Project: PHP GPXIngest (GPXIN) Reported By: btasker Assigned To: btasker Targeted for fix in version: - 1.02 Time Estimate: 0 minutes Time Logged: 0 minutes ----------------------------------------------------------------------------------------- Issue Description ================== When processing trackpoints, would be good to generate stats based on acceleration/deceleration. If the journey log was ever needed to back up a contested insurance claim, it'd be good to be able to include - maximum rate of acceleration - maximum rate of deceleration - average rate of acceleration - average rate of deceleration ----------------------------------------------------------------------------------------- Issue Relations ================ - is duplicated by VEH-45: Acceleration/Deceleration stats - relates to VEH-46: Update Journeys module for new stats - relates to GPXIN-29: Inconsistency in the Journey Stats available at each level ----------------------------------------------------------------------------------------- Activity ========== ----------------------------------------------------------------------------------------- 2013-11-17 14:09:53 btasker ----------------------------------------------------------------------------------------- -- BEGIN QUOTE -- Acceleration = (final velocity - initial velocity) / time Deceleration = (initial velocity - final velocity) / time -- END QUOTE -- So should be reasonably easy to add a calculation; |time (seconds)|speed (metres/sec)|Acceleration|Deceleration| |0|0| | | |10|50||5 m/s^2 | | |15|65||3 m/s^2 | | |25|50| ||1.5 m/s^2| |30|40| ||2 m/s^2| |0|0| ||4 m/s^2| As the SI for acceleration is metres a second (squared), we'll need to convert speeds from MPH/KPH ----------------------------------------------------------------------------------------- 2013-11-17 14:13:43 btasker ----------------------------------------------------------------------------------------- Created feature branch GPXIN-1-Accel-Stats ----------------------------------------------------------------------------------------- 2013-11-17 15:09:24 btasker ----------------------------------------------------------------------------------------- Track stats will be pushed to object arrays - faccel - fdecel Journey stats will be pushed to - accels - decels Acceleration and deceleration will not be included if speeds are suppressed. The following stats will be available at Journey and Track levels (support for segments not being implemented at this time) - Max acceleration - Max deceleration - Min acceleration - Min deceleration - Average acceleration - Average deceleration ----------------------------------------------------------------------------------------- 2013-11-17 16:01:28 btasker ----------------------------------------------------------------------------------------- Formula check - *KPH to metres/s* -- BEGIN QUOTE -- $metres_speed = ($kph_speed * 1000)/3600; -- END QUOTE -- (10 kph * 1000) = 10000kph / 3600 = 2.7778 m/s *MPH to metres/s (1609.344 metres to mile)* -- BEGIN QUOTE -- $metres_speed = ($mph_speed * 1609.344)/3600; -- END QUOTE -- (10 mph * 1609.344) = 16093.44 / 3600 = 4.4704 m/s Figures confirmed using online calculator ----------------------------------------------------------------------------------------- 2013-11-17 16:19:36 btasker ----------------------------------------------------------------------------------------- Implemented and tested. Commit be95a55 refers. Will merge changes and close feature branch ----------------------------------------------------------------------------------------- 2013-11-17 16:21:04 ----------------------------------------------------------------------------------------- btasker changed status from 'Open' to 'Resolved' ----------------------------------------------------------------------------------------- 2013-11-17 16:21:04 ----------------------------------------------------------------------------------------- btasker added 'Done' to resolution ----------------------------------------------------------------------------------------- 2013-11-17 16:21:10 ----------------------------------------------------------------------------------------- btasker changed status from 'Resolved' to 'Closed' ----------------------------------------------------------------------------------------- 2013-11-17 20:13:34 btasker ----------------------------------------------------------------------------------------- Reopening to allow assignment to version 1.02 ----------------------------------------------------------------------------------------- 2013-11-17 20:13:34 ----------------------------------------------------------------------------------------- btasker removed 'Done' from resolution ----------------------------------------------------------------------------------------- 2013-11-17 20:13:34 ----------------------------------------------------------------------------------------- btasker changed status from 'Closed' to 'Reopened' ----------------------------------------------------------------------------------------- 2013-11-17 20:16:11 ----------------------------------------------------------------------------------------- btasker added '1.02' to Fix Version ----------------------------------------------------------------------------------------- 2013-11-17 20:19:09 ----------------------------------------------------------------------------------------- btasker changed status from 'Reopened' to 'Closed' ----------------------------------------------------------------------------------------- 2013-11-17 20:19:09 ----------------------------------------------------------------------------------------- btasker added 'Done' to resolution