用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从arraylist元素调用方法   开关案例中的java错误。。。代码不返回任何内容   在TeamCity:Task:app:processDebugResources上使用Gradle进行构建时java失败   Android Studio的java Gradle同步(SDK)问题   小程序中的java Tic Tack Toe游戏:图像不工作   火柴ABC12;10;250.3使用regexjava   java如何在任务栏的系统托盘中隐藏JFrame   java ListProperty<T>与ObjectProperty<ObservableList<T>>   java如何将resultset数据转换为我的对象。以下是数据的格式   JavaJSF2和oracle   java Junit和EasyMock意外失败   使用java从生成的xml文档中删除xml声明   使用high ResultSet时某些表的java ArrayIndexOutOfBoundsException。fetchSize()   java检测点击按钮   while循环不会结束(Java)   java如何通过JUNIT将数据与文件进行比较?   hadoop Hive Java API寄存器JAR