AGravity:

Path: Orbit/OrbitMechanics

% Compute the gravitational acceleration in spherical coordinates. 

   Acceleration vectors are a [ a(r), a(lambda), a(theta) ].
   The coefficients should be unnormalized.

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

   for k = 1:kMax
     [a, aS, aZ, aT] = AGravity( nZ, nT, r, lambda, theta, s, c, j, mu, a );
   end

   than

   for k = 1:kMax
     [a, aS, aZ, aT] = AGravity( nZ, nT, r, lambda, theta );
   end

   See also AGravityC, PDAL, SCHarm

   Since version 1.
--------------------------------------------------------------------------
   Form:
   [aG, aS, aZ, aT] = AGravity( nZ, nT, r, lambda, theta, s, c, j, mu, a )
--------------------------------------------------------------------------

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

   -------
   Outputs
   -------
   aG           (3,1)   Total gravitational acceleration km/sec^2
   aS           (3,1)   Spherical term                   km/sec^2
   aZ           (3,1)   Zonal term                       km/sec^2
   aT           (3,1)   Tesseral term                    km/sec^2

--------------------------------------------------------------------------

Children:

Math: Analysis/PDAL
Math: Analysis/SCHarm
Orbit: GravityModels/LoadGEM

Back to the Orbit Module page