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.
 
 
 
 
 
 

80 lines
2.1 KiB

  1. 500 REM X,Y,Z OF THE SUN
  2. 501 REM (EQUINOX 1950.0)
  3. 502 REM
  4. 503 INPUT "J,F ";J,F
  5. 504 J8=J-2415020: R1=3.14159265/180
  6. 505 T=(J8+F)/36525
  7. 506 P0=1.396041+0.000308*(T+0.5)
  8. 507 P0=P0*(T-0.499998)
  9. 508 A=100: GOSUB 529: G0=A+358.475833
  10. 509 L0=A+279.696678-P0
  11. 510 A=1336: GOSUB 529
  12. 511 C0=A+270.434164-P0
  13. 512 A=162: GOSUB 529
  14. 513 V0=A+212.603219
  15. 514 A=53: GOSUB 529: M0=A+319.529425
  16. 515 A=8: GOSUB 529: J0=A+225.444651
  17. 516 G=G0+T*(-0.950250-0.000150*T)
  18. 517 C=C0+T*(307.883142-0.001133*T)
  19. 518 L=L0+T*(0.768920+0.000303*T)
  20. 519 V=V0+T*(197.803875+0.001286*T)
  21. 520 M=M0+T*(59.8585+0.000181*T)
  22. 521 J=J0+T*154.906654
  23. 522 G=G*R1: C=C*R1: L=L*R1
  24. 523 V=V*R1: M=M*R1: J=J*R1
  25. 524 GOSUB 532
  26. 525 PRINT "X: ";X
  27. 526 PRINT "Y: ";Y
  28. 527 PRINT "Z: ";Z
  29. 528 END
  30. 529 REM NORMALIZATION
  31. 530 A=360*(A*T-INT(A*T)): RETURN
  32. 531 REM
  33. 532 X=0.000011*COS(2*G-L-2*J)
  34. 533 X=X+0.000011*COS(2*G+L-2*V)
  35. 534 X=X-0.000012*COS(G+L-V)
  36. 535 X=X-0.000012*COS(4*G-L-8*M+3*J)
  37. 536 X=X+0.000012*COS(4*G+L-8*M+3*J)
  38. 537 X=X-0.000014*COS(C-2*L)
  39. 538 X=X+0.000017*COS(C)
  40. 539 X=X+0.000018*SIN(2*G+L-2*V)
  41. 540 X=X-0.000021*T*COS(G+L)
  42. 541 X=X-0.000026*SIN(G-L-J)
  43. 542 X=X+0.000035*COS(2*G-L)
  44. 543 X=X+0.000063*T*COS(G-L)
  45. 544 X=X+0.000105*COS(2*G+L)
  46. 545 X=X+0.008374*COS(G+L)
  47. 546 X=X-0.025127*COS(G-L)
  48. 547 X=X+0.999860*COS(L)
  49. 548 REM
  50. 549 Y=0.000010*SIN(2*G+L-2*V)
  51. 550 Y=Y-0.000010*SIN(2*G-L-2*J)
  52. 551 Y=Y-0.000011*SIN(G+L-V)
  53. 552 Y=Y+0.000011*SIN(4*G-L-8*M+3*J)
  54. 553 Y=Y+0.000011*SIN(4*G+L-8*M+3*J)
  55. 554 Y=Y+0.000013*SIN(C-2*L)
  56. 555 Y=Y+0.000016*SIN(C)
  57. 556 Y=Y-0.000017*COS(2*G+L-2*V)
  58. 557 Y=Y-0.000019*T*SIN(G+L)
  59. 558 Y=Y-0.000024*COS(G-L-J)
  60. 559 Y=Y-0.000032*SIN(2*G-L)
  61. 560 Y=Y-0.000057*T*SIN(G-L)
  62. 561 Y=Y+0.000097*SIN(2*G+L)
  63. 562 Y=Y+0.007683*SIN(G+L)
  64. 563 Y=Y+0.023053*SIN(G-L)
  65. 564 Y=Y+0.917308*SIN(L)
  66. 565 REM
  67. 566 Z=-0.000010*COS(G-L-J)
  68. 567 Z=Z-0.000014*SIN(2*G-L)
  69. 568 Z=Z-0.000025*T*SIN(G-L)
  70. 569 Z=Z+0.000042*SIN(2*G+L)
  71. 570 Z=Z+0.003332*SIN(G+L)
  72. 571 Z=Z+0.009998*SIN(G-L)
  73. 572 Z=Z+0.397825*SIN(L)
  74. 573 RETURN
  75. 575 REM ------------------------
  76. 576 REM APPEARED IN ASTRONOMICAL
  77. 577 REM COMPUTING, SKY & TELE-
  78. 578 REM SCOPE, NOVEMBER, 1985
  79. 579 REM ------------------------