sun_position.py 文件源码

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

项目:astk 作者: openalea-incubator 项目源码 文件源码
def sun_elevation(hUTC, dayofyear, year, latitude, longitude):
    """ Sun elevation

    Args:
        hUTC: fractional hour (UTC time)
        dayofyear (int):
        year (int):
        latitude (float): the location latitude (degrees)
        longitude (float): the location longitude (degrees)

    Returns:
        (float) the sun elevation (degrees)

    Details:
        World Meteorological Organization (2006).Guide to meteorological
        instruments and methods of observation. Geneva, Switzerland.
    """
    dec = declination(hUTC, dayofyear, year)
    lat = numpy.radians(latitude)
    ha = numpy.radians(hour_angle(hUTC, dayofyear, year, longitude) * 15)
    sinel = numpy.sin(dec) * numpy.sin(lat) + numpy.cos(dec) * numpy.cos(
        lat) * numpy.cos(ha)

    return numpy.degrees(numpy.arcsin(sinel))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号