skyfielders / python-skyfield

Elegant astronomy for Python
MIT License
1.4k stars 211 forks source link

ground track calculation #708

Closed abdalla440 closed 2 years ago

abdalla440 commented 2 years ago

I'm trying to calculate the ground track of an earth-orbiting satellite (Longitude, latitude) I found this handy way on the documentation but it's good when trying to find a single point what if I'm trying to find long, lati for several position points like : [(4570.656235, 5340.971335, 111.914064), (4571.743399, 5339.872436, 119.374632), (4574.972561, 5336.538171, 141.755478),] is there any way to do so ??

`from skyfield.api import load, wgs84, EarthSatellite

ts = load.timescale() line1 = '1 25544U 98067A 22043.55847865 .00011256 00000-0 20676-3 0 9998' line2 = '2 25544 51.6418 233.7857 0005922 124.4921 351.1177 15.49734813325856' satellite = EarthSatellite(line1, line2, 'ISS (ZARYA)', ts) print(satellite)

t = ts.now() geocentric = satellite.at(t)

lat, lon = wgs84.latlon_of(geocentric) print('Latitude:', lat) print('Longitude:', lon)`

brandon-rhodes commented 2 years ago

@abdalla440 — What happens if you try providing a time that's an array? Does that return an array of positions? (Check the documentation for how time arrays work.)