GPXIN-1: Acceleration/Deceleration Stats



Issue Information

Issue Type: Improvement
 
Priority: Minor
Status: Closed

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: PHP GPXIngest (GPXIN)
Resolution: Done (2013-11-17 20:19:09)
Target version: 1.02,

Created: 2013-11-17 12:01:58
Time Spent Working


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 Links

Toggle State Changes

Activity



Acceleration = (final velocity - initial velocity) / time
Deceleration = (initial velocity - final velocity) / time



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
Created feature branch GPXIN-1-Accel-Stats
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

Formula check -

KPH to metres/s


$metres_speed = ($kph_speed * 1000)/3600;


(10 kph * 1000) = 10000kph / 3600 = 2.7778 m/s


MPH to metres/s (1609.344 metres to mile)


$metres_speed = ($mph_speed * 1609.344)/3600;


(10 mph * 1609.344) = 16093.44 / 3600 = 4.4704 m/s


Figures confirmed using online calculator
Implemented and tested. Commit be95a55 refers.

Will merge changes and close feature branch
btasker changed status from 'Open' to 'Resolved'
btasker added 'Done' to resolution
btasker changed status from 'Resolved' to 'Closed'
Reopening to allow assignment to version 1.02
btasker removed 'Done' from resolution
btasker changed status from 'Closed' to 'Reopened'
btasker added '1.02' to Fix Version
btasker changed status from 'Reopened' to 'Closed'
btasker added 'Done' to resolution