Timestamp Issue with comma-delimited TXT > GPX conversion

1869
8
03-31-2017 11:55 AM
ShaneShepherd
New Contributor III

Hi everyone,

I have some old GPS track data in the form of a comma-delimited txt file created by DNRGarmin/DNRGPS from a Garmin GPS. I'm trying to convert it into .gpx using gpsbabel so that I can synchronize and geotag some photos using GeoSetter or gpicsync, but whenever I convert it the time field retains the date but sets all the timestamps to midnight (00:00:00). When I load the .txt into DNRGPS, all the timestamps display correctly, but I suspect there is some issue in the format of the date/time stamps that is causing the failure in conversion.

Here is a sample of the txt file:

type,ident,lat,long,y_proj,x_proj,new_seg,display,color,altitude,depth,temp,time,model,filename
TRACK,ACTIVE LOG,60.49318836,-145.46932287,60.49318836,-145.46932287,true,False,16,-25.337646484375,0,0,2009/04/13-18:35:46,GPSMap76CSX,
TRACK,ACTIVE LOG,60.49271084,-145.46979762,60.49271084,-145.46979762,False,False,16,-25.818359375,0,0,2009/04/13-18:36:09,GPSMap76CSX,
TRACK,ACTIVE LOG,60.49256500,-145.46991823,60.492565,-145.46991823,False,False,16,-22.45361328125,0,0,2009/04/13-18:36:16,GPSMap76CSX,
TRACK,ACTIVE LOG,60.49221028,-145.47023163,60.49221028,-145.47023163,False,False,16,16484.345703125,0,0,2009/04/13-18:36:27,GPSMap76CSX,

Any assistance would be greatly appreciated, thanks!

0 Kudos
8 Replies
DanPatterson_Retired
MVP Emeritus

If I am not mistaken, DNRGPS allows you to export to gpx format

0 Kudos
ShaneShepherd
New Contributor III

Indeed it does, but when I do this it either loses the date/time field entirely or retains the date but sets the timestamps to 00:00:00

0 Kudos
DanPatterson_Retired
MVP Emeritus

If the same occurs in gpsbable, I am wondering if time is not supported in the export or the '-' in the datetime string is supposed to be there

That is

TRACK,ACTIVE LOG,60.49318836,-...BIG SNIP ... ,0,0,2009/04/13-18:35:46,GPSMap76CSX,

I am just used to seeing datetime strings without the dash ie...

2017-03-31 17:39:59.378010'   (just ignore the nanoseconds)

So you might want to check to see if DNRGPS supports other datetime formats in setup... I don't have it loaded on my machine and it has been a while since I worked with it.

0 Kudos
ShaneShepherd
New Contributor III

I just tried removing the dash and replacing with a space as you recommended, ran it through GPS babel using input format: universal csv and output format: GPX xml. Same issue, it retains the date, but all timestamps are set to 12am (00:00:00). Mysterious!

0 Kudos
DanPatterson_Retired
MVP Emeritus

same when you save it to gpx format from DNRGPS as well?  If so, then you will have to see if one or the other allows for different datetime formatting.  The last line posted is the universal one, dnr's I think is a variant or U.S. centric... can't remember

0 Kudos
ShaneShepherd
New Contributor III

I hadn't thought to run it in DNRGPS again, thanks for the idea. I did that and got an interesting output, as an example, here is data point 1

text file: 2009/4/13 18:35:46

GPX: 2009/4/14 02:35:46 +00

I am in the Alaska timezone: UTC - 09:00 with DST, so it looks like when I converted to GPX it applied an 8 hour shift forward, perhaps from AK to UTC even though the original timestamp was already in UTC?

0 Kudos
DanPatterson_Retired
MVP Emeritus

At least you have the time... what's 8 hours difference  ... check settings in both

0 Kudos
ShaneShepherd
New Contributor III

Yeah I'll keep working with it and see if I can find out why it applied that time shift. The issue is I am using the track to geotag photos, but maybe I can input a custom offset to sync them up anyways. Thanks a lot for the help Dan!

0 Kudos