tleHandling
- class tleHandling.TleData(oe: ClassicElements, tleEpoch: datetime, satName: str = 'BSK-Sat-00', noradID: str = '00000', classification: str = 'Unknown', revAtEpoch: int = 0.0, propagator: str = '0', elemSetNo: int = 999, nDot: float = 0.0, nDotDot: float = 0.0, bStar: float = 0.0, launchDate: datetime = None, launchNo: int = 1, pol: str = 'A')[source]
Bases:
object
Data class to hold TLE data (orbit elements) and metadata.
- tleHandling.generateTle(tleData: TleData) str [source]
Generate TLE based on satellite orbit_n data for one satellite. This function allows to generate a TLE for one satellite at a time! TLEs for constellations must be concanatenated outside of this function. :param orbitElements: Classical orbital elements of the satellite [om.ClassicElements object] :param satelliteName: Name of the satellite (optional, default: “BSK-Sat-00”) [string, <= 24 char] :param launchYear_dt: Launch date of the satellite (optional, default: current year) [datetime object] :param launch_Noyear: Launch number of the year (optional, default: 1) [int] :param NORAD_ID: NORAD ID (5 digits) of the satellite (optional, default: “00000”) [str, 5 char] :param classification: Satellite classification (U: Unclassified, C: Classified, S: Secret | default: “U”) [str, 1 char] :param PoL: Piece of the launch (optional, default: “A “) [str, 3 char] :param tleEpoch: Epoch of the TLE as datetime object (optional default: current UTC time) [datetime object] :param element_set_no: Element set number (optional, default: 999) [int] :param nDot: First derivative of mean motion (dn/dt) [float, rev/day^2] :param nDotDot: Second derivative of mean motion (d^2n/dt^2) [float, rev/day^3] :param BStar: B* drag term (optional, default: 0.0) [float, 1/Earth radii] :return: TLE string [str, 3 lines]
- tleHandling.satTle2elem(tle_path: str)[source]
Convert the TLEs of a constellation to classical orbital elements for each satellite.
- Parameters:
tle_path – path to a TLE with one or multiple satellites in either 2LE or 3LE format
- Returns:
elementsList: list of classical orbital elements for each satellite metadataList: list of dictionaries containing TLE metadata for each satellite