Contenido principal

Zonal Harmonic Gravity Model

R2026b

Calculate zonal harmonic representation of planetary gravity

  • Zonal Harmonic Gravity Model block

Libraries:
Aerospace Blockset / Environment / Gravity

Description

The Zonal Harmonic Gravity Model block calculates the zonal harmonic representation of planetary gravity at a specific location based on planetary gravitational potential. This block provides a convenient way to describe the gravitational field of a planet outside its surface.

By default, the block uses the fourth order zonal coefficient for Earth to calculate the zonal harmonic gravity. It also allows you to specify the second or third zonal coefficient.

For information on the planetary parameter values for each planet in the block implementation, see Algorithms.

Examples

Limitations

The block excludes the centrifugal effects of planetary rotation and the effects of a precessing reference frame.

Ports

Input

expand all

Planet-centered planet-fixed coordinates, specified as an m-by-3 matrix, from the center of the planet in the selected length units. If Planet model has a value of Earth, this matrix contains Earth-centered Earth-fixed (ECEF) coordinates.

Data Types: double

Output

expand all

Gravity values, returned as an m-by-3 array, in the x-axis, y-axis and z-axis of the planet-centered planet-fixed coordinates, in the selected length units per second squared.

Data Types: double

Parameters

expand all

Input units, specified as:

Units

Position

Equatorial Radius

Gravitational Parameter

Metric (MKS)

Meters

Meters

Meters cubed per second squared

English

Feet

Feet

Feet cubed per second squared

Programmatic Use

Block Parameter: units
Type: character vector
Values: 'Metric (MKS)' | 'English'
Default: 'Metric (MKS)'

Degree of harmonic model, specified as.

  • 2 — Second degree, J2. Most significant or largest spherical harmonic term, which accounts for the oblateness of a planet.

  • 3 — Third degree, J3.

  • 4 — Fourth degree, J4 (default).

Programmatic Use

Block Parameter: degree
Type: character vector
Values: '2' | '3' | '4'
Default: '4'

Out-of-range input behavior, specified as:

ValueDescription

None

No action.

Warning

Warning in the Diagnostic Viewer, model simulation continues.

Error

MATLAB® returns an exception, model simulation stops.

Programmatic Use

Block Parameter: action
Type: character vector
Values: 'None' | 'Warning' | 'Error'
Default: 'Warning'

Planetary model, specified as Mercury, Venus, Earth, Moon, Mars, Jupiter, Saturn, Uranus, Neptune, or Custom.

Selecting Custom enables you to specify your own planetary model.

  • Selecting Mercury, Venus, Moon, Uranus, or Neptune limits the degree to 2.

  • Selecting Mars limits the degree to 3.

Dependencies

Selecting Custom enables the Equatorial radius, Gravitational parameter and J values rate parameters.

Programmatic Use

Block Parameter: ptype
Type: character vector
Values: 'Mercury' | 'Venus' | 'Earth' | 'Moon' | 'Mars' | 'Jupiter' | 'Saturn' | 'Uranus' | 'Neptune' | 'Custom'
Default: 'Earth'

Planetary equatorial radius, specified as a scalar, in the length units that the Units parameter defines.

Dependencies

To enable this parameter, set Planet model to Custom.

Programmatic Use

Block Parameter: R
Type: character vector
Values: scalar
Default: '6378137'

Planetary gravitational parameter, specified as a scalar, in the length units cubed per second squared that the Units parameter defines.

Dependencies

To enable this parameter, set Planet model to Custom.

Programmatic Use

Block Parameter: GM
Type: character vector
Values: scalar
Default: '398600441800000'

Zonal harmonic coefficient, specified as a 3-element array.

Dependencies

To enable this parameter, set Planet model to Custom.

Programmatic Use

Block Parameter: jvalue
Type: character vector
Values: scalar
Default: '[1.08262617385222e-03 -2.53241051856772e-06 -1.61989759991697e-06]'

Algorithms

This block is implemented using the following planetary parameter values for each planet:

PlanetEquatorial Radius (Re) in Meters Gravitational Parameter (GM) in m 3 /s 2 Zonal Harmonic Coefficients
(J Values)
Earth6378.137e33.986004418e14[ 1.08262617385222e-3 -2.53241051856772e-6 -1.61989759991697e-6 ]
Jupiter7.1492e71.267127678577960e17[14736e-6 0 -0.00058]
Mars3.3962e64.2828314258067e13[ 1960.45e-6 0.000036 ]
Mercury2.4397e62.20320804864179e1350.3e-6
Moon1.7381e64.902801076e12202.7e-6
Neptune2.4764e76.836534063879261e153411e-6
Saturn6.0268e73.794062606113729e16[16298e-6 0 -0.001]
Uranus2.5559e75.794549007071873e153343.43e-6
Venus6.0518e63.248585988264598e144.458e-6

References

[1] NASA. "Planetary Fact Sheet." NASA National Space Science Data Center. Accessed June 30, 2026. https://nssdc.gsfc.nasa.gov/planetary/factsheet/.

[2] National Geospatial-Intelligence Agency. World Geodetic System 1984: Its Definition and Relationships with Local Geodetic Systems. Version 1.0.0. Department of Defense, July 8, 2014.

[3] Pavlis, N. K., S. A. Holmes, S. C. Kenyon, and J. K. Factor. "The Development and Evaluation of the Earth Gravitational Model 2008 (EGM2008)." Journal of Geophysical Research 117, B04406 (2012). doi:10.1029/2011JB008916.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2009b

expand all