rotor_calc.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:enigma2 作者: Openeight 项目源码 文件源码
def calcSatHourangle(SatLon, SiteLat, SiteLon):
    Azimuth = calcAzimuth(SatLon, SiteLat, SiteLon )
    Elevation = calcElevation(SatLon, SiteLat, SiteLon)

    a = - math.cos(math.radians(Elevation)) * math.sin(math.radians(Azimuth))
    b = math.sin(math.radians(Elevation)) * math.cos(math.radians(SiteLat)) - \
        math.cos(math.radians(Elevation)) * math.sin(math.radians(SiteLat)) * \
        math.cos(math.radians(Azimuth))

    # Works for all azimuths (northern & southern hemisphere)
    returnvalue = 180 + math.degrees(math.atan(a / b))

    if Azimuth > 270:
        returnvalue += 180
        if returnvalue > 360:
            returnvalue = 720 - returnvalue

    if Azimuth < 90:
        returnvalue = 180 - returnvalue

    return returnvalue
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号