util.spacetrackFunctions to fetch TLEs from Spacetrack.
Attributes:
MAX_RETRIES: number of times to try and reach Spacetrack.updateTLEsupdateTLEs(
sat_id_list: list[int],
user: None | str = None,
passwd: None | str = None
) → list[int]
Fetch most recent TLE for satcat IDs from spacetrack.
Fetch most recent TLEs for provided list of satcat IDs, and append to file.
If no TLE file yet exists, will download all historical TLEs Will try MAX_RETRIES before raising a TimeoutError
Args:
sat_id_list: list of satcat ids to fetchuser: [Optional] overriding spacetrack username to usepasswd: [Optional] overriding spacetrack password to useReturns:
list: list of satcat ids successfully fetchedRaises: TimeoutError
getTLEFilePathgetTLEFilePath(sat_id: int) → Path
Gives path to file where spacetrack TLE is stored.
Spacetrack TLEs are stored in {satcadID}.tle
Args:
sat_id: satcat IDReturns: path to file
getStoredEpochsgetStoredEpochs(sat_id: int) → None | tuple[datetime, datetime | None]
Return the start and end epoch for {sat_id}.tle .
Args:
sat_id: satcat id to checkReturns: (first epoch datetime, last epoch datetime) None if no spacetrack tle stored for sat_id
doCredentialsExistdoCredentialsExist() → bool
Checks if spacetrack credentials have been loaded into Spherapy.
Returns: bool:
InvalidCredentialsErrorError indicating invalid credentials used to access spacetrack.
__init____init__(message: str)