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.
 
 
 
 
 
 

43 lines
990 B

  1. 10 REM ALTITUDE AND AZIMUTH
  2. 12 REM
  3. 14 P=3.14159265: R1=P/180
  4. 16 INPUT "R A (H,M,S) ";A$,A2,A3
  5. 18 GOSUB 72: R=A*15*R1
  6. 20 INPUT "DEC (D,M,S) ";A$,A2,A3
  7. 22 GOSUB 72: D=A*R1
  8. 24 INPUT "LAT, LONG ";B,L
  9. 26 B=B*R1: L=L*R1
  10. 28 INPUT "GST (H,M,S) ";A$,A2,A3
  11. 30 GOSUB 72: T=A*15*R1
  12. 32 T5=T-R+L: REM LHA
  13. 34 S1=SIN(B)*SIN(D)
  14. 36 S1=S1+COS(B)*COS(D)*COS(T5)
  15. 38 C1=1-S1*S1
  16. 40 IF C1>0 THEN C1=SQR(C1)
  17. 42 IF C1<=0 THEN 46
  18. 44 H=ATN(S1/C1): GOTO 48
  19. 46 H=SGN(S1)*P/2
  20. 48 C2=COS(B)*SIN(D)
  21. 50 C2=C2-SIN(B)*COS(D)*COS(T5)
  22. 52 S2=-COS(D)*SIN(T5)
  23. 54 IF C2=0 THEN A=SGN(S2)*P/2
  24. 56 IF C2=0 THEN 62
  25. 58 A=ATN(S2/C2)
  26. 60 IF C2<0 THEN A=A+P
  27. 62 IF A<0 THEN A=A+2*P
  28. 64 PRINT
  29. 66 PRINT "ALTITUDE: ";H/R1
  30. 68 PRINT "AZIMUTH: ";A/R1
  31. 70 END
  32. 72 REM SEXAGESIMAL TO DECIMAL
  33. 74 REM
  34. 76 S=1: A1=ABS(VAL(A$))
  35. 78 IF LEFT$(A$,1)="-" THEN S=-1
  36. 80 A=S*(A1+A2/60+A3/3600)
  37. 82 RETURN
  38. 84 REM ------------------------
  39. 86 REM APPEARED IN ASTRONOMICAL
  40. 88 REM COMPUTING, SKY & TELE-
  41. 90 REM SCOPE, JUNE, 1984
  42. 92 REM ------------------------