Closed yangyang-studio closed 1 month ago
It looks like you accidentally opened this issue in the wrong repository, since I don't see Skyfield among your imports? Please re-open it over in the ephem
repository. Here's the link:
https://github.com/brandon-rhodes/pyephem/issues
Also, if you use three back-ticks around your code, the GitHub will format it correctly, so that folks who want to help with your issue can read the code:
(I would move it myself, but GitHub doesn't allow issues to be moved between organizations. Thanks!)
import ephem import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap from datetime import datetime, timedelta
tle_start_link="""CSS
1 48274U 21035A 24119.20746383 .00055703 00000-0 60539-3 0 9992 2 48274 41.4693 28.4046 0003840 264.5634 95.4767 15.62582751171271"""
year, doy = 2022, 92.64473324
doy = 8/24
dt0 = datetime(year, 1, 1) + timedelta(days=doy)
dt0 = datetime(2024, 5, 20,14,46)
dt0 = datetime.now()
dt0 = datetime.now()+ timedelta(days=doy) time_list = [(dt0 + timedelta(hours=i/60)) for i in range(0,60*2)]
m = Basemap() m.drawcoastlines()
tle0, tle1, tle2 = tle_start_link.split("\n") satellite = ephem.readtle(tle0, tle1, tle2) for dt in time_list: item = dt.strftime("%Y/%m/%d %H:%M:%S") satellite.compute(f'{item}') latitude = satellite.sublat / ephem.degree longitude = satellite.sublong / ephem.degree x1,y1 = m(longitude, latitude) m.plot(x1, y1, "r.", markersize=1)
plt.savefig('out.png',dpi=500) plt.show()
The generated satellite trajectory is quite different from the facts. How to adjust it?![mmexport1716187953789](https://github.com/skyfielders/python-skyfield/assets/84533790/3dbe3a18-52dc-4d2f-9379-f2bf9c3849c1)
Software diagram:![Screenshot_2024-05-20-14-51-19-23_7e775883f61c9a1dada066700d5a3400](https://github.com/skyfielders/python-skyfield/assets/84533790/1a820463-cfb0-4fdf-99b3-cd628045b614)
look forward toLooking forward to your reply, thank you!