Skip to content

Convert Azi/Alt to Ra/Dec #129

Answered by cosinekitty
offsky asked this question in Q&A
Oct 12, 2021 · 4 comments · 1 reply
Discussion options

You must be logged in to vote

Oh, I think this is it:

var spherical = {lat:horizon.azimuth,lon:horizon.altitude,dist:mercury.dist};

It looks like lat and lon are backwards. Try this instead:

var spherical = new Astronomy.Spherical(horizon.altitude, horizon.azimuth, mercury.dist);

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by offsky
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@gerben-b
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants