( 1.0 - WGS84_E2 ) int tsmLatLongToGeocentric ( double lat, double lon, double altitude, double *x, double *y, double *z )

Convert from Lat/Long to Geocentric coordinates

Documentation

Convert from Lat/Long to Geocentric coordinates.

This function will take a (latitude, longitude, altitude) coordinate and transform it into a geocentric coordinate. The values for latitude and longitude are assumed to be in degrees, relative to the WGS84 datum and in the range -90..+90, and -180..+180 respectively. (N.B. you can also specify longitude in the range 0..360, where 0 is still Greenwich Meridian, but 180..360 maps to -180..0. It is not obvious that a 0..180 mapping makes sense for latitude so we do not support this.)

The value for altitude is assumed to be in meters above sea level (i.e. height above the geoid). If your altitude is in terms of height above the WGS84 spheroid then you should compensate for this by subtracting the geoid separation value for the region before calling this function, i.e.

altitude -= (double) tspCalcGeoidSeparation( lat, lon );

The origin of the geocentric system is the center of the spheroid. The equator is in the x-y plane and 0 degrees of longitude lies along the x-z plane.

Returns:
TRUE
Parameters:
lat - the WGS84 latitude value (degrees)
lon - the WGS84 longitude value (degrees)
altitude - the altitude above the sea level (meters)
x - reference to value to contain the geocentric x coordinate
y - reference to value to contain the geocentric y coordinate
z - reference to value to contain the geocentric z coordinate
Author:
Martin Reddy
Version:
4 May 1998
See Also:
tspGeocentricToLatLong, tsmLatLongToUTM, tsmUTMToLatLong, tspCalcGeoidSeparation


TSMAPI_RELEASE 2.1 - Release Date: 2001/01/10 19:01:12

Back to tsmApi Home Page