Rank: 637 based on 214 downloads (last 30 days) and 1 file submitted
photo

Mike Craymer

E-mail
Lat/Long
45.400288, -75.704575

Personal Profile:
Professional Interests:
geodesy, earth sciences, astronomy

 

Watch this Author's files

 

Files Posted by Mike
Updated   File Tags Downloads
(last 30 days)
Comments Rating
13 Feb 2013 Geodetic Toolbox Toolbox for angle, coordinate and date conversions and transformations. Version 2.97. Author: Mike Craymer geodesy, geodetic, angle, date, julian, gps week 214 38
  • 4.8
4.8 | 15 ratings
Comments and Ratings by Mike View all
Updated File Comments Rating
24 Sep 2014 Geodetic Toolbox Toolbox for angle, coordinate and date conversions and transformations. Version 2.97. Author: Mike Craymer

giometar,
Unless otherwise stated in the help messages, you cannot use files of data as input to my toolbox functions. You must first read the data into Matlab variables and then use the variables as input to the functions.

In the example you give, if n.txt, e.txt and u.txt are text files containing local geodetic north, east and up coordinates, respectively, try using the following:

n=load('n.txt');
e=load('e.txt');
u=load('u.txt');
lat=0.76; % radians
lon=0.36; % radians
[dX,dY,dZ]=lg2ct(n,e,u,lat,lon);

Feel free to email me at mike@craymer.com if you need further help using my toolbox.

28 Aug 2014 Geodetic Toolbox Toolbox for angle, coordinate and date conversions and transformations. Version 2.97. Author: Mike Craymer

Christopher,
Please see my comment dated 27 Jul 2013 below where I reported the correction to the error in ell2utm. That comment also reports a correction to an error in utm2ell.

All,
Before reporting an error, please have a look at my comments for possible corrections. I was planning to post an update to the toolbox this summer with these and other fixes but, alas, have not been able to find the time. Hopefully in the next few weeks. I apologize for the delay.

12 Apr 2014 Geodetic Toolbox Toolbox for angle, coordinate and date conversions and transformations. Version 2.97. Author: Mike Craymer

Many thanks to Kyle for reporting the error in utm2ell for points in the southern hemisphere. The function will be fixed in the next release following his suggestion to use negative zone values for such points. For now users should subtract 1e7 m from southern hemisphere northings.

03 Mar 2014 Geodetic Toolbox Toolbox for angle, coordinate and date conversions and transformations. Version 2.97. Author: Mike Craymer

Another error was discovered in the ell2utm function. The test for UTM zones less than zero should be a test for zones less than OR EQUAL TO zero. Replace

Zone=Zone+(Zone<0)*60-(Zone>60)*60;

with

Zone=Zone+(Zone<=0)*60-(Zone>60)*60;

The error occurs only for zone 60 (longitudes 174 - <180 east).

Thanks to Mohammad Ali Goudarzi for pointing out the error. I will post a new version of the toolbox with this correction and the ones given in my 27 Jul 2013 comment as soon as possible.

03 Mar 2014 Geodetic Toolbox Toolbox for angle, coordinate and date conversions and transformations. Version 2.97. Author: Mike Craymer

Dear Dmitry,
Sorry I didn't see your post sooner. Here is an example of converting geocentric Cartesian coordinates to ellipsoidal with xyz2ell3 and then back again with ell2xyz:

>> [X,Y,Z]=ell2xyz(deg2rad(45),deg2rad(-79),300);
>> [lat3,lon3,h3]=xyz2ell3(X,Y,Z);
>> [X3,Y3,Z3]=ell2xyz(lat3,lon3,h3);
>> [X3-X;Y3-Y;Z3-Z]

ans =

1.0e-06 *

-0.1377
0.7087
0.7227

As you can see, the differences are less than a micron.

Comments and Ratings on Mike's Files View all
Updated File Comment by Comments Rating
24 Sep 2014 Geodetic Toolbox Toolbox for angle, coordinate and date conversions and transformations. Version 2.97. Author: Mike Craymer Craymer, Mike

giometar,
Unless otherwise stated in the help messages, you cannot use files of data as input to my toolbox functions. You must first read the data into Matlab variables and then use the variables as input to the functions.

In the example you give, if n.txt, e.txt and u.txt are text files containing local geodetic north, east and up coordinates, respectively, try using the following:

n=load('n.txt');
e=load('e.txt');
u=load('u.txt');
lat=0.76; % radians
lon=0.36; % radians
[dX,dY,dZ]=lg2ct(n,e,u,lat,lon);

Feel free to email me at mike@craymer.com if you need further help using my toolbox.

22 Sep 2014 Geodetic Toolbox Toolbox for angle, coordinate and date conversions and transformations. Version 2.97. Author: Mike Craymer giometar

>> [dx,dy,dz]=lg2ct('n.txt','e.txt','u.txt',0.76,0.36)
Error using .*
Matrix dimensions must agree.

Error in lg2ct (line 46)
dX=sum(RR'.*[dx dy dz],2);

28 Aug 2014 Geodetic Toolbox Toolbox for angle, coordinate and date conversions and transformations. Version 2.97. Author: Mike Craymer Craymer, Mike

Christopher,
Please see my comment dated 27 Jul 2013 below where I reported the correction to the error in ell2utm. That comment also reports a correction to an error in utm2ell.

All,
Before reporting an error, please have a look at my comments for possible corrections. I was planning to post an update to the toolbox this summer with these and other fixes but, alas, have not been able to find the time. Hopefully in the next few weeks. I apologize for the delay.

27 Aug 2014 Geodetic Toolbox Toolbox for angle, coordinate and date conversions and transformations. Version 2.97. Author: Mike Craymer Christopher

In ell2utm.m, should
E2=lam.^3.*cos(lat).^3/6*(1-t.^2+h2);
be changed to:
E2=lam.^3.*cos(lat).^3/6.*(1-t.^2+h2);
?

I got an error as follows:
>> ell2utm(lon,lat)
Error using *
Inner matrix dimensions must agree.
Error in ell2utm (line 97)
E2=lam.^3.*cos(lat).^3/6*(1-t.^2+h2);

27 Aug 2014 Geodetic Toolbox Toolbox for angle, coordinate and date conversions and transformations. Version 2.97. Author: Mike Craymer Christopher

In ell2utm.m, should
E2=lam.^3.*cos(lat).^3/6*(1-t.^2+h2);
be changed to:
E2=lam.^3.*cos(lat).^3/6.*(1-t.^2+h2);
?

I got an error as follows:
>> ell2utm(lon,lat)
Error using *
Inner matrix dimensions must agree.
Error in ell2utm (line 97)
E2=lam.^3.*cos(lat).^3/6*(1-t.^2+h2);

Contact us