Question

I'm getting information about the moon's altitude from yr.no's API and they print the altitude as 50.0496753501172.

How can I convert that to kilometers; even if it is already in kilometers?

Était-ce utile?

La solution

The only altitude I see in the API response (below) is nested under the <sun> element, not <moon>. The API documentation you linked to refers to it as:

The angle to the sun at solar noon is also given.

So what this <noon altitude="50.0496753501172" /> really means is that, at noon, the sun will be about 50 degrees above the horizon. That's it. Nothing to do with the moon, nothing to do with distance.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top