Main Content

Zonal Harmonic Gravity Model

Calculate zonal harmonic representation of planetary gravity

  • Library:
  • Aerospace Blockset / Environment / Gravity

  • Zonal Harmonic Gravity Model block

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.

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: '6378136.3'

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: '398600441500000'

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.0826269e-03 -2.5323000e-06 -1.6204000e-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.1363e33.986004415e14[ 0.0010826269 -0.0000025323 -0.0000016204 ]
Jupiter71492e31.268e17[0.01475 0 -0.00058]
Mars3397.2e34.305e13 [ 0.001964 0.000036 ]
Mercury2439.0e3 2.2032e130.00006
Moon1738.0e3 4902.799e90.0002027
Neptune24764e3 6.809e150.004
Saturn60268e3 3.794e16 [0.01645 0 -0.001]
Uranus25559e35.794e15 0.012
Venus6052.0e3 3.257e140.000027

References

[1] Vallado, David, Fundamentals of Astrodynamics and Applications. New York: McGraw-Hill, 1997.

[2] Fortescue, P., J. Stark, G. Swinerd, eds.. Spacecraft Systems Engineering, 3d ed. West Sussex: Wiley & Sons, 2003.

[3] Tewari, A. Boston: Atmospheric and Space Flight Dynamics Modeling and Simulation with MATLAB and Simulink. Boston: Birkhäuser, 2007.

Extended Capabilities

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

Introduced in R2009b