While playing a bit with pyorbital
I noticed that the function get_lonlatalt()
does not seem to return a correct longitude value to me. So I have compared the returned Lon/Lat/Alt to other tracking software:
The returned Altitude and Latitude are spot on but the Longitude seems to be off (using the below code example the function returns about 15deg less than what the real position of the ISS is right now).
The below code prints the Lat/Lon/Alt of the ISS once per second to the console and can be used to compare the position to e.g. http://www.n2yo.com/?s=25544
Does anyone have any suggestions how to fix this/why this is happening ?
P.S. Unfortunately stackoverflow doesnt allow me to create the Tag "pyorbital"
before 1500 reputation..
from pyorbital.orbital import Orbital
from datetime import datetime
import time
tle_object_name = "ISS (ZARYA)"
sat = Orbital(tle_object_name) #Fetches TLE from the internet by itself
while True:
now = datetime.utcnow()
lon, lat, alt = sat.get_lonlatalt(now)
print "{} UTC at {}E, {}N, {}km".format(now, round(lon, 3), round(lat, 3), round(alt, 3))
time.sleep(1)