home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 179 / 179.d81 / meteors (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  7KB  |  204 lines

  1. 5 poke55,.:poke56,56:clr
  2. 10 dv=peek(186):ifdv<8thendv=8
  3. 15 poke53280,0:poke53281,0:print"[147]"
  4. 16 poke53371,0
  5. 25 poke53272,31
  6. 30 ad=49152
  7. 35 sysad:sysad+12
  8. 37 bl$="[153][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175]"
  9. 40 ee$="                                       "
  10. 42 dimlr(16)
  11. 105 zz=0
  12. 107 print"[147]":printtab(4)"[158] [205] [197] [212] [197] [207] [210]    [212] [210] [193] [195] [203][160][197][160][210] ":sysad+9,11
  13. 110 print"[153][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175]"
  14. 115 print"[159][205]ass [158]([203][199].):";:l9%=27:gosub900:mm=q9
  15. 120 ifmm=<0thenprint"[145][145][145]":goto115
  16. 125 print:print"[159][201]ts [196]ensity [158]([203][199]/per cu.[205]):";:l9%=9:gosub900:d=q9
  17. 130 ifd=<0thenprint"[145][145][145]":goto125
  18. 135 print:print"[159][201]ts [214]elocity [158](km/sec):";:l9%=4:gosub900:v=q9
  19. 140 ifv=<0thenprint"[145][145][145]":goto135
  20. 145 print:print"[159][218]enith [193]ngle [158]([219]):";:l9%=6:gosub900:z=q9
  21. 150 ifz=<0thenprint"[145][145][145]":goto145
  22. 155 print:print"[159][212]ime [201]ncrements [158]sec (.01/.1/1) :";:l9%=4:gosub900:dt=q9
  23. 160 ifdt=<0thenprint"[145][145][145]":goto155
  24. 170 print:print"[150]    [201]s [196]ata [197]ntry [195]orrect [156][[153][217]es[156]-[153][206]o[156]]?":poke198,.
  25. 175 geta$:ifa$<>"y"anda$<>"n"then175
  26. 180 ifa$="n"then105
  27. 182 sysad+9,12
  28. 185 gosub375:print:gosub420
  29. 190 a=1.2:l=.001:g=1:ho=.2
  30. 195 h1=500000:sg=ho/(2*g*h1)
  31. 200 h=155000:t=0:fm=10:fl=fm
  32. 205 m=mm:v=v*1000:im=0:d=d+im
  33. 210 re=6371000:zr=z*3.14159/180
  34. 215 vv=-v*cos(zr):vh=v*sin(zr)
  35. 220 i=int(h/10000)
  36. 225 ifi>15theni=15
  37. 230 fr=(h/10000)-i
  38. 235 r=10^(lr(i)*(1-fr)+fr*lr(i+1))
  39. 240 a2=(g*a*r*v*v)/(m*d*d)^.33333
  40. 245 gv=9.81/(1+h/re)^2
  41. 250 av=-gv-a2*vv/v+vh*vh/(re+h)
  42. 255 ah=-a2*vh/v-vv*vh/(re+h)
  43. 260 mo=sg*m*v*a2
  44. 265 iffl=fmthengosub315
  45. 270 t=t+dt:s=s+vh*dt*re/(re+h)
  46. 275 h=h+vv*dt:m=m-mo*dt
  47. 280 vv=vv+av*dt:vh=vh+ah*dt
  48. 285 v=sqr(vh*vh+vv*vv)
  49. 290 ifh<=0orh>160000orm<=0then460
  50. 310 fl=fl+1:goto220
  51. 315 fori=217to242:pokei,peek(i)or128:nexti
  52. 320 poke214,18:print:printee$:sysad+9,13
  53. 325 print"[145]"int(.5+t*10)/10;
  54. 330 printtab(4)"[153]"int(.5+s/1000);
  55. 335 printtab(10)"[154]"int(.5+h/1000);
  56. 340 printtab(15)"[150]"int(.5+v/100)/10;
  57. 345 printtab(22)"[158]"int(.5+a2);
  58. 350 printtab(29)"[156]"int(.5+100*m/mm);
  59. 355 lv=.5*v*v*mo*l*1e+10/(h*h)
  60. 360 mv=6.8-1.086*log(lv)
  61. 365 printtab(33)"[155]"int(.5+10*mv)/10
  62. 370 fl=0:return
  63. 375 rem   log(density) of atmosphere
  64. 385 fori=0to16:readlr(i):next
  65. 390 data.09,-.38,-1.05,-1.74,-2.39
  66. 395 data-2.98,-3.50,-4.07,-4.72
  67. 400 data-5.45,-6.30,-7.00,-7.62
  68. 405 data-7.97,-8.32,-8.67,-8.81
  69. 410 return
  70. 420 poke214,14:print:print"[153]     [199][210][207][213][206][196] [212][210][193][195][203] [146]    [158] [193][212][205][207][211][208][200][197][210][201][195][193][204] "
  71. 425 print"[212]ime [153][212]rack [154][193]lt [150][211]peed  [158][196]ecel  [156][205]ass [155][193]bsol"
  72. 430 print"(s)  [153](km) [154](km) [150](km/s) [158](m/s/s) [156](%) [155]mag.[144]"
  73. 435 printbl$
  74. 440 print""bl$
  75. 455 return
  76. 460 gosub675
  77. 470 gosub955
  78. 560 gosub3000
  79. 565 restore:goto105
  80. 675 print"[147]":sysad+9,14
  81. 680 print:print"[156]  [198][201][206][193][204] [198][201][199][213][210][197][211] on [208][210][197][196][201][195][212][197][196] [207][194][202][197][195][212]"
  82. 685 print:print"[153]     [199][210][207][213][206][196] [212][210][193][195][203] [146]   [158] [193][212][205][207][211][208][200][197][210][201][195][193][204] "
  83. 690 print"[212]ime [153][212]rack [154][193]lt [150][211]peed  [158][196]ecel  [156][205]ass [155][193]bsol"
  84. 695 print"(s)  [153](km) [154](km) [150](km/s) [158](m/s/s) [156](%) [155]mag"
  85. 700 printbl$
  86. 705 print:print"[145]"int(.5+t*10)/10;
  87. 710 printtab(4)"[153]"int(.5+s/1000);
  88. 715 printtab(10)"[154]"int(.5+h/1000);
  89. 720 printtab(15)"[150]"int(.5+v/100)/10;
  90. 725 printtab(22)"[158]"int(.5+a2);
  91. 730 printtab(29)"[156]"int(.5+100*m/mm);
  92. 735 lv=.5*v*v*mo*l*1e+10/(h*h)
  93. 740 mv=6.8-1.086*log(lv)
  94. 745 printtab(33)"[155]"int(.5+10*mv)/10
  95. 750 printbl$
  96. 755 return
  97. 900 q9$="":poke198,.
  98. 905 geta$
  99. 910 poke646,rnd(1)*15+1:print"*[157]";:ifa$=""then905
  100. 915 ifa$=chr$(13)thenprint" ":q9=val(q9$):sysad+9,8:return
  101. 920 if(a$=chr$(20)andlen(q9$))thenq9$=left$(q9$,len(q9$)-1):goto950
  102. 925 iflen(q9$)>=l9%thensysad+9,20:goto905
  103. 930 if(a$>="0"anda$<="9")ora$="."then940
  104. 935 goto905
  105. 940 q9$=q9$+a$
  106. 945 print""a$;:sysad+9,12:goto905
  107. 950 print" [157][157] [157]";:goto905
  108. 955 ifm<=0andint(.5+h/1000)>=70then1000
  109. 960 ifm<=0andint(.5+h/1000)>=30andint(.5+h/1000)<=70then1030
  110. 965 ifm<=0andint(.5+h/1000)>=6andint(.5+h/1000)<30then1190
  111. 970 ifm<=0andint(.5+h/1000)>=1andint(.5+h/1000)<6then1240
  112. 975 ifh<=0andint(.5+100*m/mm)>=50then1090
  113. 980 ifh<=0andint(.5+100*m/mm)<=49andint(.5+100*m/mm)>25then1120
  114. 990 ifh<=0andint(.5+100*m/mm)>=1andint(.5+100*m/mm)<25then1060
  115. 995 ifint(.5+h/1000)>=160then1150
  116. 1000 print:print"[158] [207]bject burned up[159]";int(.5+h/1000);"[158]kilometers high!"
  117. 1005 print" [201]t could only have been seen under"
  118. 1010 print" clear, dark skies. [217]ou had to be"
  119. 1015 print" looking in its direction. [193] brief"
  120. 1017 print" streak of light in the night sky."
  121. 1020 print" [218][201][208]! [212]he most common of objects that"
  122. 1022 print" adds tons to earth's mass daily."
  123. 1023 print" [201]f you could see this one at all!"
  124. 1025 return
  125. 1030 print:print"[158] [212]his one would have caught many"
  126. 1035 print" people's attention! [193] bright to very"
  127. 1040 print"[160]bright streak across the sky. [212]hese"
  128. 1045 print" types are commonly associated with"
  129. 1050 print" meteor showers, which are most often"
  130. 1051 print" located in a constellation. [212]he"
  131. 1052 print" debris from comets that cross the"
  132. 1053 print" earth's orbit, as they orbit the sun."
  133. 1054 print" [194]urned up at [159]";int(.5+h/1000);"[158]kilometers"
  134. 1055 return
  135. 1060 print:print"[158] [201][212]'[211] [193][210][205][193][199][197][196][196][207][206]! [206]ot quite. [194]ut [196][213][195][203]!"
  136. 1065 print" [207]bject struck the ground [150][210]ed [200]ot!"
  137. 1070 print"[158] [212]otal mass of object left [159]";int(.5+100*m/mm);"[158]percent"
  138. 1072 print" [193] very nice souvenir, if it landed"
  139. 1074 print" on your property! [213]nless it hit the"
  140. 1075 print" house! [201]mpact speed [159]";int(.5+v/100)/10;"[158]km/second."
  141. 1080 print" [207]nly local damage was done. [211]mall one!"
  142. 1082 print" [195]atch a falling star and put it in"
  143. 1084 print" your pocket, [201]'m on fir[210][210][197][197][197][193][193][193][200][200][200][200][200]!"
  144. 1085 return
  145. 1090 print:print"[158] [212]his one caused a lot of damage! [205]ade"
  146. 1095 print" a very large hole somewhere! [193] mass"
  147. 1100 print" disruption to the enviroment!"
  148. 1105 print"[153] [212]otal mass left=[159]";int(.5+100*m/mm)"[158]%"
  149. 1107 print" [212]he destruction of [208]aris in that"
  150. 1108 print" movie was very much like this.
  151. 1109 [153]" (NULL)o ducking here!"
  152. 1110 [153]" right$mpact speed=open";[181](.5[170]v[173]1000);"syskm/hour"
  153. 1111 [153]"print (NULL)here would be no escape possible!"
  154. 1115 [142]
  155. 1120 [153]:[153]"sys (NULL)his one could wipe out a small city"
  156. 1125 [153]" or large town, depending on its"
  157. 1130 [153]" iron and nickle content. right$t would"
  158. 1135 [153]"closebe very destructive! right$f it hit in"
  159. 1140 [153]" water near shore the wave it created"
  160. 1145 [153]" would be much like the right$mpact movie's"
  161. 1147 [153]" wave scene. (NULL)he remaining mass would"
  162. 1148 [153]" determine the size and depth of the"
  163. 1149 [153]" crater that it created on impact!"
  164. 1150 [142]
  165. 1155 [153]:[153]"sys right$ts angle wasn't steep enough. (NULL)ice"
  166. 1160 [153]"sight to watch it tear through the"
  167. 1165 [153]"atmosphere. (NULL)hese large objects are"
  168. 1170 [153]"called great fireballs! left$ence the"
  169. 1175 [153]"phrase chr$reat peekalls of ascire! chr$et it!"
  170. 1180 [153]"(NULL)eriously! right$t's awe-inspiring to see."
  171. 1182 [153]" (NULL)hey have even been video taped, and"
  172. 1183 [153]" seen during daylight hours!"
  173. 1185 [142]
  174. 1190 [153]: