I tried to use the pyephem library to get the lat, long of a particular satellite. However, when I compare this to what was outputted by Orbitron, the latitude was different. Why is this different?
Output from my code: Lat: -50.675605 Lon: -153.489527
Orbitron: Lat : 50.8527ー S Lon: 153.4899ー W
Here is my code:
import numpy as np
import ephem
import datetime
import functions
from datetime import timedelta, datetime
from math import degrees
name_ = "SATELLITE"
tle1 = "1 41463U 98067HT 16264.56991668 .00008327 00000-0 11928-3 0 9991"
tle2 = "2 41463 51.6441 300.8543 0000382 62.9562 67.6735 15.57105765 22715"
sat = ephem.readtle(name_,tle1,tle2)
strDate = "2016-09-21 10:05:47"
date_obj = datetime.strptime(strDate,'%Y-%m-%d %H:%M:%S')
date_ = date_obj + timedelta(hours=-9)
sat.compute(date_)
print("longitude: %f - latitude: %f" % (degrees(sat.sublong), degrees(sat.sublat)))