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.
 
 
 
 
 
 

50 lines
1.1 KiB

  1. 10 REM NEAR-PARABOLIC ORBITS
  2. 12 REM
  3. 14 P1=4*ATN(1): R1=180/P1
  4. 16 K=0.01720209895
  5. 18 D1=10000: C=1/3
  6. 20 D=1E-6: REM ADJUST FOR COM-
  7. 22 REM PUTER'S PRECISION
  8. 24 REM
  9. 26 INPUT "PERI DISTANCE Q ";Q
  10. 28 INPUT "ECCENTRICITY ";E0
  11. 30 INPUT "DAYS FROM PERI ";T
  12. 32 PRINT
  13. 34 IF T<>0 THEN 40
  14. 36 R=Q: V=0: GOTO 90
  15. 38 REM
  16. 40 REM FIND TRUE ANOMALY
  17. 42 REM
  18. 44 Q1=K*SQR((1+E0)/Q)/(Q*2)
  19. 46 Q1=Q1*T
  20. 48 S=2/(3*ABS(Q1))
  21. 50 X=2/TAN(2*ATN(TAN(ATN(S)/2)^C))
  22. 52 IF T<0 THEN X=-X
  23. 54 G=(1-E0)/(1+E0): L0=0
  24. 56 REM
  25. 58 X0=X: W=1: Y=X*X: G1=-Y*X
  26. 60 Q3=Q1+2*G*X*Y/3
  27. 62 W=W+1
  28. 64 G1=-G1*G*Y
  29. 66 W1=(W-(W+1)*G)/(2*W+1)
  30. 68 F=W1*G1
  31. 70 Q3=Q3+F
  32. 72 IF W>50 OR ABS(F)>D1 THEN 96
  33. 74 IF ABS(F)>D THEN 62
  34. 76 L0=L0+1: IF L0>50 THEN 96
  35. 78 X1=X: X=(2*X*X*X/3+Q3)/(X*X+1)
  36. 80 IF ABS(X-X1)>D THEN 78
  37. 82 IF ABS(X-X0)>D THEN 58
  38. 84 V=2*ATN(X)
  39. 86 R=Q*(1+E0)/(1+E0*COS(V))
  40. 88 IF V<0 THEN V=V+2*P1
  41. 90 PRINT "TRUE ANOMALY: ";V*R1
  42. 92 PRINT "DISTANCE (AU): ";R
  43. 94 GOTO 98
  44. 96 PRINT "NO CONVERGENCE"
  45. 98 END
  46. 99 REM *************************
  47. 100 REM FROM SKY & TELESCOPE,
  48. 101 REM MAY, 1987, PAGE 535
  49. 102 REM ************************