Sujal
Sujal

Reputation: 1

Kinematics plots of raw GPS data from .txt file in MATLAB

I have a set of raw GPS data in .txt file and I need to generate easting and northing coordinates of the data and plot it as kinematic curves. How can I read raw GPS data from .txt in MATLAB and plot the kinematics plots of its easting and northing coordinates. My data is in following format with approx 9000 rows.

Time: 0 (secs) Latitude: 43.73361796 (degrees) Longitude: 15.899775390 (degrees)


Time: 3 (secs) Latitude: 43.73352768 (degrees) Longitude: 15.899741860 (degrees)


Time: 5 (secs) Latitude: 43.73355115 (degrees) Longitude: 15.899622800 (degrees)


I am happy to post the little of progress I have made if you needed to see. Thanks.

Upvotes: 0

Views: 356

Answers (1)

Suever
Suever

Reputation: 65430

You can use textscan to read the data into MATLAB.

fid = fopen('filename.data', 'rb');
data = textscan(fid, 'Time: %d (secs) Latitude: %f (degrees) Longitude: %f (degrees)');
fclose(fid);

[times, latitudes, longitudes] = data{:};

If you have the Mapping Toolbox you could use an UTM map axes:

axesm utm

Then plot your coordinates

setm(gca, 'zone', utmzone(latitudes, longitudes))
plotm(latitudes, longitudes);

If you do not have the Mapping Toolbox, you could use this file exchange submission to convert latitude/longitude to UTM.

Upvotes: 1

Related Questions