# gravitysphericalharmonic

Implement spherical harmonic representation of planetary gravity

## Syntax

## Description

### Default Planetary Model

`[`

implements
the mathematical representation of spherical harmonic planetary gravity based on planetary
gravitational potential. This function calculates arrays of `gx`

`gy`

`gz`

]
= gravitysphericalharmonic(`planet_coordinates`

)*N* gravity
values in the *x*-axis, *y*-axis, and
*z*-axis of the Planet-Centered Planet-Fixed coordinates for the
planet. The function performs these calculations using
`planet_coordinates`

, an *M*-by-3 array of
Planet-Centered Planet-Fixed coordinates.

`[`

uses the degree and order that `gx`

`gy`

`gz`

]
= gravitysphericalharmonic(`planet_coordinates`

,`degree`

)`degree`

specifies.

### Specified Planetary Model

`[`

implements the mathematical representation for the planetary model,
`gx`

`gy`

`gz`

]
= gravitysphericalharmonic(`planet_coordinates`

,`model`

)`model`

.

`[`

uses the degree and order that `gx`

`gy`

`gz`

]
= gravitysphericalharmonic(`planet_coordinates`

,`model`

,`degree`

)`degree`

specifies.
`model`

specifies the planetary model.

`[`

uses the specified `gx`

`gy`

`gz`

]
= gravitysphericalharmonic(`planet_coordinates`

,`model`

,`degree`

,`action`

)`action`

when input is out of range.

### Custom Planetary Model

`[`

implements the mathematical
representation for a custom model planet. `gx`

`gy`

`gz`

]
= gravitysphericalharmonic(`planet_coordinates`

,`'Custom'`

,`degree`

,{```
datafile
dfreader
```

},`action`

)`datafile`

defines the
planetary model. `dfreader`

specifies the reader for
`datafile`

.

## Examples

## Input Arguments

## Output Arguments

## Limitations

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

The spherical harmonic gravity model is valid for radial positions greater than the planet equatorial radius. Minor errors might occur for radial positions near or at the planetary surface. The spherical harmonic gravity model is not valid for radial positions less than planetary surface.

## Tips

When inputting a large PCPF array and a high-degree value, you might receive an out-of-memory error. For more information about avoiding out-of-memory errors in the MATLAB environment, see Performance and Memory.

When inputting a large PCPF array, you might receive a maximum matrix size limitation. To determine the largest matrix or array that you can create in the MATLAB environment for your platform, see Performance and Memory.

## References

[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*.
Houston: NASA Lyndon B. Johnson Space Center, February 1993.

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

[3] Defense Mapping Agency.
*Department of Defense World Geodetic System 1984, Its Definition and Relationship
with Local Geodetic Systems*. TR 8350.2, 2nd ed. Fairfax, VA: DMA, September 1,
1991.

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

[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* 106, no. E10 (October 25, 2001): 23359–23376.

[6] Kenyon S., J. Factor, N. Pavlis, and S. Holmes. "Towards the Next Earth Gravitational Model." Paper presented at the 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." Paper presented at the 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." Paper presented at the IAG International Symposium on Gravity, Geoid & Earth Observation, Chania, Greece, June 23–27, 2008.

[9] Förste, C., Flechtner et al,
"A Mean Global Gravity Field Model From the Combination of Satellite Mission and
Altimetry/Gravmetry Surface Data - EIGEN-GL04C." *Geophysical Research
Abstracts* 8, 03462, 2006.

[10] Hill, K. A. "Autonomous Navigation in Libration Point Orbits." PhD diss. University of Colorado, Boulder, 2007.

[11] Colombo, Oscar L.
*Numerical Methods for Harmonic Analysis on the Sphere*. Report no.
310. Columbus: Department of Geodetic Science at Ohio State University, 1981.

[12] Colombo, Oscar L. "The Global Mapping of Gravity with Two Satellites." Netherlands Geodetic Commission 7, no 3, Delft, The Netherlands, 1984., Reports of the Department of Geodetic Science. Report No. 310. Columbus: Ohio State University, March 1981.

[13] Jones, Brandon A. "Efficient Models for the Evaluation and Estimation of the Gravity Field." PhD diss. University of Colorado, Boulder, 2010.

[14] *Report of the IAU/IAG
Working Group on cartographic coordinates and rotational elements:
1991*.

## Version History

**Introduced in R2010a**