計算太陽赤緯 和 太陽日落時角


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