这是在Python 3下如何用PyEphem计算格林威治小时角吗? [英] Is this how to compute Greenwich Hour Angle with PyEphem under Python 3?

查看:184
本文介绍了这是在Python 3下如何用PyEphem计算格林威治小时角吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用python3和pyephem研究天体导航 主要是通过一些必须由 在任何情况下都是手.
对于视力下降部分,我正在尝试获取pyephem输出数据 可与航海历相媲美,主要是格林威治时角和偏角. 为了获得白羊座第一点的时角,我尝试使用 在0.0 RA和0.0 dec处的ephem.readdb.但是在进一步阅读文档之后,我认为 这正在工作.

I have been using python3 and pyephem to study celestial navigation mostly working through some calculations that would have to be done by hand in any case.
For the sight reduction part I am trying to have pyephem output data comparable to the nautical almanac, mostly greenwich hour angle and declination. To get the hour angle of the first point of aries, I tried adding a body using ephem.readdb at 0.0 RA and 0.0 dec. But after reading the doc further I think this is working.

#!/bin/python3

import math , ephem
#  zero longitude
gmt_long = '0:0:0'          #  deg, min, sec
myloc_date = ( '2012/12/02 22:00:00' )
# observer for greenwich  gst
utcz = ephem.Observer()
utcz.date = myloc_date
utcz.long = gmt_long
print ( utcz.date )
print (" gst hours", utcz.sidereal_time() )
print (" gst   deg", ephem.degrees( utcz.sidereal_time() ) )

将输出的最后一行与航海年历中的aries列进行比较 日期

Compare the last line of output with the aries column in the nautical almanac for the date

航海历书的在线版本www.tecepe.com.br

online version of nautical almanac www.tecepe.com.br

推荐答案

是的,这确实是正确的方法.您的每个步骤都很有意义,因此您的结果与年历之间的协议意义重大.对于想要进行比较的其他人,这里是您引用的年历中的特定页面:

Yes, this does look to be the correct approach; each of your steps makes sense, and so the agreement between your result and the Almanac is meaningful. Here, for anyone else who wants to make the comparison, is the particular page from the Almanac that you reference:

http://www.tecepe. com.br/scripts/AlmanacPagesISAPI.dll/pages?date=12%2F02%2F2012

这篇关于这是在Python 3下如何用PyEphem计算格林威治小时角吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆