Home > atmlab > geodetic > ellipsoidmodels.m

ellipsoidmodels

PURPOSE ^

ELLIPSOIDMODELS Data for different reference ellipsoids

SYNOPSIS ^

function ellipsoid = ellipsoidmodels( model )

DESCRIPTION ^

 ELLIPSOIDMODELS   Data for different reference ellipsoids

    Returns data for a number of geodetic reference ellipsoids. The
    following models are covered:
       'SphericalEarth'     (radius set as constants('EARTH_RADIUS'))
       'WGS84'
       'SphericalVenus'     (radius same as used in ARTS)
       'SphericalMars'      (radius same as used in ARTS)
       'SphericalJupiter'   (radius same as used in ARTS)

    The reference ellipsoid is returned as [equatorial radius; eccentricity].

 FORMAT   ellipsoid = ellipsoidmodels( [model] ) 
        
 OUT   ellipsoid  Model ellipsoid.
 OPT   model      Reference ellipsoid model. Default is 'WGS84'. Upper- or
                  lower case letters do not matter.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

ellipsoidmodels.m

SOURCE CODE ^

0001 % ELLIPSOIDMODELS   Data for different reference ellipsoids
0002 %
0003 %    Returns data for a number of geodetic reference ellipsoids. The
0004 %    following models are covered:
0005 %       'SphericalEarth'     (radius set as constants('EARTH_RADIUS'))
0006 %       'WGS84'
0007 %       'SphericalVenus'     (radius same as used in ARTS)
0008 %       'SphericalMars'      (radius same as used in ARTS)
0009 %       'SphericalJupiter'   (radius same as used in ARTS)
0010 %
0011 %    The reference ellipsoid is returned as [equatorial radius; eccentricity].
0012 %
0013 % FORMAT   ellipsoid = ellipsoidmodels( [model] )
0014 %
0015 % OUT   ellipsoid  Model ellipsoid.
0016 % OPT   model      Reference ellipsoid model. Default is 'WGS84'. Upper- or
0017 %                  lower case letters do not matter.
0018 
0019 % 2011-11-14   Created by Patrick Eriksson.
0020 
0021 
0022 function ellipsoid = ellipsoidmodels( model ) 
0023   
0024 if nargin == 0
0025   model = 'wgs84';
0026 end
0027 
0028 
0029 switch lower(model)
0030   
0031  case 'sphericalearth'
0032   ellipsoid = [ constants('EARTH_RADIUS') 0 ]';
0033   
0034  case 'wgs84'
0035   % e calculated as:
0036   % f=1/298.257223563;
0037   % e=sqrt(f*(2-f)) ];
0038   ellipsoid = [ 6378137, 0.081819190842621 ]'; 
0039 
0040  case 'sphericalvenus'
0041   ellipsoid = [ 6051.8e3 0 ]';
0042  
0043  case 'sphericalmars'
0044   ellipsoid = [ 3389.5e3 0 ]';
0045 
0046  case 'sphericaljupiter'
0047   ellipsoid = [ 69911e3 0 ]';
0048   
0049  otherwise
0050   error( 'Unknown selection of *model*.' );
0051   
0052 end
0053 
0054       
0055

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005