home *** CD-ROM | disk | FTP | other *** search
- 1 PRINT "From the September 1984 SKY & TELESCOPE, pp. 254-5."
- 2 PRINT
- 3 PRINT "This program calculates the theoretical amount of sunshine over a"
- 4 PRINT "given period for a given place."
- 5 PRINT
- 6 PRINT "INPUT: Latitude of the place with fraction (degrees), start and end"
- 7 PRINT "days in 1986 (1 to 365)." : PRINT
- 8 PRINT "OUTPUT: Total amount of sunshine between, and including, the days"
- 9 PRINT "given (min, h)." : PRINT
- 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+.9856*D
- 34 M=M*R
- 36 L=279.8603+.985647*D
- 38 L=L+1.91533*SIN(M)
- 40 L=L+.02001*SIN(2*M)
- 42 L=L+.00029*SIN(3*M)
- 44 L=L*R
- 46 G=.3978062*SIN(L)
- 48 K=SQR(1-G*G)
- 50 U=(-.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=.9043+.03023*COS(M)
- 60 F=F/(1-.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+.5);" MINUTES"
- 78 PRINT INT((Z+30)/60);" HOURS"
- 80 RUN "ASTRMENU.BAS"
- T D
- 72 PRINT
- 74 PRINT "SUNSHINE = "
- 76 PRINT INT(Z