frames¶
Coordinate frame transformations and related functions. Main usage is the convert
function that wraps Astropy frame transformations.
Module summary¶
Functions
|
Use astropy.coordinates.EarthLocation to transform from geodetic to ITRS. |
|
|
|
Radar pointing (az,el) to unit vector in ECEF, not including translation. |
|
Perform predefined coordinate transformations using Astropy. |
|
ECEF coordinate system to local ENU (east,north,up), not including translation. |
|
ENU (east/north/up) to ECEF coordinate system conversion, not including translation. |
|
Use astropy.coordinates.EarthLocation to transform from geodetic to ITRS. |
|
NED (north/east/down) to ECEF coordinate system conversion, not including translation. |
Contents¶
Functions
-
sorts.frames.
ITRS_to_geodetic
(x, y, z, radians=False, ellipsoid=None)[source] Use astropy.coordinates.EarthLocation to transform from geodetic to ITRS.
- Parameters
x (float) – X-coordinate in ITRS
y (float) – Y-coordinate in ITRS
z (float) – Z-coordinate in ITRS
radians (bool) – If
True
then all values are given in radians instead of degrees.ellipsoid (str/None) – Name of the ellipsoid model used for geodetic coordinates, for default value see Astropy EarthLocation.
- Return type
- Returns
(3,) array of longitude, latitude and height above ellipsoid
-
sorts.frames.
arctime_to_degrees
(minutes, seconds)[source]
-
sorts.frames.
azel_to_ecef
(lat, lon, alt, az, el, radians=False)[source] Radar pointing (az,el) to unit vector in ECEF, not including translation.
TODO: Docstring
-
sorts.frames.
convert
(t, states, in_frame, out_frame, logger=None, profiler=None, **kwargs)[source] Perform predefined coordinate transformations using Astropy. Always returns a copy of the array.
- Parameters
t (numpy.ndarray/float) – Absolute time corresponding to the input states.
states (numpy.ndarray) – Size (6,n) matrix of states in SI units where rows 1-3 are position and 4-6 are velocity.
in_frame (str) – Name of the frame the input states are currently in.
out_frame (str) – Name of the state to transform to.
profiler (Profiler) – Profiler instance for checking function performance.
logger (logging.Logger) – Logger instance for logging the execution of the function.
- Return type
- Returns
Size (6,n) matrix of states in SI units where rows 1-3 are position and 4-6 are velocity.
-
sorts.frames.
ecef_to_enu
(lat, lon, alt, ecef, radians=False)[source] ECEF coordinate system to local ENU (east,north,up), not including translation.
- Parameters
lat (float) – Latitude on the ellipsoid
lon (float) – Longitude on the ellipsoid
alt (float) – Altitude above ellipsoid, Unused in this implementation.
ecef (numpy.ndarray) – (3,n) array x,y and z coordinates in ECEF.
radians (bool) – If
True
then all values are given in radians instead of degrees.
- Return type
- Returns
(3,n) array x,y and z in local coordinates in the ENU-convention.
-
sorts.frames.
enu_to_ecef
(lat, lon, alt, enu, radians=False)[source] ENU (east/north/up) to ECEF coordinate system conversion, not including translation.
- Parameters
lat (float) – Latitude on the ellipsoid
lon (float) – Longitude on the ellipsoid
alt (float) – Altitude above ellipsoid, Unused in this implementation.
enu (numpy.ndarray) – (3,n) input matrix of positions in the ENU-convention.
radians (bool) – If
True
then all values are given in radians instead of degrees.
- Return type
- Returns
(3,n) array x,y and z coordinates in ECEF.
-
sorts.frames.
geodetic_to_ITRS
(lat, lon, alt, radians=False, ellipsoid=None)[source] Use astropy.coordinates.EarthLocation to transform from geodetic to ITRS.
-
sorts.frames.
ned_to_ecef
(lat, lon, alt, ned, radians=False)[source] NED (north/east/down) to ECEF coordinate system conversion, not including translation.
- Parameters
lat (float) – Latitude on the ellipsoid
lon (float) – Longitude on the ellipsoid
alt (float) – Altitude above ellipsoid, Unused in this implementation.
ned (numpy.ndarray) – (3,n) input matrix of positions in the NED-convention.
radians (bool) – If
True
then all values are given in radians instead of degrees.
- Return type
- Returns
(3,n) array x,y and z coordinates in ECEF.