WGS84LocalTangent#
Helpers for a WGS84 local tangent frame (ENU/NED) and conversions to/from WGS84 ECEF.
Class Methods
|
Create a tangent frame from WGS84 lon/lat and a specified vertical reference CRS. |
Create a tangent frame from WGS84 lon/lat and orthometric height (EPSG:4326+3855). |
|
|
Create a tangent frame from coordinates in an arbitrary CRS. |
Methods
|
Compute and cache the ECEF origin from (lon, lat, h) coordinates. |
|
Convert a vector in a local tangent frame to ECEF. |
|
Convert an ECEF vector to a local tangent frame. |
|
Convert a local tangent point (meters, relative to the origin) to ECEF (meters). |
|
Convert an ECEF point (meters) to a local tangent point (meters, relative to the origin). |
Convert a rotation matrix expressed in the local tangent plane to ECEF. |
|
Convert a rotation matrix expressed in ECEF into a local tangent frame. |
Properties
Rotation matrix that maps NED vectors to ECEF vectors. |
|
Rotation matrix that maps ECEF vectors to ENU vectors. |
|
Rotation matrix that maps ENU vectors to ECEF vectors. |
- class weitsicht.transform.wgs84_local_tangent.WGS84LocalTangent(r_ecef_to_ned: Array3x3, origin_ell: Vector3D, crs_wgs_84: CRS, _origin_ecef: Vector3D | None = None, crs_ecef: CRS = <Geocentric CRS: EPSG:4978> Name: WGS 84 Axis Info [cartesian]: - X[geocentricX]: Geocentric X (metre) - Y[geocentricY]: Geocentric Y (metre) - Z[geocentricZ]: Geocentric Z (metre) Area of Use: - name: World. - bounds: (-180.0, -90.0, 180.0, 90.0) Datum: World Geodetic System 1984 ensemble - Ellipsoid: WGS 84 - Prime Meridian: Greenwich)[source]#
Bases:
objectLocal tangent plane frame tied to a WGS84 origin.
The tangent plane orientation is defined by lon/lat and stored as
r_ecef_to_ned.origin_ecefis optional and can be computed lazily fromorigin_ellandcrs_wgs_84when needed (e.g. for point conversions).- Parameters:
r_ecef_to_ned (Array3x3)
origin_ell (Vector3D)
crs_wgs_84 (CRS)
_origin_ecef (Vector3D | None)
crs_ecef (CRS)
- r_ecef_to_ned: Array3x3#
- origin_ell: Vector3D#
- crs_wgs_84: CRS#
- _origin_ecef: Vector3D | None = None#
- crs_ecef: CRS = <Geocentric CRS: EPSG:4978> Name: WGS 84 Axis Info [cartesian]: - X[geocentricX]: Geocentric X (metre) - Y[geocentricY]: Geocentric Y (metre) - Z[geocentricZ]: Geocentric Z (metre) Area of Use: - name: World. - bounds: (-180.0, -90.0, 180.0, 90.0) Datum: World Geodetic System 1984 ensemble - Ellipsoid: WGS 84 - Prime Meridian: Greenwich #
- property origin_ecef#
- static _ell_to_ecef(origin_ell: Vector3D, crs_wgs_84: CRS) Vector3D[source]#
- Parameters:
origin_ell (Vector3D)
crs_wgs_84 (CRS)
- Return type:
Vector3D
- property r_ned_to_ecef: Array3x3#
Rotation matrix that maps NED vectors to ECEF vectors.
- property r_ecef_to_enu: Array3x3#
Rotation matrix that maps ECEF vectors to ENU vectors.
- property r_enu_to_ecef: Array3x3#
Rotation matrix that maps ENU vectors to ECEF vectors.
- ell_to_ecef(origin_ell: Vector3D | None = None, crs_wgs_84: CRS | None = None) Vector3D[source]#
Compute and cache the ECEF origin from (lon, lat, h) coordinates.
This is useful if the frame was created with
skip_ecef=True.- Parameters:
origin_ell (Vector3D | None)
crs_wgs_84 (CRS | None)
- Return type:
Vector3D
- classmethod from_wgs84ell_crs(crs_s: CRS | str | int, lon_deg: float, lat_deg: float, h_m: float, *, skip_ecef: bool = False) WGS84LocalTangent[source]#
Create a tangent frame from WGS84 lon/lat and a specified vertical reference CRS.
- Parameters:
crs_s (CRS | str | int)
lon_deg (float)
lat_deg (float)
h_m (float)
skip_ecef (bool)
- Return type:
- classmethod from_wgs84ell_elipsoid(lon_deg: float, lat_deg: float, h_m: float, *, skip_ecef: bool = False) WGS84LocalTangent[source]#
Create a tangent frame from WGS84 lon/lat and ellipsoidal height (EPSG:4979).
- Parameters:
lon_deg (float)
lat_deg (float)
h_m (float)
skip_ecef (bool)
- Return type:
- classmethod from_wgs84ell_orthometric(lon_deg: float, lat_deg: float, h_m: float, *, skip_ecef: bool = False) WGS84LocalTangent[source]#
Create a tangent frame from WGS84 lon/lat and orthometric height (EPSG:4326+3855).
- Parameters:
lon_deg (float)
lat_deg (float)
h_m (float)
skip_ecef (bool)
- Return type:
- classmethod from_crs(x: float, y: float, z: float, crs_s: CRS | str | int) WGS84LocalTangent[source]#
Create a tangent frame from coordinates in an arbitrary CRS.
- Parameters:
x (float)
y (float)
z (float)
crs_s (CRS | str | int)
- Return type:
- vector_to_ecef(v_local: Vector3D, *, local_frame: Literal['ENU', 'NED']) Vector3D[source]#
Convert a vector in a local tangent frame to ECEF.
- Parameters:
v_local (Vector3D)
local_frame (Literal['ENU', 'NED'])
- Return type:
Vector3D
- vector_from_ecef(v_ecef: Vector3D, *, local_frame: Literal['ENU', 'NED']) Vector3D[source]#
Convert an ECEF vector to a local tangent frame.
- Parameters:
v_ecef (Vector3D)
local_frame (Literal['ENU', 'NED'])
- Return type:
Vector3D
- point_to_ecef(p_local_m: Vector3D, *, local_frame: Literal['ENU', 'NED']) Vector3D[source]#
Convert a local tangent point (meters, relative to the origin) to ECEF (meters).
- Parameters:
p_local_m (Vector3D)
local_frame (Literal['ENU', 'NED'])
- Return type:
Vector3D
- point_from_ecef(p_ecef_m: Vector3D, *, local_frame: Literal['ENU', 'NED']) Vector3D[source]#
Convert an ECEF point (meters) to a local tangent point (meters, relative to the origin).
- Parameters:
p_ecef_m (Vector3D)
local_frame (Literal['ENU', 'NED'])
- Return type:
Vector3D
- to_ecef_matrix(r_local_from_frame: Array3x3, *, local_frame: Literal['ENU', 'NED']) Array3x3[source]#
Convert a rotation matrix expressed in the local tangent plane to ECEF.
- Parameters:
r_local_from_frame (Array3x3)
local_frame (Literal['ENU', 'NED'])
- Return type:
Array3x3
- to_ltp_matrix(r_ecef_from_frame: Array3x3, *, local_frame: Literal['ENU', 'NED']) Array3x3[source]#
Convert a rotation matrix expressed in ECEF into a local tangent frame.
- Parameters:
r_ecef_from_frame (Array3x3)
local_frame (Literal['ENU', 'NED'])
- Return type:
Array3x3
- __init__(r_ecef_to_ned: Array3x3, origin_ell: Vector3D, crs_wgs_84: CRS, _origin_ecef: Vector3D | None = None, crs_ecef: CRS = <Geocentric CRS: EPSG:4978> Name: WGS 84 Axis Info [cartesian]: - X[geocentricX]: Geocentric X (metre) - Y[geocentricY]: Geocentric Y (metre) - Z[geocentricZ]: Geocentric Z (metre) Area of Use: - name: World. - bounds: (-180.0, -90.0, 180.0, 90.0) Datum: World Geodetic System 1984 ensemble - Ellipsoid: WGS 84 - Prime Meridian: Greenwich) None#
- Parameters:
r_ecef_to_ned (Array3x3)
origin_ell (Vector3D)
crs_wgs_84 (CRS)
_origin_ecef (Vector3D | None)
crs_ecef (CRS)
- Return type:
None