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.
 
 
 
 
 
 

55 lines
1.2 KiB

  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. 65 GOSUB 200
  30. 66 PRINT "ALTITUDE: ";H/R1
  31. 68 PRINT "AZIMUTH: ";A/R1
  32. 70 END
  33. 72 REM SEXAGESIMAL TO DECIMAL
  34. 74 REM
  35. 76 S=1: A1=ABS(VAL(A$))
  36. 78 IF LEFT$(A$,1)="-" THEN S=-1
  37. 80 A=S*(A1+A2/60+A3/3600)
  38. 82 RETURN
  39. 200 REM TRUE ALT TO APP ALT
  40. 210 REM
  41. 220 H5=H/R1
  42. 230 V5=(H5+10.3/(H5+5.11))*R1
  43. 240 R5=1.02*COS(V5)/SIN(V5)
  44. 250 H=H+R5*R1/60
  45. 260 RETURN
  46. 284 REM ------------------------
  47. 286 REM APPEARED IN ASTRONOMICAL
  48. 288 REM COMPUTING, SKY & TELE-
  49. 290 REM SCOPE, JUNE, 1984,
  50. 292 REM AND MODIFIED IN THE JULY,
  51. 294 REM 1986, ISSUE TO CONVERT
  52. 296 REM FROM TRUE TO APPARENT
  53. 298 REM ALTITUDE
  54. 300 REM ------------------------