Needs review
Project:
Trackfield
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Dec 2011 at 11:32 UTC
Updated:
25 Dec 2011 at 21:44 UTC
Jump to comment: Most recent file
Comments
Comment #1
slcp commentedWhen thinking about how to implement this it occurred to me that there was an opportunity for another dataset to be utilised.
The patch below parses the UTC time/date data from GPX files and modifies how Trackfield CSV handles additional user data. It assumes that 'time' is a UTC encoded (or similar) time as opposed to a seconds count (of duration) or stopwatch timer and uses this data to calculate the 'seconds' dataset. This handles both calendar, stopwatch-style 'time' and raw numeric data.
As a result of this patch Trackfield Stats becomes a dependency of Trackfield CSV, perhaps moving (and renaming?) _trackfield_stats_txt2secs($item) function into CSV could be considered as this is used to process the 'time' data.
Trackfield could now provide Time (Duration) and Time (Calendar), the handling of these is outside the scope of this patch.
Comment #2
slcp commentedChanging status - might attract some attention...
Comment #3
slcp commentedThis needs work, I had never looked at the CRS and and TCX .module files before as I have never used them and assumed they would be comparable to the GPX parser. It turns out they are not.
Whereas the time is not parsed from a GPX file, let alone handled, both of these are done for TCX and CRS files.
So, this new patch parses and formats the time into the duration (in seconds) for the GPX file in same way the TCX and CRS modules do.
I guess handling actual calendar data can wait for another day.