hamsci_psws.geopack.gcarToLcar¶
- hamsci_psws.geopack.gcarToLcar(X, Y, Z, lat, lon, rho, inverse=False)[source]¶
Converts a position from global cartesian to local cartesian (and vice-versa).
- The global cartesian coordinate system is defined as:
origin: center of the Earth
Z axis in the direction of the rotational axis and through the North pole
X axis in the equatorial plane and through the prime meridian.
- The local cartesian coordinate system is defined as:
origin: local position
X: East
Y: North
Z: up
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) – global cartesian X [km] or local cartesian X [km]
Y (flaot) – global cartesian Y [km] or local cartesian Y [km]
Z (float) – global cartesian Z [km] or local cartesian Z [km]
lat (float) – geocentric latitude [degree] of local cartesian system origin
lon (float) – geocentric longitude [degree] of local cartesian system origin
rho (float) – distance from center of the Earth [km] of local cartesian system origin
inverse (Optional[bool]) – inverse conversion
- Returns
X (float) – local cartesian X [km] or global cartesian X [km]
Y (float) – local cartesian Y [km] or global cartesian Y [km]
Z (float) – local cartesian Z [km] or global cartesian Z [km]