hamsci_psws.geopack.gspToGcar

hamsci_psws.geopack.gspToGcar(X, Y, Z, inverse=False)[source]

Converts a position from global spherical (geocentric) to global cartesian (and vice-versa).

The global cartesian coordinate system is defined as:
  • origin: center of the Earth

  • X axis in the equatorial plane and through the prime meridian.

  • Z axis in the direction of the rotational axis and through the North pole

The meaning of the input (X,Y,Z) depends on the direction of the conversion (to global cartesian or to global spherical).

Parameters
  • X (float) – latitude [degree] or global cartesian X [km]

  • Y (float) – longitude [degree] or global cartesian Y [km]

  • Z (float) – distance from center of the Earth [km] or global cartesian Z [km]

  • inverse (Optional[bool]) – inverse conversion

Returns

  • X (float) – global cartesian X [km] or latitude [degree]

  • Y (float) – global cartesian Y [km] or longitude [degree]

  • Z (float) – global cartesian Z [km] or distance from center of the Earth [km]