You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am looking at what the best way to see is multiple targets are behind the Earth, for a satellite, at multiple times. I set up my satellite and stars as follows
from skyfield.api import load, wgs84
from astropy.time import Time
from skyfield.api import Angle
from skyfield.api import Star
stations_url = "http://celestrak.org/NORAD/elements/stations.txt"
satellites = load.tle_file(stations_url)
print("Loaded", len(satellites), "satellites")
by_name = {sat.name: sat for sat in satellites}
ts = load.timescale()
eph = load("de421.bsp")
satellite = by_name["ISS (ZARYA)"]
two_hours = ts.utc(2014, 1, 20, 0, range(0, 120, 20))
stars = Star(
ra=Angle(degrees=[180, 0.0]),
dec=Angle(degrees=[50, -50.0]),
)
I can see if both stars are blocked at a single time using
p = (earth + satellite).at(two_hours[0]).observe(stars).apparent()
sunlit = p.is_behind_earth()
Or I can change to a single star and do all the times like this
star = Star(
ra=Angle(degrees=180),
dec=Angle(degrees=50),
)
p = (earth + satellite).at(two_hours).observe(star).apparent()
sunlit = p.is_behind_earth()
But trying to do both starts at all times results in an error i.e.
p = (earth + satellite).at(two_hours).observe(stars).apparent()
sunlit = p.is_behind_earth()
What is the most efficient way to do all the times and all the targets? Is it to loop through the targets? Thanks in advanced!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I am looking at what the best way to see is multiple targets are behind the Earth, for a satellite, at multiple times. I set up my satellite and stars as follows
I can see if both stars are blocked at a single time using
Or I can change to a single star and do all the times like this
But trying to do both starts at all times results in an error i.e.
What is the most efficient way to do all the times and all the targets? Is it to loop through the targets? Thanks in advanced!
Beta Was this translation helpful? Give feedback.
All reactions