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.
 
 
 
 
 
 

55 lines
1.4 KiB

  1. 10 REM SPACE MOTION OF A STAR
  2. 12 REM
  3. 14 P1=3.14159265
  4. 16 INPUT "R.A. (H,M)";H,M
  5. 18 A=(H+M/60)*15*P1/180
  6. 20 INPUT "ANNUAL PM (SEC)";DA
  7. 22 INPUT "DEC. (D,M)";D$,M
  8. 24 D=ABS(VAL(D$)): S=1
  9. 26 IF LEFT$(D$,1)="-" THEN S=-1
  10. 28 D=S*(D+M/60)*P1/180
  11. 30 INPUT "ANNUAL PM (ARCSEC)";DD
  12. 32 DA=DA/13751: DD=DD/206265
  13. 34 INPUT "R.V. (KM/SEC)";DR
  14. 36 DR=DR/977820
  15. 38 INPUT "DISTANCE (LY)";R
  16. 40 R=R/3.2616: REM LY TO PARSECS
  17. 42 INPUT "MAGNITUDE";M0
  18. 44 X=R*COS(D)*COS(A)
  19. 46 Y=R*COS(D)*SIN(A)
  20. 48 Z=R*SIN(D)
  21. 50 DX=(X/R)*DR-Z*COS(A)*DD-Y*DA
  22. 52 DY=(Y/R)*DR-Z*SIN(A)*DD+X*DA
  23. 54 DZ=(Z/R)*DR+R*COS(D)*DD
  24. 56 REM
  25. 58 PRINT: REM LOOP
  26. 60 INPUT "YEARS FROM PRESENT";T
  27. 62 X1=X+T*DX:Y1=Y+T*DY:Z1=Z+T*DZ
  28. 64 R1=SQR(X1*X1+Y1*Y1+Z1*Z1)
  29. 66 B=(R1/R)*(R1/R)
  30. 68 M1=M0+2.5*LOG(B)/LOG(10)
  31. 70 S5=Z1/R1: C5=SQR(1-S5*S5)
  32. 72 D1=ATN(S5/C5)*180/P1
  33. 74 A1=ATN(Y1/X1)*180/(P1*15)
  34. 76 IF X1<0 THEN A1=A1+12
  35. 78 IF A1>24 THEN A1=A1-24
  36. 80 IF A1<0 THEN A1=A1+24
  37. 82 PRINT "R.A. (HOURS) ";A1
  38. 84 PRINT "DEC. (DEGREES)";D1
  39. 86 PRINT "DISTANCE ";R1*3.2616
  40. 88 PRINT "MAGNITUDE ";M1
  41. 90 PRINT
  42. 92 INPUT "AGAIN (Y OR N)";Q$
  43. 94 IF Q$<>"N" THEN 58
  44. 96 END
  45. 100 REM ************************
  46. 110 REM THIS PROGRAM USES A STAR'S
  47. 120 REM CURRENT POSITION, PROPER
  48. 130 REM MOTION, DISTANCE, AND BRIGHT-
  49. 140 REM NESS TO COMPUTE ITS PATH
  50. 150 REM ACROSS THE SKY IN THE REMOTE
  51. 160 REM PAST OR FUTURE. DESCRIBED IN
  52. 170 REM SKY & TELESCOPE MAGAZINE FOR
  53. 180 REM MAY, 1989, PAGE 531.
  54. 190 REM *************************