用Blanco Muriel编写的用C++编写的太阳位置算法Python包装器。

sunpos的Python项目详细描述


由blanco muriel用c++编写的太阳位置算法的python包装器。 1999年至2015年期间精度为1度。

Blanco Muriel M.,Alarcon Padilla D.C.,Lopez Mratala D.和Lara Coira M.,“计算太阳矢量”,太阳能第70卷,第5期,第431-44119001页。

To calculate sun position:
>>> import sunpos:
>>> print sunpos.__doc__

Sunpos package provides three structueres:

cTime:

whith fields:

iYear:year, integer
iMonth:month, integer
iDay:day, integer
dHours:double, UTC hours
dMinutes:double, minutes
dSeconds:double, seconds
cLocation:

with fields:

dLongitude:double, longitude
dLatitude:double, latitude
cSunCoordinates:

with fields:

dZenithAngle:double, zenith angle, degrees
dAzimuth:double, azimuth angle, degrees
>>> loc=sunpos.cLocation()
>>> loc.dLatitude = 43.1
>>> loc.dLongitude = 131.9
>>> time=sunpos.cTime()
>>> time.iYear = 2013 #imteger, year
>>> time.iMonth = 10 #Integer, month
>>> time.iDay = 13 #integer, day
>>> time.dHours = 16 #double, hours UTC
>>> time.dMinutes = 32 #double, minutes
>>> time.dSeconds = 12 #double, seconds
>>> #calculations
>>> res = sunpos.sunposf(time, loc)
>>> #or
>>> res = sunpos.cSunCoordinates()
>>> sunpos.sunpos(time, loc, res)
>>> print res.dZenithAngle # sun's zenith  angle
>>> print res.dAzimuth # sun's azimuth  angle:
>>>

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java泛型重写抽象方法并具有子类的返回类型   Java中的字符串反转字符,同时保留一些字符   java将系统时间与我获取它的时间进行比较   java解析ODATA URL以在准备entityset之前读取ID值   java中的有界通配符下界泛型即使在传递超类时也不会编译   c#Java的JVM和Java的内部工作方式有什么不同。NET的CLR?   java如何在windows7上指定JDK的版本?   Java:列出单个目录中的所有文件(1020000+)   java使用Logback和Lombok   安卓谷歌玩java。lang.NullPointerException   使用RSA的解密结果在普通Java和Android中有所不同   具有默认连接池的java Spring引导   java我如何在一个坏的测试环境中前进?