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.
 
 
 
 
 
 

48 lines
1.1 KiB

  1. 10 REM BINARY STAR ORBIT
  2. 12 REM
  3. 14 P1=4*ATN(1): R1=180/P1
  4. 16 C=2*P1: A1=0.0000005
  5. 18 REM
  6. 20 INPUT "SEMIMAJOR AXIS";A
  7. 22 INPUT "ECCENTRICITY ";E0
  8. 24 IF INT(E0)=0 THEN 30
  9. 26 PRINT "NOT VALID; REENTER"
  10. 28 GOTO 22
  11. 30 INPUT "EPOCH OF PERIASTRON";T
  12. 32 INPUT "PERIOD IN YEARS ";P
  13. 34 INPUT "INCLINATION ";I
  14. 36 INPUT "ARG OF PERIASTRON ";W
  15. 38 INPUT "P.A. OF ASC NODE ";L
  16. 40 I=I/R1: W=W/R1: L=L/R1
  17. 42 REM
  18. 44 INPUT "DATE OF OBS (YR) ";D
  19. 46 T1=D-T: M=C*T1/P
  20. 48 E=M+E0*SIN(M)+E0*E0*SIN(2*M)/2
  21. 50 N=E-E0*SIN(E): G=M-N
  22. 52 F=G/(1-E0*COS(E)): E=E+F
  23. 54 IF ABS(G)>A1 THEN 50
  24. 56 U=(1+E0)/(1-E0): H=COS(E/2)
  25. 58 IF H=0 THEN V=P1: GOTO 62
  26. 60 V=2*ATN(SQR(U)*SIN(E/2)/H)
  27. 62 K=V+W: Y=SIN(K)*COS(I)
  28. 64 X=COS(K): Q=ATN(Y/X)
  29. 66 IF X<0 THEN Q=Q+P1
  30. 68 IF X<0 THEN 72
  31. 70 IF Y<0 THEN Q=Q+C
  32. 72 P2=Q+L: IF P2>C THEN P2=P2-C
  33. 74 R=A-A*E0*COS(E)
  34. 76 S=R*X/COS(Q)
  35. 78 P3=INT(P2*R1*10+0.5)/10
  36. 80 S3=INT(S*100+0.5)/100
  37. 82 PRINT "P.A. ";P3;" DEG"
  38. 84 PRINT "SEP. ";S3;" ARC SEC"
  39. 86 PRINT
  40. 88 INPUT "ANOTHER (Y OR N)";Q$
  41. 90 IF Q$<>"N" THEN 44
  42. 92 REM ========================
  43. 94 REM FROM "ASTRONOMICAL
  44. 96 REM COMPUTING," SKY & TELE-
  45. 98 REM SCOPE, JULY, 1987
  46. 100 REM ========================
  47. 102 END