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


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))

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM