If trackpoints do not include speed values, calculate the time moving stats (implemented in GPXIN-7) based on whether the lat/lon values have changed between trackpoints.
Repo: PHP-GPX-Ingest
Commit: 05af1e87f7e1c32735e0715f571be8e068544b29
Author: Ben Tasker <github@<Domain Hidden>>
Date: Mon Aug 10 13:50:56 2015 +0100
Commit Message: Class will calculate speed and timemoving from calculateddistance if enabled. Minor issues. See GPXIN-13
However, the class is generating PHP warnings (repeatedly)
PHP Warning: array_count_values(): Can only count STRING and INTEGER values! in /tmp/gpx/GPXIngest.class.php on line 701
PHP Warning: array_count_values(): Can only count STRING and INTEGER values! in /tmp/gpx/GPXIngest.class.php on line 776
PHP Warning: array_count_values(): Can only count STRING and INTEGER values! in /tmp/gpx/GPXIngest.class.php on line 475
Speedstring: 0 MPH (string), speedint: 0 (integer),dist: 0, entryperiod: 0
Speedstring: 1 MPH (string), speedint: 1 (double),dist: 12.54, entryperiod: 11
Speedstring: 1 MPH (string), speedint: 1 (double),dist: 35.688, entryperiod: 17
Speedstring: 2 MPH (string), speedint: 2 (double),dist: 165.323, entryperiod: 57
Speedstring: 2 MPH (string), speedint: 2 (double),dist: 58.918, entryperiod: 17
Speedstring: 2 MPH (string), speedint: 2 (double),dist: 51.325, entryperiod: 20
Speedstring: 1 MPH (string), speedint: 1 (double),dist: 14.79, entryperiod: 16
Speedstring: 2 MPH (string), speedint: 2 (double),dist: 29.621, entryperiod: 13
Speedstring: 1 MPH (string), speedint: 1 (double),dist: 14.438, entryperiod: 12
PHP Warning: array_count_values(): Can only count STRING and INTEGER values! in /tmp/gpx/GPXIngest.class.php on line 703
PHP Warning: array_count_values(): Can only count STRING and INTEGER values! in /tmp/gpx/GPXIngest.class.php on line 703
PHP Warning: array_count_values(): Can only count STRING and INTEGER values! in /tmp/gpx/GPXIngest.class.php on line 703
PHP Warning: array_count_values(): Can only count STRING and INTEGER values! in /tmp/gpx/GPXIngest.class.php on line 703
PHP Warning: array_count_values(): Can only count STRING and INTEGER values! in /tmp/gpx/GPXIngest.class.php on line 703
PHP Warning: array_count_values(): Can only count STRING and INTEGER values! in /tmp/gpx/GPXIngest.class.php on line 703
PHP Warning: array_count_values(): Can only count STRING and INTEGER values! in /tmp/gpx/GPXIngest.class.php on line 703
PHP Warning: array_count_values(): Can only count STRING and INTEGER values! in /tmp/gpx/GPXIngest.class.php on line 703
Created a new array within the metadata object - AutoCalc - if the speed has been calculated from the distance calculations it will set speed to true. Used an array so that if we end up calculating other items in future we don't flood the metadata object with near identical properties.
Have marked as Complete - currently this will only happen if Distance calculations are explicitly enabled - the longer term plan though is to remove the need for explicit enabling of that functionality.
Activity
2015-01-14 23:03:21
2015-08-09 00:51:03
2015-08-10 13:52:06
Webhook User-Agent
View Commit
2015-08-10 14:01:25
However, the class is generating PHP warnings (repeatedly)
All relate to trying to extract the modal speed
I'd guess we're occasionally setting a boolean as speedint which is then pushed into fspeed and sspeed on line 427
Should be reasonably easy to sort out, but well worth double-checking where else ptspeed is used.
2015-08-10 14:08:40
Looks like we're occasionally getting a double
So commit f6106ed castes ptspeed to an integer
2015-08-10 14:09:59
2015-08-10 14:10:06
Webhook User-Agent
View Commit
2015-08-10 14:15:47
2015-08-10 14:16:06
Webhook User-Agent
View Commit
2015-08-13 17:59:01
2015-08-13 17:59:01
2015-08-13 17:59:08
2015-08-13 18:00:10