[英]PyEphem: How do I calculate the lowest altitude of the sun (largest angle the sun will reach below the horizon)?
Depending on the seasons, it looks like the sun will never go lower than a certain angle with respect to the horizon at some areas. 根据季节的不同,在某些区域,太阳看起来永远不会低于某个角度。
Is there a way in PyEphem to calculate the lowest possible angle at specific times and locations, so I can avoid an AlwaysUpError? 在PyEphem中有没有办法计算特定时间和位置的最低可能角度,所以我可以避免AlwaysUpError?
To get the range of the angles where the sun will reach, use the transit_time, next_antitransit functions. 要获得太阳将到达的角度范围,请使用transit_time,next_antitransit函数。 The transit time is when the sun reaches the meridian through your observer location, and that of course corresponds to when the sun reaches its highest altitude.
通过时间是指太阳通过观察者位置到达子午线,当然这对应于太阳到达其最高海拔的时间。 The same idea goes for the anti-transit (when the sun reaches the back side of the meridian)
反过境(当太阳到达子午线的背面时)也有同样的想法
For example: 例如:
... #create observer
sun = ephem.Sun(obs)
obs.date = sun.transit_time
maximum_altitude = sun.alt
And to get the lowest altitude, you can do: 要获得最低海拔高度,您可以:
obs.date = obs.next_antitransit(sun)
sun.compute(obs)
minimum_altitude = sun.alt
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.