4.66667

4.7 | 6 ratings Rate this file 631 downloads (last 30 days) File Size: 32.34 KB File ID: #15285

Geodetic Toolbox

by Mike Craymer

 

13 Jun 2007 (Updated 13 Jun 2007)

Toolbox for angle conversions, coordinate conversions, coordinate transformations, date conversions,

Download Now | Watch this File

File Information
Description

A collection of geodetic functions that solve a variety of problems in geodesy. Supports a wide range of common and user-defined reference ellipsoids. Most functions are vectorized. Functions include:  
 
Angle Conversions  
  deg2rad - Degrees to radians  
  dms2deg - Degrees,minutes,seconds to degrees  
  dms2rad - Degrees,minutes,seconds to radians  
  rad2deg - Radians to degrees  
  rad2dms - Radians to degrees,minutes,seconds  
  rad2sec - Radians to seconds  
  sec2rad - Seconds to radians  
   
Coordinate Conversions  
  ell2utm - Ellipsoidal (lat,long) to UTM (N,E) coordinates  
  ell2xyz - Ellipsoidal (lat,long) to Cartesian (x,y,z) coodinates  
  sph2xyz - Shperical (az,va,dist) to Cartesian (x,y,z) coordinates  
  xyz2sph - Cartesian (x,y,z) to spherical (az,va,dist) coordinates  
  xyz2ell - Cartesian (x,y,z) to ellipsoidal (lat,long,ht) coordinates  
  xyz2ell2 - xyz2ell with Bowring height formula  
  xyz2ell3 - xyz2ell using complete Bowring version  
   
Coordinate Transformations  
  refell - Reference ellipsoid definition  
  ellradii - Various radii of curvature  
  cct2clg - Conventional terrestrial to local geodetic cov. matrix  
  clg2cct - Local geodetic to conventional terrestrial cov. matrix  
  ct2lg - Conventional terrestrial (ECEF) to local geodetic (NEU)  
  dg2lg - Differences in Geodetic (lat,lon) to local geodetic (NEU)  
  lg2ct - Local geodetic (NEU) to conventional terrestrial (ECEF)  
  lg2dg - Local geodetic (NEU) to differences in geodetic (lat,lon)  
  direct - Direct geodetic problem (X1,Y1,Z1 + Az,VA,Dist to X2,Y2,Z2)  
  inverse - Inverse geodetic problem (X1,Y1,Z1 + X2,Y2,Z2 to Az,VA,Dist)  
  simil - Similarity transformation (translation,rotation,scale change)  
   
Date Conversions  
  cal2jd - Calendar date to Julian date  
  dates - Converts between different date formats  
  doy2jd - Year and day of year to Julian date  
  gps2jd - GPS week & seconds of week to Julian date  
  jd2cal - Julian date to calenar date  
  jd2dow - Julian date to day of week  
  jd2doy - Julian date to year & day of year  
  jd2gps - Julian date to GPS week & seconds of week  
  jd2yr - Julian date to year & decimal year  
  yr2jd - Year & decimal year to Julian date  
   
Error Ellipses  
  errell2 - Computes error ellipse semi-axes and azimuth  
  errell3 - Computes error ellipsoid semi-axes, azimuths, inclinations  
  plterrel - Plots error ellipse for covariance matrix  
   
Miscellaneous  
  findfixed - Finds fixed station based on 3D covariance matrix  
  pltnet - Plots network of points with labels  
   
Example Scripts  
  DirInv - Simple partial GUI script for direct and inverse problems  
  DirProb - Example of direct problem  
  Dist3D - Example to compute incremental 3D distances between points.  
  InvProb - Example of inverse problem  
  PltNetEl - Example plot of network error ellipses  
  ToUTM - Example of conversion from latitude,longitude to UTM  
 
Most recent version can be found at <ftp://geod.nrcan.gc.ca/pub/GSD/craymer/software/matlab/geodetic/>.

Acknowledgements
This submission has inspired the following:
, Equinoxes and Solstices
MATLAB release MATLAB 7.3 (R2006b)
Zip File Content  
Other Files
Contents.m,
DirInv.m,
DirProb.m,
Dist3D.m,
InvProb.m,
PltNetEl.m,
ToUTM.m,
cal2jd.m,
cct2clg.m,
clg2cct.m,
ct2lg.m,
dates.m,
dates_old.m,
deg2rad.m,
dg2lg.m,
direct.m,
dms2deg.m,
dms2rad.m,
doy2jd.m,
ell2utm.m,
ell2xyz.m,
ellradii.m,
errell2.m,
errell3.m,
findfixed.m,
gps2jd.m,
inverse.m,
jd2cal.m,
jd2dow.m,
jd2doy.m,
jd2gps.m,
jd2yr.m,
lg2ct.m,
lg2dg.m,
plterrel.m,
pltmap.m,
pltnet.m,
rad2deg.m,
rad2dms.m,
rad2sec.m,
refell.m,
rotct2lg.m,
rotlg2ct.m,
sec2rad.m,
simil.m,
sph2xyz.m,
txyz2ell.m,
xyz2ell.m,
xyz2ell2.m,
xyz2ell3.m,
xyz2sph.m,
yr2jd.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (7)
15 Jun 2007 John D'Errico This seems pretty good from what I checked. There are many conversions in here.  
 
A couple of minor points. I notice that there is no error checking. For example, in ellradii one must provide an axis length and eccentricity (squared). But there are no checks on the proper number of parameters or even on the sign of the eccentricity.  
 
In dms2deg, I noticed one interesting feature. Converting from 32 degrees, 12 minutes, -3 seconds, results in a degree prediction of:  
 
dms2deg([32 12 -3])  
ans =  
      -32.201  
 
Overall, its still pretty good.
28 Jun 2007 Nice Work Nice work
05 Oct 2007 Ali Ebrahimi  
25 Feb 2008 Jagkrich A.warangkul Thanks
01 Mar 2008 Ray Borough Very Useful
09 Jul 2008 Gene Newton Thank you.
11 Sep 2008 jaime torres gracias
Please login to add a comment or rating.

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com