ObsCoords#
This Module contains the classes to manage point coordinates:
GeoCoords
: For representation og geographic coordinates (lon, lat, alti)
ENUCoords
: For local projection (East, North, Up)
ECEFCoords
: For Earth-Centered-Earth-Fixed coordinates (X, Y, Z)
- tracklib.core.ObsCoords.Re: float = 6378137.0#
Earth semi-major axis
- tracklib.core.ObsCoords.Be: float = 6356752.314#
Earth semi-minor axis
- tracklib.core.ObsCoords.Fe: float = 0.0033528106647474805#
Earth flattening
- tracklib.core.ObsCoords.Ee: float = 0.0818191910428#
Earth eccentricity
- class tracklib.core.ObsCoords.GeoCoords(lon, lat, hgt=0.0)[source]#
Class to represent geographics coordinates
- __init__(lon, lat, hgt=0.0)[source]#
Constructor of
GeoCoords
class- Parameters
lon (
float
) – longitude in decimal degreeslat (
float
) – latitude in decimal degreeshgt (
float
) – height in meters above geoid or ellipsoid, defaults to 0
- __str__()[source]#
Transform the object in string
- Return type
str
- Returns
String representation of coordinates
- toECEFCoords()[source]#
Convert geodetic coordinates to absolute ECEF
- Return type
- Returns
absolute ECEF coordinates
- toENUCoords(base)[source]#
Convert geodetic coordinates to local ENU coords
- Parameters
base (
Union
[ECEFCoords
,GeoCoords
]) – Base coordinates for conversion- Return type
- Returns
Converted coordinates
- toGeoCoords()[source]#
Artificial function to ensure point is GeoCoords
- Return type
- Returns
Copy of current object
- distanceTo(point)[source]#
Distance between two geodetic coordinates
- Parameters
point (
GeoCoords
) – Geographic coordinate- Return type
float
- Returns
Distance
- distance2DTo(point)[source]#
2D Distance between two geodetic coordinates
- Parameters
point (
GeoCoords
) – Geographic coordinate- Return type
float
- Returns
2D Distance
- elevationTo(point)[source]#
Elevation between two geodetic coordinates
- Parameters
point (
GeoCoords
) – Geographic coordinate- Return type
float
- Returns
Elevation (in rad)
- azimuthTo(point)[source]#
Azimut between two geodetic coordinates
- Parameters
point (
GeoCoords
) – Geographic coordinate- Return type
float
- Returns
Azimut (in rad)
- class tracklib.core.ObsCoords.ENUCoords(E, N, U=0)[source]#
Class for representation of local projection (East, North, Up)
- __init__(E, N, U=0)[source]#
Constructor of class:ENUCoords class
- Parameters
E (
float
) – East coordinate (in meters)N (
float
) – North coordinate (in meters)U (
float
) – Elevation (in meter), defaults to 0
- toECEFCoords(base)[source]#
Convert local planimetric to absolute geocentric
- Parameters
base (
Union
[ECEFCoords
,GeoCoords
]) – Base coordinates- Return type
- Returns
Transformet coordinates
- toGeoCoords(base)[source]#
Convert local ENU coordinates to geo coords
- Parameters
base (
Union
[ECEFCoords
,GeoCoords
]) – Base coordinates- Return type
- Returns
Transformed coordinates
- toENUCoords(base1, base2)[source]#
Convert local ENU coordinates relative to base1 to local ENU coordinates relative to base2.
- Parameters
base1 (
Union
[ECEFCoords
,GeoCoords
]) – Base 1 coordinatesbase2 (
Union
[ECEFCoords
,GeoCoords
]) – Base 2 coordinates
- Return type
- Returns
Transformed coordinates
- norm()[source]#
R^3 space euclidian norm of point
- Return type
float
- Returns
R^3 space euclidian norm of point
- dot(point)[source]#
Dot product between two vectors
- Parameters
point – [description]
- Returns
[description]
- elevationTo(point)[source]#
Elevation between two ENU coordinates
- Parameters
point (
ENUCoords
) – A ENUCoordinate- Return type
float
- Returns
Elevation (in rad)
- azimuthTo(point)[source]#
Azimut between two ENU coordinates
- Parameters
point (
ENUCoords
) – A ENUCoordinate- Return type
float
- Returns
Azimut (in rad)
- distance2DTo(point)[source]#
Distance 2D between two ENU coordinates
- Parameters
point (
ENUCoords
) – A ENU coordinate- Return type
float
- Returns
2D distance
- distanceTo(point)[source]#
Distance 3D between two ENU coordinates
- Parameters
point (
ENUCoords
) – A ENU coordinate- Return type
float
- Returns
2D distance
- class tracklib.core.ObsCoords.ECEFCoords(X, Y, Z)[source]#
Class to represent Earth-Centered-Earth-Fixed coordinates
- __init__(X, Y, Z)[source]#
Constructor of
ECEFCoords
class- Parameters
X (
float
) – X corrdinate (meters)Y (
float
) – Y corrdinate (meters)Z (
float
) – Z corrdinate (meters)
- __str__()[source]#
Transform the object in string
- Return type
str
- Returns
String representation of coordinates
- toGeoCoords()[source]#
Convert absolute geocentric coords to geodetic longitude, latitude and height
- Return type
- Returns
GeoCoords representation of current coordinates
- toENUCoords(base)[source]#
Convert local coordinates to absolute geocentric
- Parameters
base (
Union
[ECEFCoords
,GeoCoords
]) – Base coordinates- Return type
- Returns
Transformed coordinates
- toECEFCoords()[source]#
Artificial function to ensure point is ECEFCoords
- Return type
- Returns
ECEFCoords
- elevationTo(point)[source]#
Elevation between two ECEF coordinates
- Parameters
point (
ECEFCoords
) – Coordinate 2- Return type
float
- Returns
Elevation (rad)
- azimuthTo(point)[source]#
Azimut between two ECEF coordinates
- Parameters
point (
ECEFCoords
) – Coordinate 2- Return type
float
- Returns
Azimuth (rad)
- norm()[source]#
R^3 space euclidian norm of point
- Return type
float
- Returns
R^3 space euclidian norm
- scalar(factor)[source]#
Scalar multiplication of a vector
- Parameters
factor (
float
) – Multiplication factor
- distanceTo(point)[source]#
Distance between two ECEF coordinates
- Parameters
point (
ECEFCoords
) – Corrdinate 2- Return type
float
- Returns
Distance (meters)