# Path: skyfield/api.py
# N = E = +1.0
# S = W = -1.0
# 
# Path: skyfield/api.py
# N = E = +1.0
# S = W = -1.0


from skyfield import api
from skyfield.api import load
"""Verdict: light-time delay from the Sun can be neglected in is_sunlit()!

For the Sun's position from Earth, does calling observe() really make
enough difference to justify the expense?  Here we take two approaches
to answering the question: we compare the difference every day over 40
years, and then we do a back-of-the-envelope estimate of how big we
might have expected the effect to be.  The two approaches agree!  The
maximum difference is around 10 mas.

What difference does that make for a satellite?  Let's take the ISS.
With its orbital period of 92 minutes, it sees the Earth swing in a full
circle around the sky in that amount of time.  That's 360/90 = 4 degrees
per minute (!) = 240 arcseconds per second.  At that speed, a difference
of 10 mas in the Sun's position would at most hasten or delay the moment
of sunrise for the ISS by 40 microseconds, which is far below the
accuracy of TLE position predictions and can thus be safely incurred.

"""


# Path: skyfield/api.py
# N = E = +1.0
# S = W = -1.0
# 
# Path: skyfield/api.py
# N = E = +1.0
# S = W = -1.0


# Path: design/satellite_is_sunlit.py
from skyfield import api
from skyfield.api import load

"""Verdict: light-time delay from the Sun can be neglected in is_sunlit()!

For the Sun's position from Earth, does calling observe() really make
enough difference to justify the expense?  Here we take two approaches
to answering the question: we compare the difference every day over 40
years, and then we do a back-of-the-envelope estimate of how big we
might have expected the effect to be.  The two approaches agree!  The
maximum difference is around 10 mas.

What difference does that make for a satellite?  Let's take the ISS.
With its orbital period of 92 minutes, it sees the Earth swing in a full
circle around the sky in that amount of time.  That's 360/90 = 4 degrees
per minute (!) = 240 arcseconds per second.  At that speed, a difference
of 10 mas in the Sun's position would at most hasten or delay the moment
of sunrise for the ISS by 40 microseconds, which is far below the
accuracy of TLE position predictions and can thus be safely incurred.

"""


ts = load.timescale()