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.
 
 
 
 
 
 

63 lines
1.7 KiB

  1. 10 REM FIREBALL
  2. 12 PRINT
  3. 14 INPUT "INITIAL MASS (KG) ";MM
  4. 16 INPUT "DENSITY (KG/M^3) ";D
  5. 18 INPUT "SPEED (KM/S) ";V
  6. 20 INPUT "ZENITH ANGLE (DEG) ";Z
  7. 22 INPUT "TIME STEP (SEC) ";DT
  8. 24 GOSUB 98: PRINT: GOSUB 114
  9. 26 A=1.2: L=.001: G=1: H0=.2
  10. 28 H1=500000: SG=H0/(2*G*H1)
  11. 30 H=155000: T=0: FM=10: FL=FM
  12. 32 M=MM: V=V*1000
  13. 34 RE=6371000: ZR=Z*3.14159/180
  14. 36 VV=-V*COS(ZR): VH=V*SIN(ZR)
  15. 38 REM DENSITY OF ATMOSPHERE
  16. 40 I=INT(H/10000)
  17. 42 IF I>15 THEN I=15
  18. 44 FR=(H/10000)-I
  19. 46 R=10^(LR(I)*(1-FR)+FR*LR(I+1))
  20. 48 REM RATES OF CHANGE
  21. 50 A2=G*A*R*V*V/(M*D*D)^.33333
  22. 52 GV=9.810001/(1+H/RE)^2
  23. 54 AV=-GV-A2*VV/V+VH*VH/(RE+H)
  24. 56 AH=-A2*VH/V-VV*VH/(RE+H)
  25. 58 M0=SG*M*V*A2
  26. 60 IF FL=FM THEN GOSUB 76
  27. 62 REM INCREMENT VARIABLES
  28. 64 T=T+DT: S=S+VH*DT*RE/(RE+H)
  29. 66 H=H+VV*DT: M=M-M0*DT
  30. 68 VV=VV+AV*DT: VH=VH+AH*DT
  31. 70 V=SQR(VH*VH+VV*VV)
  32. 72 IF M<0 OR H<0 THEN END
  33. 74 FL=FL+1: GOTO 38
  34. 76 REM OUTPUT
  35. 78 PRINT INT(.5+T*10)/10;
  36. 80 PRINT TAB(10);INT(.5+S/1000);
  37. 82 PRINT TAB(20);INT(.5+H/1000);
  38. 84 PRINT TAB(30);INT(.5+V/100)/10;
  39. 86 PRINT TAB(40);INT(.5+A2);
  40. 88 PRINT TAB(50);INT(.5+100*M/MM);
  41. 90 LV=.5*V*V*M0*L*1E+10/(H*H)
  42. 92 MV=6.8-1.086*LOG(LV)
  43. 94 PRINT TAB(60);INT(.5+10*MV)/10
  44. 96 FL=0: RETURN
  45. 98 REM LOG(DENSITY) OF ATMOSPHERE
  46. 100 DIM LR(16)
  47. 102 FOR I=0 TO 16: READ LR(I): NEXT
  48. 104 DATA .09,-.38,-1.05,-1.74,-2.39
  49. 106 DATA -2.98,-3.50,-4.07,-4.72
  50. 108 DATA -5.45,-6.30,-7.00,-7.62
  51. 110 DATA -7.97,-8.32,-8.67,-8.81
  52. 112 RETURN
  53. 114 REM HEADING
  54. 116 PRINT" GROUND";
  55. 118 PRINT TAB(39);"ATMOS"
  56. 120 PRINT"TIME TRACK HEIGHT";
  57. 122 PRINT TAB(30);"SPEED DECEL";
  58. 124 PRINT TAB(50);"MASS VISUAL"
  59. 126 PRINT" (S) (KM) (KM)";
  60. 128 PRINT TAB(30);"(KM/S) (M/S/S)";
  61. 130 PRINT TAB(50);" (%) MAG"
  62. 132 RETURN