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

is altitude wrong??? #3

Open
elazarrosenthal opened this issue Mar 17, 2021 · 2 comments
Open

is altitude wrong??? #3

elazarrosenthal opened this issue Mar 17, 2021 · 2 comments

Comments

@elazarrosenthal
Copy link

go has:

func altitude(H, phi, dec float64) float64 {
return m.Sin(m.Sin(phi) * m.Sin(dec) + m.Cos(phi) * m.Cos(dec) * m.Cos(H))
}

js has:
function altitude(H, phi, dec) { return asin(sin(phi) * sin(dec) + cos(phi) * cos(dec) * cos(H)); }

***************>>>>> asin vs sin
for MoonPosition js seem to be closer to other progs

@elazarrosenthal
Copy link
Author

Also is Azimuth off by 180 degrees
when I convert from radians to degrees I seem to need to add 180 to get close to results from other sources

@elazarrosenthal
Copy link
Author

I just noticed there is a PR for this
you might want to merge it

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

1 participant