Coordinates
This page provides a detailed description of the coordinates functions implemented in the HAOT package. For additional clarity, these descriptions can also be accessed and explored interactively in a Python session using the help() function.
- haot.haversine_distance(latitude_1, longitude_1, latitude_2, longitude_2, sphere_radius=6371000.0)[source]
Calculates the Haversine distance between two points
- Parameters:
latitude_1 (
float) – latitude of point 1 in [degs]longitude_1 (
float) – longitude of point 1 in [degs]latitude_2 (
float) – latitude of point 2 in [degs]longitude_2 (
float) – longitude of point 2 in [degs]sphere_radius (
float) – sphere radius, 6371E3 (default, earth radius in [m])
- Return type:
float- Returns:
Haversine distance in units of sphere radius
- haot.lla_to_ecef(*args)[source]
Converts LLA position to ECEF position
- Parameters:
*args –
- Either of the following forms:
lat_deg, lon_deg, alt_m : float Latitude [degrees], longitude [degrees], and altitude [m].
[lat_deg, lon_deg, alt_m] : array_like Iterable (list, tuple, or NumPy array) containing latitude [degrees], longitude [degrees], and altitude [m].
- Returns:
float ECEF coordinates [m]
- Return type:
ecef_x, ecef_y, ecef_z
- haot.ecef_to_lla(*args)[source]
Converts ECEF position to LLA position
Source: https://danceswithcode.net/engineeringnotes/geodetic_to_ecef/geodetic_to_ecef.html
- Parameters:
*args –
- Either of the following forms:
- ecef_x, ecef_y, ecef_zfloat
ECEF Cartesian coordinates [m].
[ecef_x, ecef_y, ecef_z] : array_like Iterable (list, tuple, or NumPy array) containing ECEF coordinates [x, y, z] in meters.
- Returns:
- numpy.ndarray of shape (3,)
Geodetic coordinates [latitude (deg), longitude (deg), altitude (m)].
- Return type:
lla
- haot.roll_dcm(roll_deg)[source]
Creates a roll DCM
- Parameters:
roll_deg (
float) – roll angle in [degs]- Return type:
ndarray
Returns: roll DCM
- haot.pitch_dcm(pitch_deg)[source]
Creates a pitch DCM
- Parameters:
pitch_deg (
float) – pitch angle in [degs]- Return type:
ndarray
Returns: pitch DCM
- haot.yaw_dcm(yaw_deg)[source]
Creates a yaw DCM
- Parameters:
yaw_deg (
float) – yaw angle in [degs]- Return type:
ndarray
Returns: yaw DCM