UGravity:

Path: Orbit/OrbitMechanics

% Compute the earth's gravitational potential. 
 r must be a scalar but theta and phi may be arrays. If you want to call this
 routine multiple times it is faster to do

   [s, c, j, mu, a] = LoadGEM( 1 )

   for k = 1:kMax
     [u, uS, uZ, uT] = UGravity( nZ, nT, r, lambda, theta, s, c, j, mu, a );
   end

 than

   for k = 1:kMax
     [u, uS, uZ, uT] = UGravity( nZ, nT, r, lambda, theta );
   end

--------------------------------------------------------------------------
   Form:
   [u, uS, uZ, uT] = UGravity( nZ, nT, r, lambda, theta, s, c, j, mu, a )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   nZ                   Highest zonal harmonic (m = 0) 
   nT                   Highest sectorial and tesseral harmonic
   r                    Radius
   lambda        (j)    Equatorial angle
   theta         (i)    Angle from pole
   s           (36,36)  S terms
   c           (36,36)  C terms
   j              (36)  m = 0 terms
   mu                   Spherical gravitational potential
   a                    Earth radius

   -------
   Outputs
   -------
   u             (i,j)  Total gravitational potential
   uS                   Spherical term
   uZ            (i)    Zonal terms
   uT            (i,j)  Tesseral and sectorial terms

--------------------------------------------------------------------------
	Reference: Seidelmann, P.K, (ed) (1992). Explanatory Supplement to the
              Astronomical Almanac. University Science Books, Mill Valley, CA.
              p. 226.
--------------------------------------------------------------------------

Children:

Common: Graphics/Mesh2
Math: Analysis/PAL
Math: Analysis/SCHarm
Orbit: GravityModels/LoadGEM

Back to the Orbit Module page