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?
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?
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.