Open
Description
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 date
to 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
theta = 2 * np.arctan(np.sqrt((1 + e) / (1 - e)) * np.tan(E / 2))
return theta`
Metadata
Metadata
Assignees
Labels
No labels