sffjunkie / astral

Python calculations for the position of the sun and moon.
Apache License 2.0
228 stars 46 forks source link

Altitude ignored in solar elevation calculation #36

Open Swamp-Ig opened 5 years ago

Swamp-Ig commented 5 years ago

The solar elevation calculation doesn't take the altitude into account. It seems to me like it should adjust using _depression_adjustment, while solar_zenith should be modified so that it ignores altitude.

This might be related to #35 possibly?

Sorry for all these issues without any patches, I don't really understand the maths enough to fix it.

Swamp-Ig commented 5 years ago

Test case here

sffjunkie commented 4 years ago

I could add an adjustment but it would not make sense as the distance to sun is 149,597,870,000m and the distance to space is approx 81000m so the change in angle would be miniscule for someone on earth.

Swamp-Ig commented 4 years ago

Compared to the horizon? The Sun rises earlier and sets later at altitude though.