py代码的这一部分抛出了AttributeError
def tomorrow_heading():
increment_min = 1
incrementeddatetime = 0
tomorrow_corrected = 90
if pysolar.get_altitude(maplat, maplon, datetime.datetime.utcnow()) < 0:
while pysolar.get_altitude(maplat, maplon, (datetime.datetime.utcnow() + datetime.timedelta(minutes=incrementeddatetime))) < 0:
incrementeddatetime = incrementeddatetime + increment_min
sunrise_time=(datetime.datetime.utcnow() + datetime.timedelta(minutes=incrementeddatetime))
tomorrow_heading = pysolar.GetAzimuth(maplat, maplon, sunrise_time)
if tomorrow_heading < 0:
if (tomorrow_heading >= -180):
tomorrow_corrected = ((tomorrow_heading * -1) + 180)
if (tomorrow_heading < -180):
tomorrow_corrected = ((tomorrow_heading * -1) - 180)
if tomorrow_heading >= 0:
以下是错误代码
^{pr2}$我在谷歌上搜索了一段时间,似乎找不到答案。solarrobot7.py中的原始代码使用了GetAltitude
和{get_altitude
和{
别用“太阳法”: 您需要子模块“太阳能”:)
相关问题 更多 >
编程相关推荐