ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

49 lines
1.0 KiB

  1. 10 REM OBSCURED FRACTION
  2. 12 REM AT A SOLAR ECLIPSE
  3. 14 REM
  4. 16 P=3.14159265
  5. 18 INPUT "SUN'S SEMIDIAMETER ";S1
  6. 20 INPUT "MOON'S SEMIDIAMETER";S2
  7. 22 S=S2/S1
  8. 24 INPUT "ECLIPSE MAGNITUDE ";M
  9. 26 IF M>(S+1)/2 OR M<0 THEN 24
  10. 28 REM
  11. 30 W=M*2
  12. 32 D=1+S-W
  13. 34 IF M<1 AND D<>0 THEN 46
  14. 36 IF S>=1 THEN F=1: REM TOTAL
  15. 38 IF S<1 THEN F=S*S: REM ANNULAR
  16. 40 F=F*P
  17. 42 GOTO 90
  18. 44 REM
  19. 46 REM ANGLE B
  20. 48 B1=(D*D+1-S*S)/(2*D)
  21. 50 IF B1>1 THEN B1=1
  22. 52 IF B1<-1 THEN B1=-1
  23. 54 IF B1<>0 THEN 58
  24. 56 B=P/2: GOTO 64
  25. 58 B=ATN(SQR(1-B1*B1)/B1)
  26. 60 IF B1<0 THEN B=B+P
  27. 62 REM
  28. 64 REM ANGLE C
  29. 66 C1=(S*S+1-D*D)/(2*S)
  30. 68 IF C1>1 THEN C1=1
  31. 70 IF C1<-1 THEN C1=-1
  32. 72 IF C1<>0 THEN 76
  33. 74 C=P/2: GOTO 82
  34. 76 C=ATN(SQR(1-C1*C1)/C1)
  35. 78 IF C1<0 THEN C=C+P
  36. 80 REM
  37. 82 REM ANGLE A
  38. 84 A=P-B-C
  39. 86 REM
  40. 88 F=S*S*A+B-S*SIN(C)
  41. 90 PRINT "OBSCURATION: ";F/P
  42. 92 END
  43. 100 REM ***********************
  44. 110 REM FROM SKY & TELESCOPE'S
  45. 120 REM ASTRONOMICAL COMPUTING
  46. 130 REM DEPARTMENT, NOVEMBER,
  47. 140 REM 1986, PAGES 515-516.
  48. 150 REM ***********************