Calculate daylight hours Based on gegraphical coordinates

前端 未结 4 1098
日久生厌
日久生厌 2021-02-03 13:28

I want to calculate Daylight hours based on given Latitude and Longitude and DateTime
I mean calculate the time of sunrise and the time of sunset in a specefic Date and bas

4条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-03 14:02

    Check this Latitude and Longitude and Daylight Hours

       D = daylength
       L = latitude
       J = day of the year
    
       P = asin[.39795*cos(.2163108 + 2*atan{.9671396*tan[.00860(J-186)]})]
    
                              _                                         _
                             / sin(0.8333*pi/180) + sin(L*pi/180)*sin(P) \
       D = 24 - (24/pi)*acos{  -----------------------------------------  }
                             \_          cos(L*pi/180)*cos(P)           _/
    

提交回复
热议问题