用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从其BlobKey获取Google云存储文件   java*Vert。x*:如何在同步代码中处理   java HikaiCP:如何查看连接池大小?   java解析依赖项的重复版本   java如何删除TableColumn中的HTML标记   Maven依赖项找不到sendgridjava的zip文件   Java可用的垃圾收集算法   java IntelliJ git集成技巧和技巧   java如何在安卓中实现应用内支付?   java如何在安卓中从whatsapp获取pdf文件数据到我的应用程序?   有没有一种方法可以使用JavaScript(Vue.js)将Java应用程序(游戏)实现到网站中   使用SWT浏览器进行java-to-javascript通信的问题   java在Android手机上更改字体大小后启用textView内的滚动条