| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Aerospace Blockset |
| Contents | Index |
| Learn more about Aerospace Blockset |
Environment/Gravity

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.
gravityzonal is implemented using the following planetary parameter values for each planet:
| Planet | Equatorial Radius (Re) in Meters | Gravitational Parameter (GM) in m3/s2 | Zonal Harmonic Coefficients (J Values) |
|---|---|---|---|
| Earth | 6378.1363e3 | 3.986004415e14 | [ 0.0010826269 -0.0000025323 -0.0000016204 ] |
| Jupiter | 71492.e3 | 1.268e17 | [0.01475 0 -0.00058] |
| Mars | 3397.2e3 | 4.305e13 | [ 0.001964 0.000036 ] |
| Mercury | 2439.0e3 | 2.2032e13 | 0.00006 |
| Moon | 1738.0e3 | 4902.799e9 | 0.0002027 |
| Neptune | 24764e3 | 6.809e15 | 0.004 |
| Saturn | 60268.e3 | 3.794e16 | [0.01645 0 -0.001] |
| Uranus | 25559.e3 | 5.794e15 | 0.012 |
| Venus | 6052.0e3 | 3.257e14 | 0.000027 |


Specify the input units:
Units | Position | Equatorial Radius | Gravitational Parameter |
|---|---|---|---|
Metric (MKS) | Meters | Meters | Meters cubed per second squared |
English | Feet | Feet | Feet cubed per second squared |
Specify the degree of harmonic model.
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).
Specify if out-of-range input invokes a warning, error, or no action.
Specify the planetary model. From the list, select Mercury, Venus, Earth, Moon, Mars, Jupiter, Saturn, Uranus, Neptune, or Custom.
Selecting Custom enables you to specify your own planetary model. This option enables the Equatorial radius, Gravitational parameter, and J values parameters.
Selecting Mercury, Venus, Moon, Uranus, or Neptune limits the degree to 2.
Selecting Mars limits the degree to 3.
Specify the planetary equatorial radius in the length units that the Units parameter defines.
Specify the planetary gravitational parameter in the length units cubed per second squared that the Units parameter defines.
Specify a 3-element array that defines the zonal harmonic coefficients.
This block accepts only scalar inputs (m=1).
| Input | Dimension Type | Description |
|---|---|---|
First | m-by-3 matrix | Contains planet-centered planet-fixed coordinates 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. |
| Output | Dimension Type | Description |
|---|---|---|
First | m-by-3 array | Contains gravity values in the x-axis, y-axis and z-axis of the planet-centered planet-fixed coordinates in the selected length units per second squared. |
Vallado, D. A., Fundamentals of Astrodynamics and Applications, McGraw-Hill, New York, 1997.
Fortescue, P., J. Stark, G. Swinerd, (Eds.). Spacecraft Systems Engineering, Third Edition, Wiley & Sons, West Sussex, 2003.
Tewari, A., Atmospheric and Space Flight Dynamics Modeling and Simulation with MATLAB and Simulink, Birkhäuser, Boston, 2007.
![]() | World Magnetic Model 2005 | Aerospace Units | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |