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 Positions are Off #102
Comments
Playing a bit with the values… Looks like position of moon and sun will match ~2 hours earlier: ...
const dateTime = new Date("2017-08-21T13:25:00-05:00");
... But the values are still way off to the original. |
Also test this in your example |
@aemkei hey, I don't have enough bandwidth to look into the mismatches now, but I'd suggest using Meeus for precision. Meeus formulas are known to be more precise than what I've used — in fact I even started poking around rewriting this library with these formulas (see |
Okay, thanks for the comment! Switching to Meeus was not that hard because the interface is quite similar. I still prefer the structure and source of Suncalc and will definitely come back once that formulas were updated. |
I really love this library!
Unfortunately the
#getMoonPosition
method is returning wrong values.Note: I'd love to use it for some eclipse visualizations, but so fare I couldn't get the right values.
Take Hopkinsville as an example (the point with the maximum eclipse): https://www.timeanddate.com/eclipse/in/usa/hopkinsville?iso=20170821
The moon and sun position should both be 64° (altitude) and 198° (azimuth).
These are also the values calculated at suncalc.org and mooncalc.org.
But If you pass these values to suncalc.js, we got this:
Logs:
The text was updated successfully, but these errors were encountered: