Watch this Author's files
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.
Does not seem to correctly handle when latitude or longitude is negative. i.e. West and South hemispheres.
Using the variable c assigned on line 138, c(12) designates longitude hemisphere as 'E' or 'W' and c(20) latitude hemisphere as 'N' or 'S'.