home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1
/
HamRadio.cdr
/
log
/
g3zcz15
/
phase2.2
< prev
next >
Wrap
Text File
|
1985-09-28
|
7KB
|
161 lines
10 REM Circular orbit satellite tracking program
20 REM originally by W3IWI, modified by G3ZCZ
30 REM Ver 810120.4
40 DIM I$(30) \P1=3.141592654\P2=2*P1\P8=P1/180 \ C=2.998E5
50 GOTO 420
60 REM -- FNZ$ FILLS IN LEADING ZEROES IN STRING OF LEN=2
70 DEF FNZ$(V)
80 V1=INT(V/10) \ V2=INT(V-10*V1+.5)
90 RETURN CHR$(48+V1)+CHR$(48+V2)
100 FNEND
110 REM -- FNT CONVERTS FROM DD.DDD TO HH,MM,SS
120 DEF FNT(D9)
130 T7=INT(D9) \ T9=D9-T7 \ H9=INT(24*T9)
140 M9=INT(1440*(T9-H9/24))
150 S9=INT((T9-H9/24-M9/1440)*86400+.5)
160 IF S9<60 THEN 170 ELSE S9=S9-60 \ M9=M9+1 \ GOTO 160
170 IF M9<60 THEN 180 ELSE M9=M9-60 \ H9=H9+1 \ GOTO 170
180 IF H9<24 THEN 190 ELSE H9=H9-24 \ T7=T7+1 \ GOTO 180
190 RETURN T7
200 FNEND
210 REM -- GET SATELLITE COORD,AZ,EL,RANGE AT T=DD.DDD
220 DEF FNS(T9)
230 A0=(T9-T0)+W0 \ A0=(A0-INT(A0))*P2
240 N9=(T9-T0)/P0 \ A1=(N9-INT(N9))*P2
250 S0=SIN(A0) \ C0=COS(A0) \ S1=SIN(A1) \ C1=COS(A1)
260 X=R3*(+C0*C1+S0*S1*C2) \ Y=R3*(-S0*C1+C0*S1*C2)
270 Z=R3*S1*S2 \ S8=(X-X0)^2+(Y-Y0)^2+(Z-Z0)^2 \ S7=SQRT(S8)
280 S3=(R4-S8)/(2*R0*S7) \ E=-99 \ F7=(S7-L7)/(T5*C) \ L7=S7
290 IF S3<E3 THEN RETURN E ELSE E=ATN(S3/SQRT(1-S3^2))/P8
300 A1=R1*(Y*X0-X*Y0) \ A2=R7*Z - Z0*(X*X0+Y*Y0+Z*Z0)
310 A=ATN(A1/A2)/P8 \ IF A2<0 THEN A=A+180
320 IF (A1<0 AND A2>0) THEN A=A+360
330 A=INT(A+.5) \ S7=INT(S7+.5) \ RETURN INT(E+.5)
340 FNEND
350 REM -- HEADER PRINT ROUTINE
360 T6=T0+(N-N0)*P0 \ W6=T6-T0+W0 \ W6=(W6-INT(W6))*360
370 D7=FNT(T6)+D \ T$="/"+FNZ$(H9)+":"+FNZ$(M9)+":"+FNZ$(S9)
380 PRINT#P5
390 PRINT#P5,"ORBIT# ",%5I,N," AT ",D7,T$," UTC AT W.LONG=",%6F2,W6
400 PRINT#P5," UTC AZ EL RANGE "+M$ \ RETURN
410 REM ---- PROGRAM BEGINS
420 PRINTCHR$(12),"AMATEUR SATELLITE AZ-EL PROGRAM"
430 PRINT
440 PRINT "Satellite selection menu "
450 PRINT "AMSAT - OSCAR 7 0"
460 PRINT "AMSAT - OSCAR 8 1"
470 PRINT "UoSAT - OSCAR 9 2"
480 PRINT "RS 3 3"
490 PRINT "RS 4 4"
500 PRINT "RS 5 5"
510 PRINT "RS 6 6"
520 PRINT "RS 7 7"
530 PRINT "RS 8 8"
540 INPUT "Which satellite ? ", S \ IF S<0 OR S >8 THEN 440
550 ON S+1 GOTO 560,570,580,590,600,610,620,630,640è560 RESTORE 1100 \ GOTO 660
570 RESTORE 1170 \ GOTO 660
580 RESTORE 1230 \ GOTO 660
590 RESTORE 1280 \ GOTO 660
600 RESTORE 1320 \ GOTO 660
610 RESTORE 1360 \ GOTO 660
620 RESTORE 1410 \ GOTO 660
630 RESTORE 1460 \ GOTO 660
640 RESTORE 1510 \ GOTO 660
650 REM OTHER S/C CAN BE ADDED HERE
660 READ I$,N0,D,H9,M9,S9,W,P,I,H
670 PRINT\ PRINT I$," Reference orbit is",N0," on",D,
680 T$=" "+FNZ$(H9)+":"+FNZ$(M9)
690 PRINT " at",T$, " crossing at",W," W"
691 INPUT "Do you want to overide reference data ? ",A$ \ IF A$="" THEN 691
692 IF A$(1,1) = "N" THEN 700 ELSE IF A$(1,1) = "Y" THEN 693 ELSE 691
693 INPUT "Reference Orbit number ? ",N0 \ INPUT "Julian day number ? ",D
696 INPUT "Reference orbit crossing time hours ? ",H9
697 INPUT "Reference orbit crossing time minutes ? ",M9
698 INPUT "Reference orbit crossing time seconds ? ",S9
699 INPUT "Reference orbit crossing time location ( deg W ) ? ",W
700 INPUT"What Mode do you want ? ",M$
710 READ T$,F8,F9\IF T$=M$THEN720 ELSEIF T$="**"THEN740 ELSE710
720 IF F8=1 THEN M$="BEACON" ELSE M$="DOPPLER" \ F8=F8*F9
730 M$=T$(1,1)+"-"+M$ \ GOTO 760
740 PRINT "Mode "+M$+" does not compute"
750 M$=" VELOCITY" \ F8=0 \ F9=C
760 RESTORE 1030 \ READ E3,T5,S$,W1,L1
770 P0=P/1440 \ W0=W/360 \ T0=H9/24+M9/1440+S9/86400
780 S2=SIN(I*P8) \ E3=SIN(E3*P8) \ C2=COS(I*P8) \ R1=6378.14
790 R3=R1+H \ R7=R1^2 \ R5=R3^2
800 S0=SIN(L1*P8)\C0=COS(L1*P8)\S1=SIN(W1*P8)\C1=COS(W1*P8)
810 F=1-1/298.22 \ R=R1/SQRT(C0*C0+F*S0*S0)
820 X0=R*C0*C1 \ Y0=-R*C0*S1 \ Z0=R*S0*F*F
830 R0=SQRT(X0*X0+Y0*Y0+Z0*Z0) \ R4=R5-R0*R0
840 INPUT "What is the first orbit ? ",N1 \ IF N1 >= N0 THEN 860
850 PRINT" Reference orbit is",N0 \ GOTO 840
860 INPUT "What is the last orbit to be printed ? ",N2
870 IF N2<N1 THEN N2=N1 \ I$=I$+" ORBITS "
880 INPUT "Which output device (0-7) ? ",P5
890 PRINT#P5,CHR$(12),"AZ-EL POINTING FOR ",I$,N1," TO ",N2
900 I$="FOR "+S$+" AT W.LONG "
910 PRINT#P5,I$,W1," & LAT ",L1,
920 IFL1>=0 THEN X$=" N " ELSE X$=" S "\ PRINT#P5, X$ +" MODE "+T$
930 PRINT#P5,"-------------------------------------------------------"
940 T1=T0+(N1-N0)*P0 \ T1=INT(T1*1440)/1440
950 T2=T1+(N2-N1+1)*P0
960 T3=T5/1440 \ T5=T5*60 \ L7=9E9 \ N7=-99
970 FOR T=T1 TO T2 STEP T3 \ E = FNS(T) \ IF E<-90 THEN 1010
980 N=INT(N0+N9+.1) \ IF N<>N7 THEN GOSUB 360
990 N7=N \ D7=FNT(T) \ T$=" "+FNZ$(H9)+":"+FNZ$(M9)
1000 PRINT#P5, T$,%9I,A,E,S7,%14F3,F8-F7*F9
1010 REM
1020 NEXT \ PRINT#P5,TAB(20),"END"
1030 DATA -3,2 \ REM-MIN EL,TIME INTERVALè1040 DATA "G3ZCZ/4X", -31.8,35.2 \ REM CALL,LONG,LAT
1050 REM FORMAT OF DATA = SPACECRAFT NAME
1060 REM ORBIT (#), DATE (YYDDD), EQR XSING TIME (HH,MM,SS), LONG ( DEG W)
1070 REM PERIOD (MIN), INCL (DEG), HEIGHT (KM)
1080 REM FORMAT="MODE",DOP=0/FREQ=1,EQUIV FREQ,KHZ
1090 REM "**",1,1 FOR END OF DATA FOR SATELLITE
1100 DATA "AMSAT OSCAR 7"
1110 DATA 16804,78200,00,36,52,67.5
1120 DATA 114.945199,101.7,1449.6
1130 DATA "A",0,175450.00,"AB",1,29502.00
1140 DATA "B",0,-286250.00,"BB",1,145972.00
1150 DATA "D",1,435100.00
1160 DATA "**",1,1
1170 DATA "AMSAT OSCAR 8"
1180 DATA 19370,81357,01,08,10,83.77
1190 DATA 103.179480,98.7987,905
1200 DATA "A",0,175450.00,"AB",1,29402.00
1210 DATA "J",0,+289100.00,"JB",1,435100.00
1220 DATA "**",1,1
1230 DATA "UoSAT OSCAR 9"
1240 DATA 01171,81357,00,16,58,138.2
1250 DATA 95.31353,97.462,536
1260 DATA "AB",1,29.500,"BB",1,145825.00
1270 DATA "**",1,1
1280 DATA " R S 3 "
1290 DATA 0 ,82018,01,05,50,231.9
1300 DATA 118.46293,82.9592,1632.7
1310 DATA "AB",1,29321,"**",1,1
1320 DATA " R S - 4"
1330 DATA 0 ,82018,00,43,23,225.9
1340 DATA 119.33912,82.9603,1666
1350 DATA "AB",1,29360,"**",1,1
1360 DATA "R S - 5 "
1370 DATA 0 ,82018,01,43,23,241.9
1380 DATA 119.49842,82.9629,1671.55
1390 DATA "A",0,175.450,"AB",1,29.330
1400 DATA "**",1,1
1410 DATA " R S - 6 "
1420 DATA 0 ,82018,00,23,17,221.2
1430 DATA 118.66154,82.9542,1641.7
1440 DATA "A",0,175.450,"AB",1,29.453
1450 DATA "**",1,1
1460 DATA " R S - 7 "
1470 DATA 0 ,82018,01,26,59,237.1
1480 DATA 119.14014,82.9629,1661.55
1490 DATA "A",0,175.450,"AB",1,29.501
1500 DATA "**",1,1
1510 DATA " R S - 8 "
1520 DATA 0 ,82018,01,04,18,231.1
1530 DATA 119.70890,82.9570,1675.25
1540 DATA "A",0,175.450,"AB",1,29.502
1550 DATA "**",1,1