简体   繁体   English

PyEphem:我如何计算太阳的最低高度(太阳将到达地平线以下的最大角度)?

[英]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.

相关问题 如何使用pyEphem计算太阳在地平线上方的角度 - How to calculate the angle of the sun above the horizon using pyEphem PyEphem:从太阳的时间计算角度然后从角度计算时间时的时间不匹配 - PyEphem: Time mismatch when calculating angle from time of the sun and then time from angle 计算太阳角度代码 - Calculating Sun Angle Code 如何使用pyephem查找给定altaz坐标的北角与地平线之间的夹角? - How to find the angle between North and horizon for given altaz coords using pyephem? PyEphem:ValueError:那颗卫星似乎总是在地平线以下 - PyEphem: ValueError: that satellite seems to stay always below your horizon PyEphem:太阳的AlwaysUpError发生在不应发生的位置 - PyEphem: AlwaysUpError for the Sun occurs in a location where this shouldn't happen PyEphem:mag功能在地球上特定位置的太阳返回的幅度不正确吗? - PyEphem: mag function not returning right magnitude for the Sun at specific places on Earth? 如何在PyX中做天文符号“\\ sun” - How to do the astronomical symbol “\sun” in PyX 考虑到附近的山脉(使用 Python),如何计算给定日期和位置的日照时数? - How can I calculate the number of sun hours for a given day and location, considering nearby mountains (with Python)? 如何腌制pyEphem对象以进行多处理? - How do I pickle pyEphem objects for multiprocessing?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM