Skip to content

(ANSWERED) Calculate phase angle for a satellite #607

Answered by JoshPaterson
Space-A asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! If I understand correctly you are looking for the angle between the sun and the earth as observed by a satellite. Here is an example which does that for the International Space Station using the separation_from method. I hope it helps!

 from skyfield.api import load

ts = load.timescale()
eph = load('de421.bsp')
earth = eph['earth']
sun = eph['sun']

stations_url = 'http://celestrak.com/NORAD/elements/stations.txt'
satellites = load.tle_file(stations_url)

by_name = {sat.name: sat for sat in satellites}
ISS = earth + by_name['ISS (ZARYA)']

t = ts.utc(2021, 6, 1)

sun_position = ISS.at(t).observe(sun)
earth_position = ISS.at(t).observe(earth)

phase_angle = sun_position.separation_fro…

Replies: 5 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@Space-A
Comment options

@yoannq
Comment options

@brandon-rhodes
Comment options

Answer selected by Space-A
Comment options

You must be logged in to vote
1 reply
@brandon-rhodes
Comment options

Comment options

You must be logged in to vote
1 reply
@brandon-rhodes
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants