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