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.
 
 
 
 
 
 

37 lines
885 B

  1. 10 REM ANGULAR SEPARATION
  2. 12 REM
  3. 14 P=3.14159265: C=P/180
  4. 16 PRINT "FIRST STAR --"
  5. 18 INPUT "R A (H,M,S) ";A$,A2,A3
  6. 20 GOSUB 60 : R1=A*15*C
  7. 22 INPUT "DEC (D,M,S) ";A$,A2,A3
  8. 24 GOSUB 60 : D1=A*C
  9. 26 PRINT
  10. 28 PRINT "SECOND STAR --"
  11. 30 INPUT "R A (H,M,S) ";A$,A2,A3
  12. 32 GOSUB 60 : R2=A*15*C
  13. 34 INPUT "DEC (D,M,S) ";A$,A2,A3
  14. 36 GOSUB 60 : D2=A*C
  15. 38 REM
  16. 40 D=SIN((D1-D2)/2): H1=D*D
  17. 42 A=SIN((R1-R2)/2): H2=A*A
  18. 44 H3=H1+COS(D1)*COS(D2)*H2
  19. 46 S1=SQR(H3): C1=SQR(1-S1*S1)
  20. 48 S=2*ATN(S1/C1)/C
  21. 50 PRINT
  22. 52 PRINT "SEPARATION --"
  23. 54 PRINT "IN DEGREES: ";S
  24. 56 PRINT "IN ARC SEC: ";S*3600
  25. 58 END
  26. 60 REM SEXAGESIMAL TO DECIMAL
  27. 62 REM
  28. 64 F=1: A1=ABS(VAL(A$))
  29. 66 IF LEFT$(A$,1)="-" THEN F=-1
  30. 68 A=F*(A1+A2/60+A3/3600)
  31. 70 RETURN
  32. 80 REM ------------------------
  33. 85 REM APPEARED IN ASTRONOMICAL
  34. 90 REM COMPUTING, SKY & TELE-
  35. 95 REM SCOPE, AUGUST, 1984
  36. 99 REM ------------------------