earthkit.geo.coord.latlon_to_xyz

earthkit.geo.coord.latlon_to_xyz(lat, lon)

Convert from geodetic to earth-centred, earth-fixed ([ECEF]) coordinates. See [From_geodetic_to_ECEF_coordinates].

Parameters:
  • lat (float or ndarray) – Latitude (degrees).

  • lon (float or ndarray) – Longitude (degrees).

Returns:

  • ndarray – x-component of the ECEF coordinates.

  • ndarray – y-component of the ECEF coordinates.

  • ndarray – z-component of the ECEF coordinates.

It is assumed that the Earth is a sphere of radius 1. It is also assumed the geodetic coordinate h = 0.