egm96geoid

Geoid height from Earth Gravitational Model 1996 (EGM96)

Description

example

N = egm96geoid(lat,lon) returns the height in meters of the geoid at the specified latitude and longitude from the Earth Gravitational Model of 1996 (EGM96). Specify latitude and longitude in degrees.

[N,refvec] = egm96geoid(samplefactor) returns a grid N of geoid heights from EGM96, sampled horizontally and vertically at samplefactor intervals. To return the entire grid of geoid heights, specify samplefactor as 1. The output argument refvec is a referencing vector used to associate each geoid height with a latitude and longitude.

example

[N,refvec] = egm96geoid(samplefactor,latlim,lonlim) returns geoid heights within specified latitude and longitude limits.

Examples

collapse all

Find geoid heights from EGM96 by specifying latitude and longitude values in degrees. The result is returned in meters.

lat = 27.988056;
lon = 86.925278;
N = egm96geoid(lat,lon)
N = -28.7444

Return a grid of geoid heights from EGM96. First, specify vectors of latitude and longitude values. Create matrices that contain copies of the latitude and longitude vectors using ndgrid. Then, call egm96geoid.

lat = linspace(42,48,5);
lon = linspace(90,97,4);
[latM,lonM] = ndgrid(lat,lon);

N = egm96geoid(latM,lonM)
N = 5×4

  -63.0230  -62.8627  -61.6493  -56.2380
  -58.2040  -59.0210  -58.5576  -56.3010
  -59.3020  -57.3704  -54.2663  -50.8500
  -51.2340  -45.7869  -51.3745  -47.9800
  -42.4880  -49.1456  -47.6657  -45.5110

View the full grid of geoid heights from EGM96 within specified latitude and longitude limits.

To return a grid of geoid heights at full resolution, specify the sample factor as 1. Specify the latitude and longitude limits in degrees. Then, return the geoid heights and a referencing vector using egm96geoid.

samplefactor = 1;
latlim = [32 70];
lonlim = [-12 51];
[N,refvec] = egm96geoid(samplefactor,latlim,lonlim);

Plot the geoid heights on a map using the geoshow function.

worldmap(latlim,lonlim)
geoshow(N,refvec,'DisplayType','surface')

Input Arguments

collapse all

Latitude in degrees, specified as a scalar, vector, or matrix. The dimension of lat depends on the dimension of the geoid heights you want to find.

  • To find a single geoid height, specify lat and lon as scalars.

  • To find several geoid heights, specify lat and lon as vectors of the same length.

  • To find a p-by-q grid of geoid heights, specify lat and lon as p-by-q matrices.

Data Types: single | double

Longitude in degrees, specified as a scalar, vector, or matrix. The dimension of lon depends on the dimension of the geoid heights you want to find.

  • To find a single geoid height, specify lat and lon as scalars.

  • To find several geoid heights, specify lat and lon as vectors of the same length.

  • To find a p-by-q grid of geoid heights, specify lat and lon as p-by-q matrices.

Data Types: single | double

Sample factor, specified as a positive integer.

To return the entire grid of geoid heights, specify samplefactor as 1 and omit the latlim and lonlim arguments. At this resolution, N is a 721-by-1441 matrix of geoid heights spaced at 15 minute intervals.

Example: egm96geoid(2) returns a grid of geoid heights spaced at 30 minute intervals.

Data Types: double

Latitude limits, specified as a two-element vector of the form [southernLimit northernLimit]. Specify latitude limits in the range [-90 90].

Example: [50 65]

Data Types: double

Longitude limits, specified as a two-element vector of the form [westernLimit easternLimit]. Specify longitude limits in the range [-180 180] or [0 360].

Example: [170 190] returns data centered on the 180-degree meridian.

Example: [-10 10] returns data centered on the Prime Meridian.

Data Types: double

Output Arguments

collapse all

Geoid height in meters, returned as a scalar, vector, or matrix.

Data Types: double

Referencing vector, returned as a three-element vector of the form [s nlat wlon] with these values:

  • s – Number of geoid height samples per degree

  • nlat – Northernmost latitude in degrees, plus 1/(2*s)

  • wlon – Westernmost longitude in degrees, minus 1/(2*s)

MATLAB® uses refvec to associate each geoid height with a latitude and longitude. Geoid height samples are located along latitude–longitude grid lines, as opposed to between the grid lines. For more information, see Geographic Interpretations of Geolocated Grids.

Data Types: double

More About

collapse all

Earth Gravitational Model of 1996 (EGM96)

The geoid is a gravitationally equipotential surface that approximates the shape of the Earth. You can visualize the geoid as the surface of the ocean without effects such as weather, waves, and land. The Earth Gravitational Model of 1996 (EGM96) measures geoid height with respect to the ellipsoid specified by the World Geodetic System of 1984 (WGS84).

Introduced before R2006a