Skip to content

how to implement satellite.at(time).is_sunlit(TLE)? #744

Answered by dododo42
dododo42 asked this question in Q&A
Discussion options

You must be logged in to vote

I just realised that is_sunlit(ephemeris) refers to the ephemeris of the Sun.
The following code should return the right answer:

from skyfield.api import EarthSatellite, load
ts = load.timescale()
satellite = EarthSatellite(line1, line2, name, ts)
t = ts.utc(utc_date)
eph = load('de421.bsp')
sunlit = satellite.at(t).is_sunlit(eph)

Hoping I have not wasted anyone's time.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@brandon-rhodes
Comment options

@dododo42
Comment options

Answer selected by brandon-rhodes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants