|
1234567891011121314151617181920212223242526272829303132333435363738394041 |
- 10 REM SUNSHINE
- 12 REM
- 14 P=3.14159265: R=P/180
- 16 INPUT "LATITUDE (DEGREES)";F
- 18 F=F*R
- 20 S=SIN(F): C=COS(F)
- 22 INPUT "START DAY IN 1986 ";J1
- 24 INPUT "END DAY IN 1986 ";J2
- 26 IF J2<J1 THEN 24
- 28 Z=0
- 30 FOR D=J1 TO J2
- 32 M=357.1663+0.9856*D
- 34 M=M*R
- 36 L=279.8603+0.985647*D
- 38 L=L+1.91533*SIN(M)
- 40 L=L+0.02001*SIN(2*M)
- 42 L=L+0.00029*SIN(3*M)
- 44 L=L*R
- 46 G=0.3978062*SIN(L)
- 48 K=SQR(1-G*G)
- 50 U=(-0.01454-S*G)/(K*C)
- 52 IF ABS(U)<1 THEN 58
- 54 IF U>1 THEN 70
- 56 Z=Z+1440: GOTO 70
- 58 F=0.9043+0.03023*COS(M)
- 60 F=F/(1-0.15825*SIN(L)*SIN(L))
- 62 A=ATN(SQR(1-U*U)/U)
- 64 A=A/R
- 66 IF U<0 THEN A=A+180
- 68 Z=Z+2880*A/(360.985647-F)
- 70 NEXT D
- 72 PRINT
- 74 PRINT "SUNSHINE = "
- 76 PRINT INT(Z+0.5);" MINUTES"
- 78 PRINT INT((Z+30)/60);" HOURS"
- 80 END
- 85 REM ------------------------
- 88 REM APPEARED IN ASTRONOMICAL
- 89 REM COMPUTING, SKY & TELE-
- 90 REM SCOPE, SEPTERMBER, 1984
- 92 REM ------------------------
|