int tsmGeocentricToLatLong ( double x, double y, double z, double *lat, double *lon, double *altitude ) Convert a geocentric coordinate into lat/long
Convert a geocentric coordinate into lat/long.This function will take a geocentric (x,y,z) coordinate and convert it into a (latitude,longitude,altitude) coordinate. The origin of the geocentric system is assumed to be at the center of the spheroid. The equator is in the x-y plane and 0 degrees of longitude lies along the x-z plane.
The lat/long values are returned in units of degrees relative to the WGS84 datum and in the range -90..+90, -180..+180, respectively.
The value for altitude is returned in units of meters above sea level (i.e. height above the geoid). If you wish altitude in terms of height above the WGS84 spheroid then you can add the geoid separation value for the region to the results obtained from this function, i.e.
altitude += (double) tspCalcGeoidSeparation( lat, lon );