PyEphem的3.7.5.3版本(2014年5月29日)的Changelog提到,所有的主体都得到了一个.parallactic_angle()方法,但我在快速参考或教程中找不到它。它需要什么论据?
发布于 2015-07-14 11:49:52
# Compute parallactic angle using PyEphem.
city = ephem.city( ... )
moon = ephem.moon( city )
parallacticAngle = moon.parallactic_angle()下面的代码是从指示器-月球中提取的,并计算平行角度,用于进一步计算明亮的肢体角度。
# Compute the bright limb angle (relative to zenith) between the sun moon.
# Measured in degrees counter clockwise from a positive y axis.
# 'Astronomical Algorithms' Second Edition by Jean Meeus (chapters 14 and 48).
# 'Practical Astronomy with Your Calculator' by Peter Duffett-Smith (chapters 59 and 68).
city = ephem.city( ... )
moon = ephem.moon( city )
sun = ephem.Sun( city )
y = math.cos( sun.dec ) * math.sin( sun.ra - moon.ra )
x = math.cos( moon.dec ) * math.sin( sun.dec ) - math.sin( body.dec ) * math.cos( sun.dec ) * math.cos( sun.ra - moon.ra )
positionAngleOfBrightLimb = math.atan2( y, x )
hourAngle = city.sidereal_time() - moon.ra
y = math.sin( hourAngle )
x = math.tan( city.lat ) * math.cos( moon.dec ) - math.sin( moon.dec ) * math.cos( hourAngle )
parallacticAngle = math.atan2( y, x )
brightLimbAngle = math.degrees( ( positionAngleOfBrightLimb - parallacticAngle ) % ( 2.0 * math.pi ) )比较我的计算值和PyEphem的值,它们都匹配(一个是浮点数,另一个打印为十进制)。
https://stackoverflow.com/questions/31109366
复制相似问题