Can't figure out the units of the X, Y, and Z columns. I did the same as George to get gpx files with trkpt instead of rtept. Also converted time to Matlab serial time using datenum.
This is a useful, good file. A few adjustments could improve it.
To allow the output, 1st line should be:
function route=loadgpx(fileName,varargin)
Calculate range before the viz section, so it can be output too if the viz option is off.
Something about the units is off but I didn't take the time to figure out what is wrong with it... gmaptogpx is outputting elevations in meters, right?
Can't figure out the units of the X, Y, and Z columns. I did the same as George to get gpx files with trkpt instead of rtept. Also converted time to Matlab serial time using datenum.
Comment only
09 May 2011
GPX file reader
%LOADGPX Loads route points from a GPS interchange file
To read my Garmin data change
ptList = d.getElementsByTagName('rtept');
into
ptList = d.getElementsByTagName('trkpt');
and add:
tim = pt.getElementsByTagName('time') ;
timChar = char(tim.item(0).getTextContent) ;
route(i,COL_TIMEVEC) = datevec([timChar(1:10) ' ' timChar(12:19)]) ;
before the end of the main for-loop
with
COL_TIMEVEC = 7:12;
5
09 May 2011
GPX file reader
%LOADGPX Loads route points from a GPS interchange file
This is a useful, good file. A few adjustments could improve it.
To allow the output, 1st line should be:
function route=loadgpx(fileName,varargin)
Calculate range before the viz section, so it can be output too if the viz option is off.
Something about the units is off but I didn't take the time to figure out what is wrong with it... gmaptogpx is outputting elevations in meters, right?
Thanks!
Comment only