1 GOTO 10
2 SAVE "ORBITPRG.BAS"
3 END
10 PRINT CHR$(26)
15 PRINT "OBBITAL CROSSING PROGRAM by Dr. Ralph E. Taggert"
20 PRINT
25 INPUT "WHAT IS THE NAME OF THE SPACECRAFT";A$
30 INPUT "ENTER THE ORBITAL PERIOD (IN MINUTES)";P
35 PRINT "ENTER THE MONTH, DAY, AND YEAR OF REFERENCE CROSSING"
40 INPUT "MONTH";L:INPUT "DAY";J:INPUT "YEAR";K:GOSUB 900:D=W:Z=W:PRINT CHR$(26)
45 INPUT "REFERENCE ORBIT NUMBER";N:X=N
50 PRINT "ENTER HOUR, MINUTE AND SECOND OF REFERENCE CROSSING"
55 INPUT "HOUR";H:INPUT "MINUTE";M:INPUT "SECOND";S:A=(60*H)+M+(S/60):G=A:PRINT CHR$(26)
60 INPUT "REFERENCE CROSSING POINT (DEG W)";C:Y=C
65 PRINT "ENTER MONTH, DAY, AND YEAR FOR DISPLAY"
70 INPUT "MONTH";L:INPUT "DAY";J:INPUT "YEAR";Q:GOSUB 900:T=W:PRINT CHR$(26)
75 IF Q<K AND T<D THEN GOSUB 930:GOTO 65
80 IF Q=K+1 THEN T=365+T
85 IF T>D+5 THEN 500
90 GOSUB 940
100 A=A+P:N=N+1
110 IF A>1440 THEN A=A-1440
120 C=((P/1440)*360)+C
130 IF C>360 THEN C=C-360
140 IF D=T THEN 200
150 IF D>T THEN 300
160 GOTO 100
200 H=INT(A/60)
210 M=INT(A-(H*60))
220 S=A((H*60)+M):S=INT(S*60)
230 E=C+.05:E=INT(E*10)/10
240 PRINT N,H;":";M;":";S,E
250 GOTO 100
300 INPUT "DO YOU WANT ANOTHER DAY'S DATA (Y=1 N=0)";R
310 IF R=0 THEN 400
320 PRINT "ENTER MONTH, DAY, AND YEAR FOR DISPLAY"
330 INPUT "MONTH";L:INPUT "DAY";J:INPUT "YEAR";Q:GOSUB 900:T=W:PRINT CHR$(26)
340 IF Q<K AND T<Z THEN GOSUB 930:GOTO 300
350 IF Q=K+1 THEN T=356+T
360 IF T=D-1 THEN GOSUB 950:GOTO 300
370 IF T=D THEN GOSUB 940:GOTO 200
380 IF T>D+5 THEN 500
385 IF D>T THEN D=Z:A=G:C=Y:N=X:GOTO 75
390 GOSUB 940:GOTO 100
400 PRINT CHR$(26): INPUT "ANOTHER SPACECRAFT";R
410 IF R=1 THEN PRINT CHR$(26):GOTO 25
420 END
500 D=Z:A=G:C=Y:N=X
505 B=(T-1)-D:I=1440*B:B=INT(I/P)+1
510 A=(B*P)-I
520 V=B*((P/1440)*360):U=INT(V/360):C=V-(U*360)
530 D=T-1:N=N+B
540 GOSUB 940:GOTO 100
899 END
900 W=0
901 IF L=1 THEN W=J:RETURN
902 IF L=2 THEN W=31+J:RETURN
903 IF L=3 THEN W=59+J:RETURN
904 IF L=4 THEN W=90+J:RETURN
905 IF L=5 THEN W=120+J:RETURN
906 IF L=6 THEN W=151+J: RETURN
907 IF L=7 THEN W=181+J:RETURN
908 IF L=8 THEN W=212+J:RETURN
909 IF L=9 THEN W=243+J:RETURN
910 IF L=10 THEN W=273+J:RETURN
911 IF L=11 THEN W=304+J:RETURN
912 IF L=12 THEN W= 334+J:RETURN
930 PRINT "SORRY - PROGRAM DOES NOT COMPUTE DATA"
931 PRINT "PRIOR TO REFERENCE CROSSING":RETURN
940 PRINT CHR$(26):PRINT "DATE ";L;"/";J;"/";Q;" ";A$
941 PRINT ORBIT","TIME","DEGREES W":RETURN
950 PRINT CHR$(26):PRINT "YOU JUST PRINTED DATA FOR ";L;"/";J;"/";Q
951 RETURN
999 END
NT ORBIT","TIME"