Documentation Center

  • Trial Software
  • Product Updates

Spherical Harmonic Gravity Model

Implement spherical harmonic representation of planetary gravity




The Spherical Harmonic Gravity Model block implements the mathematical representation of spherical harmonic planetary gravity based on planetary gravitational potential. It provides a convenient way to describe a planet gravitational field outside of its surface in spherical harmonic expansion.

You can use spherical harmonics to modify the magnitude and direction of spherical gravity (-GM/r2). The most significant or largest spherical harmonic term is the second degree zonal harmonic, J2, which accounts for oblateness of a planet.

Use this block if you want more accurate gravity values than spherical gravity models. For example, nonatmospheric flight applications might require higher accuracy.

Dialog Box


Specifies the parameter and output units:



Metric (MKS)





Specify the degree of harmonic model. Recommended degrees are:

Planet ModelDegree













Action for out of range input

Specify if out-of-range input invokes a warning, error, or no action.

Planet model

Specify the planetary model. From the list, select:

Planet ModelNotes

Earth — Is the latest Earth spherical harmonic gravitational model from National Geospatial-Intelligence Agency (NGA). This block provides the WGS-84 version of this gravitational model. You can use the EGM96 planetary model if you need to use the older standard for Earth.


Moon — Is best for lunar orbit determination based upon computational time required to compute orbits. This planet model was created in approximately the same year as LP165P with similar data.


Moon — Is best for extended lunar mission orbit accuracy. This planet model was created in approximately the same year as LP165P with similar data.




Enables you to specify your own planetary model. This option enables the Planet mat-file parameter.


Earth — Supports the gravity field model, EIGEN-GL04C ( This model is an upgrade to EIGEN-CG03C.

When defining your own planetary model, the Degree parameter is limited to the maximum value for int16. When inputting a large degree, you might receive an out-of-memory error. For more information about avoiding out-of-memory errors in the MATLAB® environment, see Memory Usage.

Planet mat-file

Specify a MAT-file that contains definitions for a custom planetary model. The aerogmm2b.mat file in the Aerospace Toolbox is the default MAT-file for a custom planetary model.

This file must contain:


Scalar of planet equatorial radius in meters (m).


Scalar of planetary gravitational parameter in meters cubed per second squared (m3/s2)


Scalar of maximum degree.


(degree+1)-by-(degree+1) matrix containing normalized spherical harmonic coefficients matrix, C.


(degree+1)-by-(degree+1) matrix containing normalized spherical harmonic coefficients matrix, S.

When using a large value for Degree, you might receive an out-of-memory error. For more information about avoiding out-of-memory errors in the MATLAB environment, see Memory Usage.


[1] Gottlieb, R. G., "Fast Gravity, Gravity Partials, Normalized Gravity, Gravity Gradient Torque and Magnetic Field: Derivation, Code and Data," Technical Report NASA Contractor Report 188243, NASA Lyndon B. Johnson Space Center, Houston, Texas, February 1993.

[2] Vallado, D. A., Fundamentals of Astrodynamics and Applications, McGraw-Hill, New York, 1997.

[3] "NIMA TR8350.2: Department of Defense World Geodetic System 1984, Its Definition and Relationship with Local Geodetic Systems".

[4] Konopliv, A. S., S. W. Asmar, E. Carranza, W. L. Sjogen, D. N. Yuan., "Recent Gravity Models as a Result of the Lunar Prospector Mission, Icarus", Vol. 150, no. 1, pp 1–18, 2001.

[5] Lemoine, F. G., D. E. Smith, D.D. Rowlands, M.T. Zuber, G. A. Neumann, and D. S. Chinn, "An improved solution of the gravity field of Mars (GMM-2B) from Mars Global Surveyor", Journal Of Geophysical Research, Vol. 106, No. E10, pp 23359-23376, October 25, 2001.

[6] Kenyon S., J. Factor, N. Pavlis, and S. Holmes, "Towards the Next Earth Gravitational Model", Society of Exploration Geophysicists 77th Annual Meeting, San Antonio, Texas, September 23–28, 2007.

[7] Pavlis, N.K., S.A. Holmes, S.C. Kenyon, and J.K. Factor, "An Earth Gravitational Model to Degree 2160: EGM2008", presented at the 2008 General Assembly of the European Geosciences Union, Vienna, Austria, April 13–18, 2008.

[8] Grueber, T., and A. Köhl, "Validation of the EGM2008 Gravity Field with GPS-Leveling and Oceanographic Analyses", presented at the IAG International Symposium on Gravity, Geoid & Earth Observation 2008, Chania, Greece, June 23–27, 2008.

[9] Förste, C., Flechtner, F., Schmidt, R., König, R., Meyer, U., Stubenvoll, R., Rothacher, M., Barthelmes, F., Neumayer, H., Biancale, R., Bruinsma, S., Lemoine, J.M., Loyer, S., "A Mean Global Gravity Field Model From the Combination of Satellite Mission and Altimetry/Gravmetry Surface Data - EIGEN-GL04C", Geophysical Research Abstracts, Vol. 8, 03462, 2006.

Was this topic helpful?