First of all, apologies if I am going about this the wrong way. I am have an intermediate grasp of drupal and its workings.
I have been testing out trackfield for the last week or so on a personal site for my cycle routes, for fun and to learn about drupal as I am fairly new to it, learning fast though I hope.
1. What are the time/speed columns used for in the trackfield_datasets table?
2. (related to 1) I have added the following line to trackfield_gpx.module to extract the time from my .gpx files.
line 28 $sec = trim($point->getElementsByTagName('time')->item(0)->nodeValue);
line 29 $sec = _trackfield_stats_txt2secs($sec);And what was
line 29 $csv .= "$lon,$lat,$alt";
is now
line 31 $csv .= "$lon,$lat,$alt,$sec";
I have implemented the _trackfield_stats_txt2secs($time) function above as the /* Calculate speed if time and distance are there. */ function from line 197 in trackfield_csv.module appears to require the time to be in seconds.
The time and speed fields are now calculating and populating in the database correctly though any initial points with time as '0' (I have more than on occasion) return €the message on saving the node "warning: Division by zero in C:\Documents and Settings\Administrator\Sites\acquia-drupal\sites\all\modules\trackfield\trackfield_csv.module on line 203.". This does not affect viewing the node subsequently.
3. I am struggling to see how the 'time' preset is being calculated for the track_stats field. It is returning and populating '0' in the field...this is before and and after implementing point 2 above. I do not understand why, is anyone able to clarify this?
As I said if this is being raised/communicated in the incorrect manner I apologise and would like to pointed to the correct method. If I am unclear at any point please ask me to clairfy.
Many thanks, I think this is a fantastic module for my purpose :o) Really appreciate the effort that has gone into it already.