API Documentation¶
This parto of the documentation covers all the interfaces of tle
.
For guides on how to use them, pleas consult the tutorials.
TLE Classes¶
The library offers two classes to represent a single TLE.
There is the unitless version TLE
, whose attributes are expressed in the same units
that are used in the TLE format, and there is the unitful version TLEu
,
whose attributes are quantities (astropy.units.Quantity
), a type able to represent
a value with an associated unit taken from astropy.units
.
TLE-tools is a small library to work with two-line element set files.
-
class
tle.
TLE
(name, norad, classification, int_desig, epoch_year, epoch_day, dn_o2, ddn_o6, bstar, set_num, inc, raan, ecc, argp, M, n, rev_num)¶ Data class representing a single TLE.
A two-line element set (TLE) is a data format encoding a list of orbital elements of an Earth-orbiting object for a given point in time, the epoch.
All the attributes parsed from the TLE are expressed in the same units that are used in the TLE format.
Variables: - name (str) – name of the satellite
- norad (str) – NORAD catalog number (https://en.wikipedia.org/wiki/Satellite_Catalog_Number)
- classification (str) – ‘U’, ‘C’, ‘S’ for unclassified, classified, secret
- int_desig (str) – international designator (https://en.wikipedia.org/wiki/International_Designator)
- epoch_year (int) – year of the epoch
- epoch_day (float) – day of the year plus fraction of the day
- dn_o2 (float) – first time derivative of the mean motion divided by 2
- ddn_o6 (float) – second time derivative of the mean motion divided by 6
- bstar (float) – BSTAR coefficient (https://en.wikipedia.org/wiki/BSTAR)
- set_num (int) – element set number
- inc (float) – inclination
- raan (float) – right ascension of the ascending node
- ecc (float) – eccentricity
- argp (float) – argument of perigee
- M (float) – mean anomaly
- n (float) – mean motion
- rev_num (int) – revolution number
-
class
tle.
TLEu
(name, norad, classification, int_desig, epoch_year, epoch_day, dn_o2, ddn_o6, bstar, set_num, inc, raan, ecc, argp, M, n, rev_num)¶ Unitful data class representing a single TLE.
This is a subclass of
TLE
, so refer to that class for a description of the attributes and properties.The only difference here is that all the attributes are quantities (
astropy.units.Quantity
), a type able to represent a value with an associated unit taken fromastropy.units
.
Module functions¶
-
tle.
load_dataframe
(filename, *, epoch=True)¶ Load multiple TLEs from one or more files and return a
pandas.DataFrame
.
Convenience functions¶
-
tle.
partition
(iterable, n)¶ Partition an iterable into tuples.
The iterable iterable is progressively consumed n items at a time in order to produce tuples of length n.
Parameters: - iterable (iterable) – The iterable to partition.
- n (int) – Length of the desired tuples.
Returns: A generator which yields subsequent n-uples from the original iterable.
-
tle.
add_epoch
(df)¶ Add a column
'epoch'
to a dataframe.df must have columns
'epoch_year'
and'epoch_day'
, from which the column'epoch'
is computed.Parameters: df (pandas.DataFrame) – pandas.DataFrame
instance to modify.