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.
 
 
 
 
 
 

38 lines
1.4 KiB

  1. 10 ' The Size of an Asteroid
  2. 20 '
  3. 30 RD=180/3.14159: ' Radians to degrees
  4. 40 INPUT "Apparent visual magnitude, V";V
  5. 50 INPUT "Distance from Sun (au) ";R0
  6. 60 INPUT "Distance from Earth (au) ";D0
  7. 70 INPUT "Earth-Sun distance (au) ";R
  8. 80 PRINT "Asteroid type --"
  9. 90 INPUT " C, S, or O(ther)";T$
  10. 100 IF T$="c" OR T$="C" THEN P=.037
  11. 110 IF T$="s" OR T$="S" THEN P=.14
  12. 120 IF T$="o" OR T$="O" THEN INPUT "What is the albedo";P
  13. 130 IF P>1 OR P<=0 THEN 120
  14. 140 PRINT "Now enter the photometric slope"
  15. 142 PRINT "parameter (G), or if unknown"
  16. 143 INPUT "enter 0.15. Value of G ";G
  17. 150 PRINT
  18. 160 CI=(R0^2+D0^2-R^2)/(2*R0*D0)
  19. 170 F=ATN(SQR(1-CI*CI)/CI)
  20. 180 IF CI<0 THEN F=F+3.14159
  21. 190 ' F = solar phase angle in radians
  22. 200 PRINT USING "Solar phase angle, phi: ###.#";F*RD
  23. 210 P1=EXP(-3.33*(TAN(F/2))^.63)
  24. 220 P2=EXP(-1.87*(TAN(F/2))^1.22)
  25. 230 H=V-5*LOG(D0*R0)/LOG(10)+2.5*LOG((1-G)*P1+G*P2)/LOG(10)
  26. 240 PRINT USING "Absolute mag (H): ###.#";H
  27. 250 LD=3.12-.2*H-.5*LOG(P)/LOG(10)
  28. 260 D=10^LD
  29. 270 PRINT USING "Diameter (km): ####.#";D
  30. 280 END
  31. 290 '
  32. 300 ' Basil Rowe's program calculates the size of an asteroid from
  33. 310 ' its apparent brightness and an assumption about its reflectivity
  34. 320 ' (albedo). The calculation is explained on page 83 of the
  35. 330 ' June 1993 issue of Sky & Telescope. Carbonaceous asteroids
  36. 340 ' have albedos of about 0.04, while S-type (stony) asteroids
  37. 350 ' reflect about 0.14 of the light.