Library API¶
This section provides detailed information about all the classes, functions, and modules available in the ASTRA-RL toolbox. Each entry includes a description of its purpose, parameters, and usage examples.
This documentation is generated automatically from the codebase using docstrings and comments, ensuring that it stays up-to-date with the latest changes.
brahe
¶
Brahe - Satellite Dynamics and Astrodynamics Library
A high-performance library for orbital mechanics, time systems, coordinate transformations, and attitude representations. Brahe provides both Rust and Python interfaces for satellite dynamics computations.
The library is organized into submodules that mirror the Rust core structure: - time: Time systems, epochs, and conversions - orbits: Orbital mechanics, propagators, and TLE handling - coordinates: Coordinate system transformations - frames: Reference frame transformations (ECI/ECEF) - eop: Earth Orientation Parameters - attitude: Attitude representations (quaternions, Euler angles, etc.) - trajectories: Trajectory containers and interpolation
All functionality is re-exported at the top level for convenience, so you can use either: from brahe import Epoch from brahe.time import Epoch
AS2RAD
module-attribute
¶
AS2RAD = 4.84813681109536e-06
Convert a string or number to a floating-point number, if possible.
AU
module-attribute
¶
AU = 149597870700.0
Convert a string or number to a floating-point number, if possible.
C_LIGHT
module-attribute
¶
C_LIGHT = 299792458.0
Convert a string or number to a floating-point number, if possible.
DEG2RAD
module-attribute
¶
DEG2RAD = 0.017453292519943295
Convert a string or number to a floating-point number, if possible.
ECC_EARTH
module-attribute
¶
ECC_EARTH = 0.081819190842622
Convert a string or number to a floating-point number, if possible.
GM_EARTH
module-attribute
¶
GM_EARTH = 398600441500000.0
Convert a string or number to a floating-point number, if possible.
GM_JUPITER
module-attribute
¶
GM_JUPITER = 1.267127648e+17
Convert a string or number to a floating-point number, if possible.
GM_MARS
module-attribute
¶
GM_MARS = 42828375210000.0
Convert a string or number to a floating-point number, if possible.
GM_MERCURY
module-attribute
¶
GM_MERCURY = 22031780000000.0
Convert a string or number to a floating-point number, if possible.
GM_MOON
module-attribute
¶
GM_MOON = 4902800066000.0
Convert a string or number to a floating-point number, if possible.
GM_NEPTUNE
module-attribute
¶
GM_NEPTUNE = 6836527100580000.0
Convert a string or number to a floating-point number, if possible.
GM_PLUTO
module-attribute
¶
GM_PLUTO = 977000000000.0
Convert a string or number to a floating-point number, if possible.
GM_SATURN
module-attribute
¶
GM_SATURN = 3.79405852e+16
Convert a string or number to a floating-point number, if possible.
GM_SUN
module-attribute
¶
GM_SUN = 1.327124400419394e+20
Convert a string or number to a floating-point number, if possible.
GM_URANUS
module-attribute
¶
GM_URANUS = 5794548600000000.0
Convert a string or number to a floating-point number, if possible.
GM_VENUS
module-attribute
¶
GM_VENUS = 324858592000000.0
Convert a string or number to a floating-point number, if possible.
GPS
module-attribute
¶
GPS = TimeSystem.GPS
Enumeration of supported time systems.
Time systems define different conventions for measuring and representing time. Each system has specific uses in astrodynamics and timekeeping applications.
GPS_TAI
module-attribute
¶
GPS_TAI = -19.0
Convert a string or number to a floating-point number, if possible.
GPS_TT
module-attribute
¶
GPS_TT = -51.184
Convert a string or number to a floating-point number, if possible.
GPS_ZERO
module-attribute
¶
GPS_ZERO = 44244.0
Convert a string or number to a floating-point number, if possible.
J2_EARTH
module-attribute
¶
J2_EARTH = 0.0010826358191967
Convert a string or number to a floating-point number, if possible.
MJD2000
module-attribute
¶
MJD2000 = 51544.5
Convert a string or number to a floating-point number, if possible.
MJD_ZERO
module-attribute
¶
MJD_ZERO = 2400000.5
Convert a string or number to a floating-point number, if possible.
OMEGA_EARTH
module-attribute
¶
OMEGA_EARTH = 7.292115146706979e-05
Convert a string or number to a floating-point number, if possible.
P_SUN
module-attribute
¶
P_SUN = 4.56e-06
Convert a string or number to a floating-point number, if possible.
RAD2AS
module-attribute
¶
RAD2AS = 206264.80624709636
Convert a string or number to a floating-point number, if possible.
RAD2DEG
module-attribute
¶
RAD2DEG = 57.29577951308232
Convert a string or number to a floating-point number, if possible.
R_EARTH
module-attribute
¶
R_EARTH = 6378136.3
Convert a string or number to a floating-point number, if possible.
R_MOON
module-attribute
¶
R_MOON = 1738000.0
Convert a string or number to a floating-point number, if possible.
R_SUN
module-attribute
¶
R_SUN = 695700000.0
Convert a string or number to a floating-point number, if possible.
TAI
module-attribute
¶
TAI = TimeSystem.TAI
Enumeration of supported time systems.
Time systems define different conventions for measuring and representing time. Each system has specific uses in astrodynamics and timekeeping applications.
TAI_GPS
module-attribute
¶
TAI_GPS = 19.0
Convert a string or number to a floating-point number, if possible.
TAI_TT
module-attribute
¶
TAI_TT = -32.184
Convert a string or number to a floating-point number, if possible.
TT
module-attribute
¶
TT = TimeSystem.TT
Enumeration of supported time systems.
Time systems define different conventions for measuring and representing time. Each system has specific uses in astrodynamics and timekeeping applications.
TT_GPS
module-attribute
¶
TT_GPS = 51.184
Convert a string or number to a floating-point number, if possible.
TT_TAI
module-attribute
¶
TT_TAI = 32.184
Convert a string or number to a floating-point number, if possible.
UT1
module-attribute
¶
UT1 = TimeSystem.UT1
Enumeration of supported time systems.
Time systems define different conventions for measuring and representing time. Each system has specific uses in astrodynamics and timekeeping applications.
UTC
module-attribute
¶
UTC = TimeSystem.UTC
Enumeration of supported time systems.
Time systems define different conventions for measuring and representing time. Each system has specific uses in astrodynamics and timekeeping applications.
WGS84_A
module-attribute
¶
WGS84_A = 6378137.0
Convert a string or number to a floating-point number, if possible.
WGS84_F
module-attribute
¶
WGS84_F = 0.0033528106647474805
Convert a string or number to a floating-point number, if possible.
anomaly_eccentric_to_mean
builtin
¶
anomaly_eccentric_to_mean(anm_ecc: float, e: float, angle_format: AngleFormat) -> float
Converts eccentric anomaly into mean anomaly.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
anm_ecc
|
float
|
Eccentric anomaly in radians or degrees. |
required |
e
|
float
|
The eccentricity of the astronomical object's orbit (dimensionless). |
required |
angle_format
|
AngleFormat
|
Interprets input and returns output in AngleFormat.DEGREES or AngleFormat.RADIANS. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
Mean anomaly in radians or degrees. |
anomaly_eccentric_to_true
builtin
¶
anomaly_eccentric_to_true(anm_ecc: float, e: float, angle_format: AngleFormat) -> float
Converts eccentric anomaly into true anomaly.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
anm_ecc
|
float
|
Eccentric anomaly in radians or degrees. |
required |
e
|
float
|
The eccentricity of the astronomical object's orbit (dimensionless). |
required |
angle_format
|
AngleFormat
|
Interprets input and returns output in AngleFormat.DEGREES or AngleFormat.RADIANS. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
True anomaly in radians or degrees. |
anomaly_mean_to_eccentric
builtin
¶
anomaly_mean_to_eccentric(anm_mean: float, e: float, angle_format: AngleFormat) -> float
Converts mean anomaly into eccentric anomaly.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
anm_mean
|
float
|
Mean anomaly in radians or degrees. |
required |
e
|
float
|
The eccentricity of the astronomical object's orbit (dimensionless). |
required |
angle_format
|
AngleFormat
|
Interprets input and returns output in AngleFormat.DEGREES or AngleFormat.RADIANS. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
Eccentric anomaly in radians or degrees. |
anomaly_mean_to_true
builtin
¶
anomaly_mean_to_true(anm_mean: float, e: float, angle_format: AngleFormat) -> float
Converts mean anomaly into true anomaly.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
anm_mean
|
float
|
Mean anomaly in radians or degrees. |
required |
e
|
float
|
The eccentricity of the astronomical object's orbit (dimensionless). |
required |
angle_format
|
AngleFormat
|
Interprets input and returns output in AngleFormat.DEGREES or AngleFormat.RADIANS. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
True anomaly in radians or degrees. |
anomaly_true_to_eccentric
builtin
¶
anomaly_true_to_eccentric(anm_true: float, e: float, angle_format: AngleFormat) -> float
Converts true anomaly into eccentric anomaly.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
anm_true
|
float
|
True anomaly in radians or degrees. |
required |
e
|
float
|
The eccentricity of the astronomical object's orbit (dimensionless). |
required |
angle_format
|
AngleFormat
|
Interprets input and returns output in AngleFormat.DEGREES or AngleFormat.RADIANS. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
Eccentric anomaly in radians or degrees. |
anomaly_true_to_mean
builtin
¶
anomaly_true_to_mean(anm_true: float, e: float, angle_format: AngleFormat) -> float
Converts true anomaly into mean anomaly.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
anm_true
|
float
|
True anomaly in radians or degrees. |
required |
e
|
float
|
The eccentricity of the astronomical object's orbit (dimensionless). |
required |
angle_format
|
AngleFormat
|
Interprets input and returns output in AngleFormat.DEGREES or AngleFormat.RADIANS. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
Mean anomaly in radians or degrees. |
apoapsis_distance
builtin
¶
apoapsis_distance(a: float, e: float) -> float
Calculate the distance of an object at its apoapsis.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
float
|
The semi-major axis of the astronomical object in meters. |
required |
e
|
float
|
The eccentricity of the astronomical object's orbit (dimensionless). |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The distance of the object at apoapsis in meters. |
apoapsis_velocity
builtin
¶
apoapsis_velocity(a: float, e: float, gm: float) -> float
Computes the apoapsis velocity of an astronomical object around a general body.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
float
|
The semi-major axis of the astronomical object in meters. |
required |
e
|
float
|
The eccentricity of the astronomical object's orbit (dimensionless). |
required |
gm
|
float
|
The standard gravitational parameter of primary body in m³/s². |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The magnitude of velocity of the object at apoapsis in m/s. |
apogee_velocity
builtin
¶
apogee_velocity(a: float, e: float) -> float
Computes the apogee velocity of an astronomical object around Earth.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
float
|
The semi-major axis of the astronomical object in meters. |
required |
e
|
float
|
The eccentricity of the astronomical object's orbit (dimensionless). |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The magnitude of velocity of the object at apogee in m/s. |
bias_precession_nutation
builtin
¶
bias_precession_nutation(epc: Epoch) -> np.ndarray
Computes the Bias-Precession-Nutation matrix transforming the GCRS
to the
CIRS
intermediate reference frame. This transformation corrects for the
bias, precession, and nutation of Celestial Intermediate Origin (CIO
) with
respect to inertial space.
This formulation computes the Bias-Precession-Nutation correction matrix
according using a CIO
based model using using the IAU 2006
precession and IAU 2000A
nutation models.
The function will utilize the global Earth orientation and loaded data to
apply corrections to the Celestial Intermediate Pole (CIP
) derived from
empirical observations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
epc
|
Epoch
|
Epoch instant for computation of transformation matrix |
required |
Returns:
Type | Description |
---|---|
ndarray
|
3x3 rotation matrix transforming |
References
IAU SOFA Tools For Earth Attitude, Example 5.5 http://www.iausofa.org/2021_0512_C/sofa/sofa_pn_c.pdf Software Version 18, 2021-04-18
calculate_tle_line_checksum
builtin
¶
calculate_tle_line_checksum(line: str) -> int
Calculate TLE line checksum.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
str
|
TLE line. |
required |
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
Checksum value. |
create_tle_lines
builtin
¶
create_tle_lines(epoch: Epoch, inclination: float, raan: float, eccentricity: float, arg_perigee: float, mean_anomaly: float, mean_motion: float, norad_id: str, ephemeris_type: int, element_set_number: int, revolution_number: int, classification=None, intl_designator=None, first_derivative=None, second_derivative=None, bstar=None) -> tuple
Create complete TLE lines from all parameters.
Creates Two-Line Element (TLE) lines from complete set of orbital and administrative parameters. Provides full control over all TLE fields including derivatives and drag terms.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
epoch
|
Epoch
|
Epoch of the elements. |
required |
inclination
|
float
|
Inclination in degrees. |
required |
raan
|
float
|
Right ascension of ascending node in degrees. |
required |
eccentricity
|
float
|
Eccentricity (dimensionless). |
required |
arg_perigee
|
float
|
Argument of periapsis in degrees. |
required |
mean_anomaly
|
float
|
Mean anomaly in degrees. |
required |
mean_motion
|
float
|
Mean motion in revolutions per day. |
required |
norad_id
|
str
|
NORAD catalog number (supports numeric and Alpha-5 format). |
required |
ephemeris_type
|
int
|
Ephemeris type (0-9). |
required |
element_set_number
|
int
|
Element set number. |
required |
revolution_number
|
int
|
Revolution number at epoch. |
required |
classification
|
str
|
Security classification. Defaults to ' '. |
None
|
intl_designator
|
str
|
International designator. Defaults to ''. |
None
|
first_derivative
|
float
|
First derivative of mean motion. Defaults to 0.0. |
None
|
second_derivative
|
float
|
Second derivative of mean motion. Defaults to 0.0. |
None
|
bstar
|
float
|
BSTAR drag term. Defaults to 0.0. |
None
|
Returns:
Name | Type | Description |
---|---|---|
tuple |
tuple
|
A tuple containing (line1, line2) - the two TLE lines as strings. |
datetime_to_jd
builtin
¶
datetime_to_jd(year: int, month: int, day: int, hour: int, minute: int, second: float, nanosecond: float) -> float
Convert a Gregorian calendar date to the equivalent Julian Date.
Note: Due to the ambiguity of the nature of leap second insertion, this method should not be used if a specific behavior for leap second insertion is expected. This method treats leap seconds as if they don't exist.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
year
|
int
|
Year |
required |
month
|
int
|
Month (1-12) |
required |
day
|
int
|
Day of month (1-31) |
required |
hour
|
int
|
Hour (0-23) |
required |
minute
|
int
|
Minute (0-59) |
required |
second
|
float
|
Second with fractional part |
required |
nanosecond
|
float
|
Nanosecond component |
required |
Returns:
Type | Description |
---|---|
float
|
Julian date of epoch |
datetime_to_mjd
builtin
¶
datetime_to_mjd(year: int, month: int, day: int, hour: int, minute: int, second: float, nanosecond: float) -> float
Convert a Gregorian calendar date to the equivalent Modified Julian Date.
Note: Due to the ambiguity of the nature of leap second insertion, this method should not be used if a specific behavior for leap second insertion is expected. This method treats leap seconds as if they don't exist.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
year
|
int
|
Year |
required |
month
|
int
|
Month (1-12) |
required |
day
|
int
|
Day of month (1-31) |
required |
hour
|
int
|
Hour (0-23) |
required |
minute
|
int
|
Minute (0-59) |
required |
second
|
float
|
Second with fractional part |
required |
nanosecond
|
float
|
Nanosecond component |
required |
Returns:
Type | Description |
---|---|
float
|
Modified Julian date of epoch |
download_c04_eop_file
builtin
¶
download_c04_eop_file(filepath: str) -> None
Download latest C04 Earth orientation parameter file. Will attempt to download the latest parameter file to the specified location. Creating any missing directories as required.
The download source is the IERS Earth Orientation Data Products
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filepath
|
str
|
Path of desired output file |
required |
download_standard_eop_file
builtin
¶
download_standard_eop_file(filepath: str) -> None
Download latest standard Earth orientation parameter file. Will attempt to download the latest parameter file to the specified location. Creating any missing directories as required.
The download source is the IERS Earth Orientation Data Products
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filepath
|
str
|
Path of desired output file |
required |
earth_rotation
builtin
¶
earth_rotation(epc: Epoch) -> np.ndarray
Computes the Earth rotation matrix transforming the CIRS
to the TIRS
intermediate reference frame. This transformation corrects for the Earth
rotation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
epc
|
Epoch
|
Epoch instant for computation of transformation matrix |
required |
Returns:
Type | Description |
---|---|
ndarray
|
3x3 rotation matrix transforming |
epoch_from_tle
builtin
¶
epoch_from_tle(line1: str) -> Epoch
Extract Epoch from TLE line 1
Extracts and parses the epoch timestamp from the first line of TLE data. The epoch is returned in UTC time system.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line1
|
str
|
First line of TLE data |
required |
Returns:
Name | Type | Description |
---|---|---|
Epoch |
Epoch
|
Extracted epoch in UTC time system |
Examples:
>>> line1 = "1 25544U 98067A 21001.50000000 .00001764 00000-0 40967-4 0 9997"
>>> epoch = epoch_from_tle(line1)
>>> epoch.year()
2021
get_global_dxdy
builtin
¶
get_global_dxdy(mjd: float) -> tuple[float, float]
Get celestial pole offsets from the global EOP provider.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mjd
|
float
|
Modified Julian Date |
required |
Returns:
Type | Description |
---|---|
tuple[float, float]
|
tuple[float, float]: Celestial pole offsets dx and dy in radians |
get_global_eop
builtin
¶
get_global_eop(mjd: float) -> tuple[float, float, float, float, float, float]
Get all EOP parameters from the global EOP provider.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mjd
|
float
|
Modified Julian Date |
required |
Returns:
Type | Description |
---|---|
tuple[float, float, float, float, float, float]
|
tuple[float, float, float, float, float, float]: UT1-UTC, pm_x, pm_y, dx, dy, lod |
get_global_eop_extrapolation
builtin
¶
get_global_eop_extrapolation() -> str
Get the extrapolation method of the global EOP provider.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
Extrapolation method string |
get_global_eop_initialization
builtin
¶
get_global_eop_initialization() -> bool
Check if the global EOP provider is initialized.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if global EOP provider is initialized |
get_global_eop_interpolation
builtin
¶
get_global_eop_interpolation() -> bool
Check if interpolation is enabled in the global EOP provider.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if interpolation is enabled |
get_global_eop_len
builtin
¶
get_global_eop_len() -> int
Get the number of EOP data points in the global provider.
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
Number of EOP data points |
get_global_eop_mjd_last_dxdy
builtin
¶
get_global_eop_mjd_last_dxdy() -> float
Get the last Modified Julian Date with dx/dy data in the global provider.
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
Last MJD with dx/dy data |
get_global_eop_mjd_last_lod
builtin
¶
get_global_eop_mjd_last_lod() -> float
Get the last Modified Julian Date with LOD data in the global provider.
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
Last MJD with LOD data |
get_global_eop_mjd_max
builtin
¶
get_global_eop_mjd_max() -> float
Get the maximum Modified Julian Date in the global EOP dataset.
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
Maximum MJD |
get_global_eop_mjd_min
builtin
¶
get_global_eop_mjd_min() -> float
Get the minimum Modified Julian Date in the global EOP dataset.
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
Minimum MJD |
get_global_eop_type
builtin
¶
get_global_eop_type() -> str
Get the EOP data type of the global provider.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
EOP type string |
get_global_lod
builtin
¶
get_global_lod(mjd: float) -> float
Get length of day offset from the global EOP provider.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mjd
|
float
|
Modified Julian Date |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
Length of day offset in seconds |
get_global_pm
builtin
¶
get_global_pm(mjd: float) -> tuple[float, float]
Get polar motion components from the global EOP provider.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mjd
|
float
|
Modified Julian Date |
required |
Returns:
Type | Description |
---|---|
tuple[float, float]
|
tuple[float, float]: Polar motion x and y components in radians |
get_global_ut1_utc
builtin
¶
get_global_ut1_utc(mjd: float) -> float
Get UT1-UTC time difference from the global EOP provider.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mjd
|
float
|
Modified Julian Date |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
UT1-UTC time difference in seconds |
jd_to_datetime
builtin
¶
jd_to_datetime(jd: float) -> tuple
Convert a Julian Date to the equivalent Gregorian calendar date.
Note: Due to the ambiguity of the nature of leap second insertion, this method should not be used if a specific behavior for leap second insertion is expected. This method treats leap seconds as if they don't exist.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jd
|
float
|
Julian date |
required |
Returns:
Name | Type | Description |
---|---|---|
tuple |
tuple
|
A tuple containing (year, month, day, hour, minute, second, nanosecond) |
keplerian_elements_from_tle
builtin
¶
keplerian_elements_from_tle(line1: str, line2: str) -> None
Extract Keplerian orbital elements from TLE lines.
Extracts the standard six Keplerian orbital elements from Two-Line Element (TLE) data. Returns elements in standard order: [a, e, i, raan, argp, M] where angles are in radians.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line1
|
str
|
First line of TLE data. |
required |
line2
|
str
|
Second line of TLE data. |
required |
Returns:
Name | Type | Description |
---|---|---|
tuple |
None
|
A tuple containing: - epoch (Epoch): Epoch of the TLE data. - elements (numpy.ndarray): Six Keplerian elements [a, e, i, raan, argp, M] where a is semi-major axis in meters, e is eccentricity (dimensionless), and i, raan, argp, M are in radians. |
keplerian_elements_to_tle
builtin
¶
keplerian_elements_to_tle(epoch: Epoch, elements: ndarray, norad_id: str) -> tuple
Convert Keplerian elements to TLE lines.
Converts standard Keplerian orbital elements to Two-Line Element (TLE) format. Input angles should be in degrees for compatibility with TLE format.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
epoch
|
Epoch
|
Epoch of the elements. |
required |
elements
|
ndarray
|
Keplerian elements [a (m), e, i (deg), raan (deg), argp (deg), M (deg)]. |
required |
norad_id
|
str
|
NORAD catalog number (supports numeric and Alpha-5 format). |
required |
Returns:
Name | Type | Description |
---|---|---|
tuple |
tuple
|
A tuple containing (line1, line2) - the two TLE lines as strings. |
mean_motion
builtin
¶
mean_motion(a: float, angle_format: AngleFormat) -> float
Computes the mean motion of an astronomical object around Earth.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
float
|
The semi-major axis of the astronomical object in meters. |
required |
angle_format
|
AngleFormat
|
Return output in AngleFormat.DEGREES or AngleFormat.RADIANS. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The mean motion of the astronomical object in radians or degrees. |
mean_motion_general
builtin
¶
mean_motion_general(a: float, gm: float, angle_format: AngleFormat) -> float
Computes the mean motion of an astronomical object around a general body given a semi-major axis.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
float
|
The semi-major axis of the astronomical object in meters. |
required |
gm
|
float
|
The standard gravitational parameter of primary body in m³/s². |
required |
angle_format
|
AngleFormat
|
Return output in AngleFormat.DEGREES or AngleFormat.RADIANS. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The mean motion of the astronomical object in radians or degrees. |
mjd_to_datetime
builtin
¶
mjd_to_datetime(mjd: float) -> tuple
Convert a Modified Julian Date to the equivalent Gregorian calendar date.
Note: Due to the ambiguity of the nature of leap second insertion, this method should not be used if a specific behavior for leap second insertion is expected. This method treats leap seconds as if they don't exist.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mjd
|
float
|
Modified Julian date |
required |
Returns:
Name | Type | Description |
---|---|---|
tuple |
tuple
|
A tuple containing (year, month, day, hour, minute, second, nanosecond) |
norad_id_alpha5_to_numeric
builtin
¶
norad_id_alpha5_to_numeric(alpha5_id: str) -> int
Convert Alpha-5 NORAD ID to numeric format.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alpha5_id
|
str
|
Alpha-5 format ID (e.g., "A0001"). |
required |
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
Numeric NORAD ID. |
norad_id_numeric_to_alpha5
builtin
¶
norad_id_numeric_to_alpha5(norad_id: int) -> str
Convert numeric NORAD ID to Alpha-5 format.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
norad_id
|
int
|
Numeric NORAD ID (100000-339999). |
required |
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
Alpha-5 format ID (e.g., "A0001"). |
orbital_period
builtin
¶
orbital_period(a: float) -> float
Computes the orbital period of an object around Earth.
Uses rastro.constants.GM_EARTH as the standard gravitational parameter for the calculation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
float
|
The semi-major axis of the astronomical object in meters. |
required |
Returns:
Type | Description |
---|---|
float
|
The orbital period of the astronomical object in seconds. |
orbital_period_general
builtin
¶
orbital_period_general(a: float, gm: float) -> float
Computes the orbital period of an astronomical object around a general body.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
float
|
The semi-major axis of the astronomical object in meters. |
required |
gm
|
float
|
The standard gravitational parameter of primary body in m³/s². |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The orbital period of the astronomical object in seconds. |
parse_norad_id
builtin
¶
parse_norad_id(norad_str: str) -> int
Parse NORAD ID from string, handling both classic and Alpha-5 formats.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
norad_str
|
str
|
NORAD ID string from TLE. |
required |
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
Parsed numeric NORAD ID. |
periapsis_distance
builtin
¶
periapsis_distance(a: float, e: float) -> float
Calculate the distance of an object at its periapsis.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
float
|
The semi-major axis of the astronomical object in meters. |
required |
e
|
float
|
The eccentricity of the astronomical object's orbit (dimensionless). |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The distance of the object at periapsis in meters. |
periapsis_velocity
builtin
¶
periapsis_velocity(a: float, e: float, gm: float) -> float
Computes the periapsis velocity of an astronomical object around a general body.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
float
|
The semi-major axis of the astronomical object in meters. |
required |
e
|
float
|
The eccentricity of the astronomical object's orbit (dimensionless). |
required |
gm
|
float
|
The standard gravitational parameter of primary body in m³/s². |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The magnitude of velocity of the object at periapsis in m/s. |
perigee_velocity
builtin
¶
perigee_velocity(a: float, e: float) -> float
Computes the perigee velocity of an astronomical object around Earth.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
float
|
The semi-major axis of the astronomical object in meters. |
required |
e
|
float
|
The eccentricity of the astronomical object's orbit (dimensionless). |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The magnitude of velocity of the object at perigee in m/s. |
polar_motion
builtin
¶
polar_motion(epc: Epoch) -> np.ndarray
Computes the Earth rotation matrix transforming the TIRS
to the ITRF
reference
frame.
The function will utilize the global Earth orientation and loaded data to apply corrections to compute the polar motion correction based on empirical observations of polar motion drift.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
epc
|
Epoch
|
Epoch instant for computation of transformation matrix |
required |
Returns:
Type | Description |
---|---|
ndarray
|
3x3 rotation matrix transforming |
position_ecef_to_eci
builtin
¶
position_ecef_to_eci(epc: Epoch, x: ndarray) -> np.ndarray
Transforms a position vector from the Earth Centered Earth Fixed (ECEF
/ITRF
)
frame to the Earth Centered Inertial (ECI
/GCRF
) frame.
Applies the full IAU 2006/2000A
transformation including bias, precession,
nutation, Earth rotation, and polar motion corrections using global Earth
orientation parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
epc
|
Epoch
|
Epoch instant for the transformation |
required |
x
|
ndarray
|
Position vector in |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Position vector in |
position_ecef_to_geocentric
builtin
¶
position_ecef_to_geocentric(x_ecef: ndarray, angle_format: AngleFormat) -> np.ndarray
Convert ECEF
Cartesian position to geocentric coordinates.
Transforms a position from Earth-Centered Earth-Fixed (ECEF
) Cartesian coordinates
to geocentric spherical coordinates (latitude, longitude, radius).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x_ecef
|
ndarray
|
|
required |
angle_format
|
AngleFormat
|
Angle format for output angular coordinates ( |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Geocentric position |
position_ecef_to_geodetic
builtin
¶
position_ecef_to_geodetic(x_ecef: ndarray, angle_format: AngleFormat) -> np.ndarray
Convert ECEF
Cartesian position to geodetic coordinates.
Transforms a position from Earth-Centered Earth-Fixed (ECEF
) Cartesian coordinates
to geodetic coordinates (latitude, longitude, altitude) using the WGS84
ellipsoid model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x_ecef
|
ndarray
|
|
required |
angle_format
|
AngleFormat
|
Angle format for output angular coordinates ( |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Geodetic position |
position_eci_to_ecef
builtin
¶
position_eci_to_ecef(epc: Epoch, x: ndarray) -> np.ndarray
Transforms a position vector from the Earth Centered Inertial (ECI
/GCRF
) frame
to the Earth Centered Earth Fixed (ECEF
/ITRF
) frame.
Applies the full IAU 2006/2000A
transformation including bias, precession,
nutation, Earth rotation, and polar motion corrections using global Earth
orientation parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
epc
|
Epoch
|
Epoch instant for the transformation |
required |
x
|
ndarray
|
Position vector in |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Position vector in |
position_enz_to_azel
builtin
¶
position_enz_to_azel(x_enz: ndarray, angle_format: AngleFormat) -> np.ndarray
Convert position from East-North-Up (ENZ
) frame to azimuth-elevation-range.
Transforms a position from the local East-North-Up (ENZ
) topocentric frame to
azimuth-elevation-range spherical coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x_enz
|
ndarray
|
Position in |
required |
angle_format
|
AngleFormat
|
Angle format for output angular coordinates ( |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Azimuth-elevation-range |
position_geocentric_to_ecef
builtin
¶
position_geocentric_to_ecef(x_geoc: ndarray, angle_format: AngleFormat) -> np.ndarray
Convert geocentric position to ECEF
Cartesian coordinates.
Transforms a position from geocentric spherical coordinates (latitude, longitude, radius)
to Earth-Centered Earth-Fixed (ECEF
) Cartesian coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x_geoc
|
ndarray
|
Geocentric position |
required |
angle_format
|
AngleFormat
|
Angle format for input angular coordinates ( |
required |
Returns:
Type | Description |
---|---|
ndarray
|
|
position_geodetic_to_ecef
builtin
¶
position_geodetic_to_ecef(x_geod: ndarray, angle_format: AngleFormat) -> np.ndarray
Convert geodetic position to ECEF
Cartesian coordinates.
Transforms a position from geodetic coordinates (latitude, longitude, altitude) using
the WGS84
ellipsoid model to Earth-Centered Earth-Fixed (ECEF
) Cartesian coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x_geod
|
ndarray
|
Geodetic position |
required |
angle_format
|
AngleFormat
|
Angle format for input angular coordinates ( |
required |
Returns:
Type | Description |
---|---|
ndarray
|
|
position_sez_to_azel
builtin
¶
position_sez_to_azel(x_sez: ndarray, angle_format: AngleFormat) -> np.ndarray
Convert position from South-East-Zenith (SEZ
) frame to azimuth-elevation-range.
Transforms a position from the local South-East-Zenith (SEZ
) topocentric frame to
azimuth-elevation-range spherical coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x_sez
|
ndarray
|
Position in |
required |
angle_format
|
AngleFormat
|
Angle format for output angular coordinates ( |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Azimuth-elevation-range |
relative_position_ecef_to_enz
builtin
¶
relative_position_ecef_to_enz(location_ecef: ndarray, r_ecef: ndarray, conversion_type: str) -> np.ndarray
Convert relative position from ECEF
to East-North-Up (ENZ
) frame.
Transforms a relative position vector from Earth-Centered Earth-Fixed (ECEF
) coordinates
to the local East-North-Up (ENZ
) topocentric frame at the specified location.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
location_ecef
|
ndarray
|
Reference location in |
required |
r_ecef
|
ndarray
|
Position vector in |
required |
conversion_type
|
str
|
Type of ellipsoidal conversion, either |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Relative position in |
relative_position_ecef_to_sez
builtin
¶
relative_position_ecef_to_sez(location_ecef: ndarray, r_ecef: ndarray, conversion_type: str) -> np.ndarray
Convert relative position from ECEF
to South-East-Zenith (SEZ
) frame.
Transforms a relative position vector from Earth-Centered Earth-Fixed (ECEF
) coordinates
to the local South-East-Zenith (SEZ
) topocentric frame at the specified location.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
location_ecef
|
ndarray
|
Reference location in |
required |
r_ecef
|
ndarray
|
Position vector in |
required |
conversion_type
|
str
|
Type of ellipsoidal conversion, either |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Relative position in |
relative_position_enz_to_ecef
builtin
¶
relative_position_enz_to_ecef(location_ecef: ndarray, r_enz: ndarray, conversion_type: str) -> np.ndarray
Convert relative position from East-North-Up (ENZ
) frame to ECEF
.
Transforms a relative position vector from the local East-North-Up (ENZ
) topocentric
frame to Earth-Centered Earth-Fixed (ECEF
) coordinates at the specified location.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
location_ecef
|
ndarray
|
Reference location in |
required |
r_enz
|
ndarray
|
Relative position in |
required |
conversion_type
|
str
|
Type of ellipsoidal conversion, either |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Position vector in |
relative_position_sez_to_ecef
builtin
¶
relative_position_sez_to_ecef(location_ecef: ndarray, x_sez: ndarray, conversion_type: str) -> np.ndarray
Convert relative position from South-East-Zenith (SEZ
) frame to ECEF
.
Transforms a relative position vector from the local South-East-Zenith (SEZ
) topocentric
frame to Earth-Centered Earth-Fixed (ECEF
) coordinates at the specified location.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
location_ecef
|
ndarray
|
Reference location in |
required |
x_sez
|
ndarray
|
Relative position in |
required |
conversion_type
|
str
|
Type of ellipsoidal conversion, either |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Position vector in |
rotation_ecef_to_eci
builtin
¶
rotation_ecef_to_eci(epc: Epoch) -> np.ndarray
Computes the combined rotation matrix from the Earth-fixed to the inertial reference frame. Applies corrections for bias, precession, nutation, Earth-rotation, and polar motion.
The transformation is accomplished using the IAU 2006/2000A
, CIO
-based
theory using classical angles. The method as described in section 5.5 of
the SOFA C transformation cookbook.
The function will utilize the global Earth orientation and loaded data to
apply corrections for Celestial Intermidate Pole (CIP
) and polar motion drift
derived from empirical observations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
epc
|
Epoch
|
Epoch instant for computation of transformation matrix |
required |
Returns:
Type | Description |
---|---|
ndarray
|
3x3 rotation matrix transforming |
rotation_eci_to_ecef
builtin
¶
rotation_eci_to_ecef(epc: Epoch) -> np.ndarray
Computes the combined rotation matrix from the inertial to the Earth-fixed reference frame. Applies corrections for bias, precession, nutation, Earth-rotation, and polar motion.
The transformation is accomplished using the IAU 2006/2000A
, CIO
-based
theory using classical angles. The method as described in section 5.5 of
the SOFA C transformation cookbook.
The function will utilize the global Earth orientation and loaded data to
apply corrections for Celestial Intermidate Pole (CIP
) and polar motion drift
derived from empirical observations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
epc
|
Epoch
|
Epoch instant for computation of transformation matrix |
required |
Returns:
Type | Description |
---|---|
ndarray
|
3x3 rotation matrix transforming |
rotation_ellipsoid_to_enz
builtin
¶
rotation_ellipsoid_to_enz(x_ellipsoid: ndarray, angle_format: AngleFormat) -> np.ndarray
Compute rotation matrix from ellipsoidal coordinates to East-North-Up (ENZ
) frame.
Calculates the rotation matrix that transforms vectors from an ellipsoidal coordinate
frame (geocentric or geodetic) to the local East-North-Up (ENZ
) topocentric frame at
the specified location.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x_ellipsoid
|
ndarray
|
Ellipsoidal position |
required |
angle_format
|
AngleFormat
|
Angle format for input angular coordinates ( |
required |
Returns:
Type | Description |
---|---|
ndarray
|
3x3 rotation matrix from ellipsoidal frame to |
rotation_ellipsoid_to_sez
builtin
¶
rotation_ellipsoid_to_sez(x_ellipsoid: ndarray, angle_format: AngleFormat) -> np.ndarray
Compute rotation matrix from ellipsoidal coordinates to South-East-Zenith (SEZ
) frame.
Calculates the rotation matrix that transforms vectors from an ellipsoidal coordinate
frame (geocentric or geodetic) to the local South-East-Zenith (SEZ
) topocentric frame
at the specified location.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x_ellipsoid
|
ndarray
|
Ellipsoidal position |
required |
angle_format
|
AngleFormat
|
Angle format for input angular coordinates ( |
required |
Returns:
Type | Description |
---|---|
ndarray
|
3x3 rotation matrix from ellipsoidal frame to |
rotation_enz_to_ellipsoid
builtin
¶
rotation_enz_to_ellipsoid(x_ellipsoid: ndarray, angle_format: AngleFormat) -> np.ndarray
Compute rotation matrix from East-North-Up (ENZ
) frame to ellipsoidal coordinates.
Calculates the rotation matrix that transforms vectors from the local East-North-Up
(ENZ
) topocentric frame to an ellipsoidal coordinate frame (geocentric or geodetic)
at the specified location.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x_ellipsoid
|
ndarray
|
Ellipsoidal position |
required |
angle_format
|
AngleFormat
|
Angle format for input angular coordinates ( |
required |
Returns:
Type | Description |
---|---|
ndarray
|
3x3 rotation matrix from |
rotation_sez_to_ellipsoid
builtin
¶
rotation_sez_to_ellipsoid(x_ellipsoid: ndarray, angle_format: AngleFormat) -> np.ndarray
Compute rotation matrix from South-East-Zenith (SEZ
) frame to ellipsoidal coordinates.
Calculates the rotation matrix that transforms vectors from the local South-East-Zenith
(SEZ
) topocentric frame to an ellipsoidal coordinate frame (geocentric or geodetic)
at the specified location.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x_ellipsoid
|
ndarray
|
Ellipsoidal position |
required |
angle_format
|
AngleFormat
|
Angle format for input angular coordinates ( |
required |
Returns:
Type | Description |
---|---|
ndarray
|
3x3 rotation matrix from |
semimajor_axis
builtin
¶
semimajor_axis(n: float, angle_format: AngleFormat) -> float
Computes the semi-major axis of an astronomical object from Earth given the object's mean motion.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n
|
float
|
The mean motion of the astronomical object in radians or degrees. |
required |
angle_format
|
AngleFormat
|
Interpret mean motion as AngleFormat.DEGREES or AngleFormat.RADIANS. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The semi-major axis of the astronomical object in meters. |
semimajor_axis_from_orbital_period
builtin
¶
semimajor_axis_from_orbital_period(period: float) -> float
Computes the semi-major axis from orbital period around Earth.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
period
|
float
|
The orbital period in seconds. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The semi-major axis in meters. |
semimajor_axis_from_orbital_period_general
builtin
¶
semimajor_axis_from_orbital_period_general(period: float, gm: float) -> float
Computes the semi-major axis from orbital period for a general body.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
period
|
float
|
The orbital period in seconds. |
required |
gm
|
float
|
The standard gravitational parameter of primary body in m³/s². |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The semi-major axis in meters. |
semimajor_axis_general
builtin
¶
semimajor_axis_general(n: float, gm: float, angle_format: AngleFormat) -> float
Computes the semi-major axis of an astronomical object from a general body given the object's mean motion.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n
|
float
|
The mean motion of the astronomical object in radians or degrees. |
required |
gm
|
float
|
The standard gravitational parameter of primary body in m³/s². |
required |
angle_format
|
AngleFormat
|
Interpret mean motion as AngleFormat.DEGREES or AngleFormat.RADIANS. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The semi-major axis of the astronomical object in meters. |
set_global_eop_provider_from_file_provider
builtin
¶
set_global_eop_provider_from_file_provider(provider: FileEOPProvider) -> None
Set the global EOP provider using a file-based provider.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
provider
|
FileEOPProvider
|
File-based EOP provider to set globally |
required |
set_global_eop_provider_from_static_provider
builtin
¶
set_global_eop_provider_from_static_provider(provider: StaticEOPProvider) -> None
Set the global EOP provider using a static provider.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
provider
|
StaticEOPProvider
|
Static EOP provider to set globally |
required |
state_cartesian_to_osculating
builtin
¶
state_cartesian_to_osculating(x_cart: ndarray, angle_format: AngleFormat) -> np.ndarray
Convert Cartesian state to osculating orbital elements.
Transforms a state vector from Cartesian position and velocity coordinates to osculating Keplerian orbital elements.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x_cart
|
ndarray
|
Cartesian state |
required |
angle_format
|
AngleFormat
|
Angle format for output angular elements ( |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Osculating orbital elements |
state_ecef_to_eci
builtin
¶
state_ecef_to_eci(epc: Epoch, x_ecef: ndarray) -> np.ndarray
Transforms a state vector (position and velocity) from the Earth Centered
Earth Fixed (ECEF
/ITRF
) frame to the Earth Centered Inertial (ECI
/GCRF
) frame.
Applies the full IAU 2006/2000A
transformation including bias, precession,
nutation, Earth rotation, and polar motion corrections using global Earth
orientation parameters. The velocity transformation accounts for the Earth's
rotation rate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
epc
|
Epoch
|
Epoch instant for the transformation |
required |
x_ecef
|
ndarray
|
State vector in |
required |
Returns:
Type | Description |
---|---|
ndarray
|
State vector in |
state_eci_to_ecef
builtin
¶
state_eci_to_ecef(epc: Epoch, x_eci: ndarray) -> np.ndarray
Transforms a state vector (position and velocity) from the Earth Centered
Inertial (ECI
/GCRF
) frame to the Earth Centered Earth Fixed (ECEF
/ITRF
) frame.
Applies the full IAU 2006/2000A
transformation including bias, precession,
nutation, Earth rotation, and polar motion corrections using global Earth
orientation parameters. The velocity transformation accounts for the Earth's
rotation rate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
epc
|
Epoch
|
Epoch instant for the transformation |
required |
x_eci
|
ndarray
|
State vector in |
required |
Returns:
Type | Description |
---|---|
ndarray
|
State vector in |
state_osculating_to_cartesian
builtin
¶
state_osculating_to_cartesian(x_oe: ndarray, angle_format: AngleFormat) -> np.ndarray
Convert osculating orbital elements to Cartesian state.
Transforms a state vector from osculating Keplerian orbital elements to Cartesian position and velocity coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x_oe
|
ndarray
|
Osculating orbital elements |
required |
angle_format
|
AngleFormat
|
Angle format for angular elements ( |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Cartesian state |
sun_synchronous_inclination
builtin
¶
sun_synchronous_inclination(a: float, e: float, angle_format: AngleFormat) -> float
Computes the inclination for a Sun-synchronous orbit around Earth based on the J2 gravitational perturbation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
float
|
The semi-major axis of the astronomical object in meters. |
required |
e
|
float
|
The eccentricity of the astronomical object's orbit (dimensionless). |
required |
angle_format
|
AngleFormat
|
Return output in AngleFormat.DEGREES or AngleFormat.RADIANS. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
Inclination for a Sun synchronous orbit in degrees or radians. |
time_system_offset_for_datetime
builtin
¶
time_system_offset_for_datetime(year: int, month: int, day: int, hour: int, minute: int, second: float, nanosecond: float, time_system_src: TimeSystem, time_system_dst: TimeSystem) -> float
Calculate the offset between two time systems for a given Gregorian calendar date.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
year
|
int
|
Year |
required |
month
|
int
|
Month (1-12) |
required |
day
|
int
|
Day of month (1-31) |
required |
hour
|
int
|
Hour (0-23) |
required |
minute
|
int
|
Minute (0-59) |
required |
second
|
float
|
Second with fractional part |
required |
nanosecond
|
float
|
Nanosecond component |
required |
time_system_src
|
TimeSystem
|
Source time system |
required |
time_system_dst
|
TimeSystem
|
Destination time system |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
Offset between time systems in seconds |
time_system_offset_for_jd
builtin
¶
time_system_offset_for_jd(jd: float, time_system_src: TimeSystem, time_system_dst: TimeSystem) -> float
Calculate the offset between two time systems for a given Julian Date.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jd
|
float
|
Julian date |
required |
time_system_src
|
TimeSystem
|
Source time system |
required |
time_system_dst
|
TimeSystem
|
Destination time system |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
Offset between time systems in seconds |
time_system_offset_for_mjd
builtin
¶
time_system_offset_for_mjd(mjd: float, time_system_src: TimeSystem, time_system_dst: TimeSystem) -> float
Calculate the offset between two time systems for a given Modified Julian Date.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mjd
|
float
|
Modified Julian date |
required |
time_system_src
|
TimeSystem
|
Source time system |
required |
time_system_dst
|
TimeSystem
|
Destination time system |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
Offset between time systems in seconds |
validate_tle_line
builtin
¶
validate_tle_line(line: str) -> bool
Validate single TLE line.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
str
|
TLE line to validate. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if the line is valid. |
validate_tle_lines
builtin
¶
validate_tle_lines(line1: str, line2: str) -> bool
Validate TLE lines.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line1
|
str
|
First line of TLE data. |
required |
line2
|
str
|
Second line of TLE data. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if both lines are valid. |