-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moon Illumination Issue #17
Comments
Is this closed by #18 now? |
`def getMoonIllumination(date):
` Why do we keep the distance of the sun-earth constant? |
This library is a direct port of the upstream https://github.com/mourner/suncalc. It's been a while since I've worked with the code, so you'd have to look at the upstream version and ask questions there. |
Okay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here in function for Moon Illumination there should be some changes to be happen:
inc = atan(sdist * sin(phi), m['dist'] - sdist * cos(phi)),
# comma should not be there after calculating atansdist = 149597870.7
position of sun should not be constant for given dateto calculate the distance between sun and earth we should use true_anomaly of sun like below.
`def true_anomaly(days):
M = solar_mean_anomaly(days)
E = M
epsilon = 1e-6
max_iterations = 100
for _ in range(max_iterations):
E_new = E - (E - e * np.sin(E) - M) / (1 - e * np.cos(E))
if abs(E_new - E) < epsilon:
break
E = E_new
The text was updated successfully, but these errors were encountered: