import math nday=23 Rdc=(360/365)*nday dec=0.33281-22.984*math.cos(Rdc)-0.3499*math.cos(2*Rdc)-0.1398*cos(3*Rdc)+3.7872*math.sin(Rdc)+0.03205*math.sin(2*Rdc)+0.07187*sin(3*Rdc) ALT = math.asin((math.sin(LAT*(math.pi/180))*math.sin(DEC))+((math.cos(LAT*(math.pi/180))*math.cos(DEC)))) if nday < 21: teq = 2.6+0.44*nday elif 21 <= nday <= 136: teq = 5.2+9.0*math.cos((nday-43)*0.0357) elif 136 <= nday <= 241: teq = 1.4-5.0*math.cos((nday-135)*0.0449) elif 241 <= nday <= 336: teq = (-6.3)-(10*math.cos((nday-306)*0.036)) else: teq = 0.45*(nday-359) print(teq) TZ=12 Lw=10 Tshift=TZ-(Lw/15) nhour=12 ts=(nhour-teq)/(60-Tshift) w=(180/12)*(12.5-ts) alt=math.asin((math.sin(dec)*math.sin(Lw)+math.cos(dec)*math.cos(Lw)*cos(w)) inc=math.acos(sin) b=0 y=180 math.sin(dec (math.pi/180))*math.sin(DEC))+((math.cos(LAT*(math.pi/180))*math.cos(DEC))))