MATLAB: Latitude and Longitude Data to Universal Transverse Mercator (UTM)

ll2utm

Hi,
How can i convert this spreadsheet with xy gps coordinates (Latitude and Longitude) to Universal Transverse Mercator (UTM), in meters?

Best Answer

Matlab has his own functions to deal with it.
First you need to get the utm zone from the coordinates
p1 = [lat,lon];
z1 = utmzone(p1)
Then you must get the geoid of this zone and construct the projection structcture using the following functions
[ellipsoid,estr] = utmgeoid(z1);
utmstruct = defaultm('utm');
utmstruct.zone = z1;
utmstruct.geoid = ellipsoid;
utmstruct = defaultm(utmstruct);
Finally you use mfwdtran to convert coordinates
[x,y] = mfwdtran(utmstruct,lat,lon)