1

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?

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134
Airikr
  • 6,258
  • 15
  • 59
  • 110

1 Answers1

2

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.