Skip to content
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

Inaccuracy in moon phase calculation #150

Open
str4w opened this issue Dec 22, 2020 · 1 comment
Open

Inaccuracy in moon phase calculation #150

str4w opened this issue Dec 22, 2020 · 1 comment

Comments

@str4w
Copy link

str4w commented Dec 22, 2020

There seems to be an inaccuracy of a few hours in the moon phase calculation. Unfortunately, this can cause the occurrence to switch from one day to the next fairly easily, which interferes with my use case.

Is an accuracy on the order of +/- 6 hours expected? If so, this is just a documentation problem. If not, I'll dig deeper.

Examples, comparing to the phase reported by the USNO
https://observablehq.com/@str4w/suncalc-test

+/- 15 minutes would probably be adequate for my use case.

@Artoria2e5
Copy link

Artoria2e5 commented Aug 23, 2021

The getMoonIllumination depends on the moon coords calculation, which might be the worst suspect here. https://www.aa.quae.nl/en/reken/hemelpositie.html#4 says:

The largest error in λ was 2.57 degrees (standard deviation 1.04 degrees), that in β 0.81 degrees (standard deviation 0.31 degrees), and that in 7645 km (standard deviation 3388 km).

These are quite a bit larger than the Sun approximations given above. Unfortunately I am too scatter-brained to do a differentiation and estimate how much time it takes for the moon to travel that much degrees to actually pin down the problem.

Anyways, see #102.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants