1

I'm trying to calculate the passes of a number of space objects from CelesTrak TLE Elements starting with the ISS because I can test it against the values from Spot The Station. So I have start with setting up the observer:

self.home = ephem.Observer()
self.home.lat = '51.45'
self.home.lon = '-2.58'
self.elevation = 134.69

and I'm using this function to calculate the passes etc

    def nextPass(self,tle):
      spob = ephem.readtle(tle[0],tle[1],tle[2])
      spob.compute(self.home)
      print('\n\n%s: altitude %4.1f deg, azimuth %5.1f deg' % (spob.name, self.deg2rad(spob.alt), self.deg2rad(spob.az) ) )
      self.home.date = datetime.utcnow()
      info = self.home.next_pass(spob)
      print("%s = Rise time: %s azimuth: %s" % (self.home.date,info[0], info[1]))

and deg2rad does what it says on the tin!

    def deg2rad(self,radians):
      return radians * (180.0 / math.pi)

The TLE retrieved today (28th Jan) from https://celestrak.org/NORAD/elements/ is

isstle = ['ISS (ZARYA)             ',
  '1 25544U 98067A   16028.60081312  .00014289  00000-0  21385-3 0  9994',
  '2 25544  51.6413  39.1283 0006529  51.2720 308.9374 15.54305299983116',
]

Currently my output is

ISS (ZARYA): altitude -68.0 deg, azimuth 241.6 deg
2016/1/28 20:14:11 = Rise time: 2016/1/28 20:46:11 azimuth: 203:45:42.0

My question is if i run this at 2016/1/28 20:14:11 why am I not getting the same as Spot The Station which currently give as the next possible sighting:

Tue Feb 2, 7:38 PM  < 1 min 12° 10° above SSW   12° above SSW 

I note that the altitude is negative and I would expect it to positive if it was visible but the next reported rise time is in February?

Community
  • 1
  • 1
Byte Insight
  • 745
  • 1
  • 6
  • 17
  • We need two more bits of information to be able to run your program and experiment with the results for ourselves: (1) We need to know what time we can give PyEphem to get exactly these results out, and (2) We need to know what values Spot the Station was giving you so that we can compare them with the PyEphem ones. Thanks! – Brandon Rhodes Jan 28 '16 at 14:44
  • @BrandonRhodes, I have added the requested information but obviously its only valid for so long. The next date given by STS is 2nd Feb so any tests between now and then would be expected to give that date. I'm looking at http://space.stackexchange.com/questions/4339/calculating-which-satellite-passes-are-visible but still getting the same sorts of 'wrong' date! – Byte Insight Jan 29 '16 at 14:31

1 Answers1

0

The altitude you are printing is not the altitude of the moment of the next pass, because you are calling spob.compute(self.home) for whatever date and time happens to be the current value of self.home.date. If you want the altitude that you print to be the altitude of the next pass, instead of an arbitrary and likely-negative number, try using either the altitude value returned among the 6 return values of next_pass, or else be careful to set the self.home.date to a time and date when the satellite is above the horizon before calling the compute() method for the satellite.

Brandon Rhodes
  • 83,755
  • 16
  • 106
  • 147