In [73]:
import ephem
from datetime import timedelta, datetime
%matplotlib inline
import matplotlib.pyplot as plt
In [57]:
line1 = "FOXSI Equatorial"
line2 = "1 99999U 98067A 20153.00000000 -.13353261 00000-0 -55954-0 0 00003"
line3 = "2 99999 005.1544 359.0232 0044770 001.4952 359.8331 15.21843946000019"
foxsi = ephem.readtle(line1, line2, line3)
foxsi.compute('2016/3/23')
print('%s %s' % (foxsi.sublong, foxsi.sublat))
In [58]:
type(foxsi)
Out[58]:
In [59]:
line2[17:18]
Out[59]:
In [60]:
line2[20:32]
Out[60]:
In [61]:
line2[33:42]
Out[61]:
In [62]:
foxsi.sublat
Out[62]:
In [63]:
foxsi.elevation
Out[63]:
In [83]:
launch_time = datetime(2020, 1, 1)
times = [launch_time + timedelta(days=d) for d in range(1,600)]
elevation = []
for d in times:
foxsi.compute(d)
elevation.append(foxsi.elevation)
In [84]:
plt.figure()
plt.plot(times, elevation)
Out[84]:
In [78]:
np.average(elevation)
Out[78]:
In [ ]: