The Earth Gravitational Models (EGMs) are geopotential models of the Earth consisting of spherical harmonic coefficients published by the Office of Geomatics at National Geospatial-Intelligence Agency (NGA). EGM96 from 1996 is used as the geoid reference of the World Geodetic System. Three versions of EGM are published: EGM84 with n=m=180, EGM96 with n=m=360, and EGM2008 with n=m=2160. n and m are the degree and orders of harmonic coefficients; the higher they are, the more parameters the models have, and the more precise they are. EGM2008 also contains expansions to n=2190. Developmental versions of EGMs are referred to as PGMs, Preliminary Gravitational Models.
The NGA provides the model in two formats: in a raster image recording the geoid height at each coordinate at a given resolution, or in a format providing the numerical parameters – the coefficients – defining the model.
The first EGM, EGM84, was defined as a part of WGS84. WGS84 combines the old GRS 80 with the then-latest data, namely available Doppler, satellite laser ranging and Very Long Baseline Interferometry (VLBI) observations, and a new least squares method called collocation. It allowed for a model with n=m=180 to be defined, providing a raster for every half degree (30', 30 minute) of latitude and longitude of the world. NIMA also computed and made available 30?×30? mean altimeter derived gravity anomalies from the GEOSAT Geodetic Mission.
EGM96 from 1996 is the result of a collaboration between the National Imagery and Mapping Agency (NIMA), the NASA Goddard Space Flight Center (GSFC), and the Ohio State University. It took advantage of new surface gravity data from many different regions of the globe, including data newly released from the NIMA archives. Major terrestrial gravity acquisitions by NIMA since 1990 include airborne gravity surveys over Greenland and parts of the Arctic and the Antarctic, surveyed by the Naval Research Lab (NRL) and cooperative gravity collection projects, several of which were undertaken with the University of Leeds. These collection efforts have improved the data holdings over many of the world's land areas, including Africa, Canada, parts of South America and Africa, Southeast Asia, Eastern Europe, and the former Soviet Union. In addition, there have been major efforts to improve NIMA's existing 30' mean anomaly database through contributions over various countries in Asia. EGM96 also included altimeter derived anomalies derived from ERS-1 by Kort & Matrikelstyrelsen (KMS), (National Survey and Cadastre, Denmark) over portions of the Arctic, and the Antarctic, as well as the altimeter derived anomalies of Schoene  over the Weddell Sea. The raster from EGM96 is provided at 15'x15' resolution.
EGM96 is a composite solution, consisting of:
The official Earth Gravitational Model EGM2008 has been publicly released by the National Geospatial-Intelligence Agency (NGA) EGM Development Team. Among other new data sources, the GRACE satellite mission provided a very high resolution model of the global gravity. This gravitational model is complete to spherical harmonic degree and order 2159 (block diagonal), and contains additional coefficients extending to degree 2190 and order 2159. It provides a raster of 2.5'x2.5' and an accuracy approaching 10 cm. "Test versions" of EGM2008 includes PGM2004, 2006, and 2007.
getEGMGeoidHeightcan be used to evaluate the geoid height under the EGM96 and EGM2008 models. Additionally, the gravitational potential, acceleration, and gravity gradient (second spatial derivatives of the potential) can be evaluated using the
spherHarmonicEvalfunction, as demonstrated in