Home > atmlab > geodetic > ellipsoid2d.m

ellipsoid2d

PURPOSE ^

ELLIPSOID2D Approximate ellipsoid for 2D calculations

SYNOPSIS ^

function ellipsoid = ellipsoid2d(ellipsoid,orbitinc)

DESCRIPTION ^

 ELLIPSOID2D   Approximate ellipsoid for 2D calculations

    Determines an approximate reference ellipsoid following an orbit track.
    The new ellipsoid is determined simply, by determining the radius at the
    maximum latitude and from this value calculate a new eccentricity.
    The orbit is specified by giving the orbit inclination, that is
    normally a value around 100 deg for polar sun-synchronous orbits.

 FORMAT   r = ellipsoid2d( ellipsoid, orbitinc )
    
 OUT   ellipsoid  Modified ellipsoid vector.
 IN    ellipsoid  Model ellipsoid as returned by *ellipsoidmodels*.
       orbitinc   Orbit inclination. See above.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

ellipsoid2d.m

SOURCE CODE ^

0001 % ELLIPSOID2D   Approximate ellipsoid for 2D calculations
0002 %
0003 %    Determines an approximate reference ellipsoid following an orbit track.
0004 %    The new ellipsoid is determined simply, by determining the radius at the
0005 %    maximum latitude and from this value calculate a new eccentricity.
0006 %    The orbit is specified by giving the orbit inclination, that is
0007 %    normally a value around 100 deg for polar sun-synchronous orbits.
0008 %
0009 % FORMAT   r = ellipsoid2d( ellipsoid, orbitinc )
0010 %
0011 % OUT   ellipsoid  Modified ellipsoid vector.
0012 % IN    ellipsoid  Model ellipsoid as returned by *ellipsoidmodels*.
0013 %       orbitinc   Orbit inclination. See above.
0014 
0015 % 2012-02-06   Created by Patrick Eriksson.
0016 
0017 
0018 function ellipsoid = ellipsoid2d(ellipsoid,orbitinc)
0019 
0020 % Check input                                                          %&%
0021 rqre_datatype( ellipsoid, @isvector );                                 %&%
0022 if length(ellipsoid) ~= 2                                              %&%
0023  error( 'The argument *ellipsoid* must be a vector of length 2' );     %&%
0024 end                                                                    %&%
0025 rqre_in_range( ellipsoid(2), 0, 1, 'element 2 of ellipsoid' );         %&%
0026 rqre_datatype( orbitinc, @isscalar );                                  %&%
0027 rqre_in_range( orbitinc, 0, 180, 'orbitinc' );                         %&%
0028 
0029 
0030 % Radius at max latitude
0031 %
0032 rp = ellipsoidradii( ellipsoid, orbitinc );
0033 
0034 
0035 % Calculate new eccentricity
0036 %
0037 ellipsoid(2) = sqrt( 1 - (rp /ellipsoid(1))^2 );

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