计算太阳赤纬 和 太阳日落时角

时间:2019-10-21 20:12:16   收藏:0   阅读:1014
import math as m

def Declination(n):
    """
     计算太阳赤纬
    :param n: 月份天数
    :return: 赤纬角度
    """

    a = 23.45*m.sin(m.radians(360*(284+n)/365))
    return a

a = Declination(31)

print("{:.3f}".format(a))

def Sunrise_hour_angle(d):
    """
    计算太阳日落时角
    :param d: 太阳赤纬
    :return: 太阳日落时角w_s
    """


    # 苏州地区纬度31.3°
    a = m.radians(d)
    b = m.tan(m.radians(-31.3))
    c = m.tan(a)
    w = m.acos(b*c)
    w_s = m.degrees(w)


    return w_s

w_s = Sunrise_hour_angle(-17.78)

print("{:.3f}".format(w_s))

 

原文:https://www.cnblogs.com/hgrhome/p/11715415.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!