Search:

GRAVITY(1) GeographicLib Utilities GRAVITY(1)## NAME

Gravity -- compute the earth's gravity field## SYNOPSIS

Gravity[-nname] [-ddir] [-G|-D|-A|-H] [-clath] [-w] [-pprec] [-v] [--comment-delimitercommentdelim] [--version|-h|--help] [--input-fileinfile|--input-stringinstring] [--line-separatorlinesep] [--output-fileoutfile]## DESCRIPTION

Gravityreads in positions on standard input and prints out the gravitational field on standard output. The input line is of the formlatlonh.latandlonare the latitude and longitude expressed as decimal degrees or degrees, minutes, and seconds; for details on the allowed formats for latitude and longitude, see the "GEOGRAPHIC COORDINATES" section ofGeoConvert(1).his the height above the ellipsoid in meters; this quantity is optional and defaults to 0. Alternatively, the gravity field can be computed at various points on a circle of latitude (constantlatandh) via the-coption; in this case only the longitude should be given on the input lines. The quantities printed out are governed by the-G(default),-D,-A, or-Hoptions. All the supported gravity models, except for grs80, use WGS84 as the reference ellipsoida= 6378137 m,f= 1/298.257223563,omega= 7292115e-11 rad/s, andGM= 3986004.418e8 m^3/s^2.## OPTIONS

-nuse gravity field modelnameinstead of the default "egm96". See "MODELS".-dread gravity models fromdirinstead of the default. See "MODELS".-Gcompute the acceleration due to gravity (including the centrifugal acceleration due the the earth's rotation)g. The output consists ofgxgygz(all in m/s^2), where thex,y, andzcomponents are in easterly, northerly, and up directions, respectively. Usuallygzis negative.-Dcompute the gravity disturbancedelta=g-gamma, wheregammais the "normal" gravity due to the reference ellipsoid . The output consists ofdeltaxdeltaydeltaz(all in mGal, 1 mGal = 10^-5 m/s^2), where thex,y, andzcomponents are in easterly, northerly, and up directions, respectively. Note thatdeltax=gx, becausegammax= 0.-Acomputes the gravitational anomaly. The output consists of 3 itemsDg01xieta, whereDg01is in mGal (1 mGal = 10^-5 m/s^2) andxiandetaare in arcseconds. The gravitational anomaly compares the gravitational fieldgatPwith the normal gravitygammaatQwhere thePis vertically aboveQand the gravitational potential atPequals the normal potential atQ.Dg01gives the difference in the magnitudes of these two vectors andxiandetagive the difference in their directions (as northerly and easterly components). The calculation uses a spherical approximation to match the results of the NGA's synthesis programs.-Hcompute the height of the geoid above the reference ellipsoid (in meters). In this case,hshould be zero. The results accurately match the results of the NGA's synthesis programs.GeoidEval(1) can compute geoid heights much more quickly by interpolating on a grid of precomputed results; however the results fromGeoidEval(1) are only accurate to a few millimeters.-cevaluate the field on a circle of latitude given bylatandhinstead of reading these quantities from the input lines. In this case,Gravitycan calculate the field considerably more quickly. If geoid heights are being computed (the-Hoption), thenhmust be zero.-won input and output, longitude precedes latitude (except that on input this can be overridden by a hemisphere designator,N,S,E,W).-pset the output precision toprec. By defaultprecis 5 for acceleration due to gravity, 3 for the gravity disturbance and anomaly, and 4 for the geoid height.-vprint information about the gravity model on standard error before processing the input.--comment-delimiterset the comment delimiter tocommentdelim(e.g., "#" or "//"). If set, the input lines will be scanned for this delimiter and, if found, the delimiter and the rest of the line will be removed prior to processing and subsequently appended to the output line (separated by a space).--versionprint version and exit.-hprint usage, the default gravity path and name, and exit.--helpprint full documentation and exit.--input-fileread input from the fileinfileinstead of from standard input; a file name of "-" stands for standard input.--input-stringread input from the stringinstringinstead of from standard input. All occurrences of the line separator character (default is a semicolon) ininstringare converted to newlines before the reading begins.--line-separatorset the line separator character tolinesep. By default this is a semicolon.--output-filewrite output to the fileoutfileinstead of to standard output; a file name of "-" stands for standard output.## MODELS

Gravitycomputes the gravity field using one of the following models egm84, earth gravity model 1984. See http://earth-info.nga.mil/GandG/wgs84/gravitymod/wgs84_180/wgs84_180.html egm96, earth gravity model 1996. See http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm96/egm96.html egm2008, earth gravity model 2008. See http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008 wgs84, world geodetic system 1984. This returns the normal gravity for the WGS84 ellipsoid. grs80, geodetic reference system 1980. This returns the normal gravity for the GRS80 ellipsoid. These models approximate the gravitation field above the surface of the earth. By default, the "egm96" gravity model is used. This may changed by setting the environment variable "GEOGRAPHICLIB_GRAVITY_NAME" or with the-noption. The gravity models will be loaded from a directory specified at compile time. This may changed by setting the environment variables "GEOGRAPHICLIB_GRAVITY_PATH" or "GEOGRAPHICLIB_DATA", or with the-doption. The-hoption prints the default gravity path and name. Use the-voption to ascertain the full path name of the data file. Instructions for downloading and installing gravity models are available at <http://geographiclib.sf.net/html/gravity.html#gravityinst>.## ENVIRONMENT

GEOGRAPHICLIB_GRAVITY_NAMEOverride the compile-time default gravity name of "egm96". The-hoption reports the value ofGEOGRAPHICLIB_GRAVITY_NAME, if defined, otherwise it reports the compile-time value. If the-nnameoption is used, thennametakes precedence.GEOGRAPHICLIB_GRAVITY_PATHOverride the compile-time default gravity path. This is typically "/usr/local/share/GeographicLib/gravity" on Unix-like systems and "C:/ProgramData/GeographicLib/gravity" on Windows systems. The-hoption reports the value ofGEOGRAPHICLIB_GRAVITY_PATH, if defined, otherwise it reports the compile-time value. If the-ddiroption is used, thendirtakes precedence.GEOGRAPHICLIB_DATAAnother way of overriding the compile-time default gravity path. If it is set (and ifGEOGRAPHICLIB_GRAVITY_PATHis not set), then $GEOGRAPHICLIB_DATA/gravity is used.## ERRORS

An illegal line of input will print an error message to standard output beginning with "ERROR:" and causesGravityto return an exit code of 1. However, an error does not causeGravityto terminate; following lines will be converted.## EXAMPLES

The gravity field from EGM2008 at the top of Mount Everest echo 27:59:17N 86:55:32E 8820 | Gravity -n egm2008 => -0.00001 0.00103 -9.76782## SEE ALSO

GeoConvert(1),GeoidEval(1),geographiclib-get-gravity(8).## AUTHOR

Gravitywas written by Charles Karney.## HISTORY

Gravitywas added to GeographicLib, <http://geographiclib.sf.net>, in version 1.16. GeographicLib 1.45 2015-09-30 GRAVITY(1)

Search: