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.
 
 
 
 
 
 

123 lines
3.0 KiB

  1. 10 REM NEW AND FULL MOONS
  2. 12 REM
  3. 14 REM
  4. 16 R1=3.14159265/180: U=0
  5. 18 INPUT "YEAR ";Y
  6. 19 G=1: IF Y<1583 THEN G=0
  7. 20 PRINT
  8. 22 K0=INT((Y-1900)*12.3685)
  9. 24 T=(Y-1899.5)/100
  10. 26 T2=T*T: T3=T*T*T
  11. 28 J0=2415020+29*K0
  12. 30 F0=0.0001178*T2-0.000000155*T3
  13. 32 F0=F0+0.75933+0.53058868*K0
  14. 34 F0=F0-0.000837*T-0.000335*T2
  15. 36 J0=J0+INT(F0): F0=F0-INT(F0)
  16. 38 M0=K0*0.08084821133
  17. 40 M0=360*(M0-INT(M0))+359.2242
  18. 42 M0=M0-0.0000333*T2
  19. 44 M0=M0-0.00000347*T3
  20. 46 M1=K0*0.07171366128
  21. 48 M1=360*(M1-INT(M1))+306.0253
  22. 50 M1=M1+0.0107306*T2
  23. 52 M1=M1+0.00001236*T3
  24. 54 B1=K0*0.08519585128
  25. 56 B1=360*(B1-INT(B1))+21.2964
  26. 58 B1=B1-0.0016528*T2
  27. 60 B1=B1-0.00000239*T3
  28. 62 FOR K9=1 TO 27 STEP 2
  29. 64 J=J0+14*K9: F=F0+0.765294*K9
  30. 66 K=K9/2
  31. 68 M5=(M0+K*29.10535608)*R1
  32. 69 M6=(M1+K*385.81691806)*R1
  33. 70 B6=(B1+K*390.67050646)*R1
  34. 71 F=F-0.4068*SIN(M6)
  35. 72 F=F+(0.1734-0.000393*T)*SIN(M5)
  36. 73 F=F+0.0161*SIN(2*M6)
  37. 74 F=F-0.0104*SIN(2*B6)
  38. 75 F=F-0.0074*SIN(M5-M6)
  39. 76 F=F-0.0051*SIN(M5+M6)
  40. 77 F=F+0.0021*SIN(2*M5)
  41. 81 F=F+0.5/1440
  42. 82 J=J+INT(F): F=F-INT(F)
  43. 86 GOSUB 100
  44. 92 NEXT
  45. 94 GO TO 999
  46. 100 REM LUNAR ECLIPSE SUBROUTINE
  47. 102 D7=0
  48. 104 IF ABS(SIN(B6))>0.36 THEN 196
  49. 106 S=5.19595-0.0048*COS(M5)
  50. 108 S=S+0.0020*COS(2*M5)
  51. 110 S=S-0.3283*COS(M6)
  52. 112 S=S-0.0060*COS(M5+M6)
  53. 114 S=S+0.0041*COS(M5-M6)
  54. 116 C1=0.2070*SIN(M5)
  55. 118 C1=C1+0.0024*SIN(2*M5)
  56. 120 C1=C1-0.0390*SIN(M6)
  57. 122 C1=C1+0.0115*SIN(2*M6)
  58. 124 C1=C1-0.0073*SIN(M5+M6)
  59. 126 C1=C1-0.0067*SIN(M5-M6)
  60. 128 C1=C1+0.0117*SIN(2*B6)
  61. 130 D9=ABS(S*SIN(B6)+C1*COS(B6))
  62. 132 U=0.0059+0.0046*COS(M5)
  63. 134 U=U-0.0182*COS(M6)
  64. 136 U=U+0.0004*COS(2*M6)
  65. 138 U=U-0.0005*COS(M5+M6)
  66. 140 RP=1.2847+U: RU=0.7404-U
  67. 142 MP=(1.5572+U-D9)/0.545
  68. 144 IF MP<0 THEN 196
  69. 146 MU=(1.0129-U-D9)/0.545
  70. 148 D5=1.5572+U: D6=1.0129-U
  71. 150 D7=0.4679-U
  72. 152 N=(0.5458+0.04*COS(M6))/60
  73. 154 D5=SQR(D5*D5-D9*D9)/N
  74. 156 IF MU<=0 THEN 164
  75. 158 D6=SQR(D6*D6-D9*D9)/N
  76. 160 IF MU<=1 THEN 164
  77. 162 D7=SQR(D7*D7-D9*D9)/N
  78. 164 GOSUB 900: PRINT
  79. 166 PRINT "ECLIPSE DATE: ";Y;M;D1
  80. 168 PRINT " MAXIMUM PHASE: ";
  81. 170 PRINT H1;"h ";M9;"m UT"
  82. 172 MP=INT(1000*MP+0.5)/1000
  83. 174 PRINT " PENUMBRAL MAG: ";MP
  84. 176 IF MU<=0 THEN 182
  85. 178 MU=INT(1000*MU+0.5)/1000
  86. 180 PRINT " UMBRAL MAG: ";MU
  87. 182 PRINT " SEMIDURATIONS --"
  88. 184 D5=INT(D5+0.5): REM ROUND OFF
  89. 186 PRINT " PENUMBRA: ";D5;"m"
  90. 188 IF MU<0 THEN 196
  91. 190 D6=INT(D6+0.5): D7=INT(D7+0.5)
  92. 192 PRINT " UMBRA: ";D6;"m"
  93. 194 PRINT " TOTALITY: ";D7;"m"
  94. 196 RETURN
  95. 900 REM JD --> CALENDAR
  96. 905 REM
  97. 920 F=F+0.5
  98. 925 IF F<1 THEN 935
  99. 930 F=F-1: J=J+1
  100. 935 IF G=1 THEN 945
  101. 940 A=J: GOTO 955
  102. 945 A1=INT((J/36524.25)-51.12264)
  103. 950 A=J+1+A1-INT(A1/4)
  104. 955 B=A+1524
  105. 960 C=INT((B/365.25)-0.3343)
  106. 965 D=INT(365.25*C)
  107. 970 E=INT((B-D)/30.61)
  108. 975 D=B-D-INT(30.61*E)+F
  109. 980 M=E-1: Y=C-4716
  110. 985 IF E>13.5 THEN M=M-12
  111. 990 IF M<2.5 THEN Y=Y+1
  112. 993 D1=INT(D): H=24*(D-D1)
  113. 994 H1=INT(H): M9=INT(60*(H-H1))
  114. 997 RETURN
  115. 999 END
  116. 1000 REM ***********************
  117. 1001 REM THIS IS THE *COMPLETE*
  118. 1002 REM PROGRAM FOR PREDICTING
  119. 1003 REM LUNAR ECLIPSES (SEE
  120. 1004 REM SKY & TELESCOPE, JUNE,
  121. 1005 REM 1988, PAGE 640)
  122. 1006 REM ***********************