auromat.coordinates.ephem module

class auromat.coordinates.ephem.EphemerisCalculator(tleFilePath)[source]

Calculates J2000 positions using a set of TLEs for a single satellite. TLEs are read once into a string to serve as a cache.

Use the spacetrack module for downloading TLE data.

Note that this module assumes continuous TLE data as created by the spacetrack module.

Example:

from datetime import datetime
from auromat.coordinates.spacetrack import Spacetrack
from auromat.coordinates.ephem import EphemerisCalculator
path = 'iss_tles.txt'
st = Spacetrack('user', 'pass')
st.updateTLEs(25544, path)
iss = EphemerisCalculator(path)
j2000_xyz = iss(datetime(2012,1,1,12,30,0))
print(j2000_xyz)
Parameters:tleFilePath (string) – path to file containing TLE sets
contains(date)[source]

Return whether firstEpoch <= date <= lastEpoch holds.

firstEpoch

The earliest epoch in the TLE file.

Return type:datetime.datetime
getPosition(date)[source]

Return the J2000 position of the space object for the given date.

Note that you can also use the call operator:

iss = EphemerisCalculator(path)
iss(date)
Return type:ndarray of xyz J2000 coordinates in km
getTLE(date)[source]
lastEpoch

The latest epoch in the TLE file.

Return type:datetime.datetime
noradId

The NORAD ID as read from the first TLE.

Return type:str