home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 3: The Continuation
/
17-Bit_The_Continuation_Disc.iso
/
files
/
arug23.dms
/
arug23.adf
/
Satellite1
/
colourmaptrack
< prev
next >
Wrap
Text File
|
1993-12-02
|
14KB
|
508 lines
' ColourTrack
' Version 1.00 Last modified by ACH on 14th September 1988
120 begin:
130 SCREEN 1,640,250,3,2:WINDOW 2," Satellite track ",(0,0)-(340,120),16,1
chc=1
PALETTE 5,.47,.87,1
PALETTE 6,.73,1,0
COLOR 2,6
CLS
RESTORE
280 READ N
290 IF N < 0 THEN 1620
300 READ X1,Y1,X,Y
310 IF chc = 1 THEN LINE (X1*2, Y1+10) - (X*2,Y+10),2
330 FOR J=3 TO N
340 READ X,Y
350 IF chc = 1 THEN LINE -(X*2, Y+10),2
360
370 NEXT J
380 GOTO 280
390 DATA 168,2,16,3,16,3,15,4,14,6,14,6,12,8,12,9,10,10,10,12,9,15,9,17,10
400 DATA 19,11,25,11,27,12,27,13,30,13,30,12,28,12,28,10,26,10,26,9,28,8,30,8
410 DATA 30,9,32,10,32,9,33,9,33,12,31,12,32,13,35,13,35,11,37,9,39,9,36,12
420 DATA 39,12,39,10,40,9,43,9,46,12,46,14,43,17,40,15,40,14,42,14,43,13,42,12
430 DATA 40,12,40,13,38,14,38,16,34,16,30,19,30,20,33,22,34,22,34,25,37,21
440 DATA 36,19,39,17,40,17,41,18,41,19,43,18,44,22,46,23,46,24,45,24,45,25
450 DATA 45,26,46,26,46,28,43,27,43,26,45,25,42,25,39,25,40,27,40,30,37,30
460 DATA 32,35,32,37,28,39,29,43,28,44,27,43,26,40,24,40,24,41,21,41,18,44
470 DATA 18,46,17,47,19,49,21,48,21,46,24,46,22,51,25,51,25,55,28,55,28,56
480 DATA 29,56,32,53,35,55,36,54,42,58,44,58,45,60,45,62,47,62,48,64,51,64
490 DATA 54,66,54,68,52,71,52,76,48,80,48,83,45,87,45,88,42,91,42,94,43,95
500 DATA 43,99,45,100,42,100,43,99,41,100,38,96,35,88,35,83,34,76,30,74,30,73
510 DATA 26,66,26,62,28,57,27,56,24,56,22,53,21,53,21,52,19,52,19,51,16,51
520 DATA 12,49,13,47,10,40,11,46,10,46,8,42,8,38,7,37,7,32,11,27,12,27,12,26
530 DATA 11,24,12,19,9,17,7,18,6,18,6,19,4,19,2,20,2,16
540 DATA 5
550 DATA 31,8,34,7,35,8,32,9,31,8
560 DATA 4
570 DATA 34,9,36,9,34,11,34,9
580 DATA 5
590 DATA 36,7,38,7,38,8,36,8,36,7
600 DATA 40
610 DATA 42,7,46,4,44,4,43,6,41,6,41,5,44,4,48,2,50,2,51,3,50,4,54,3,58,3,61,1
620 DATA 64,1,65,3,67,3,67,4,65,8,64,8,62,10,63,10,63,11,59,12,58,14,57,14
630 DATA 53,19,51,18,49,14,51,12,51,11,52,11,52,8,48,8,47,7,50,4,48,4,45,8
640 DATA 44,7,42,7
650 DATA 6
660 DATA 62,13,66,13,67,14,64,16,62,14,62,13
670 DATA 7
680 DATA 25,46,26,45,28,45,31,47,29,48,29,47,25,46
690 DATA 5
700 DATA 32,47,34,48,32,49,31,48,32,47
710 DATA 5
720 DATA 78,5,80,5,81,6,79,7,78,5
730 DATA 4
740 DATA 81,4,82,4,82,5,81,4
750 DATA 4
760 DATA 81,6,82,6,82,7,81,6
770 DATA 8
780 DATA 94,10,94,8,97,6,98,6,98,7,95,9,95,10,94,10
790 DATA 9
800 DATA 96,70,98,69,98,68,99,67,100,70,98,76,96,77,95,75,96,70
810 DATA 5
820 DATA 140,20,143,23,143,25,142,25,140,20
830 DATA 5
840 DATA 143,26,145,26,146,27,144,29,143,26
850 DATA 9
860 DATA 145,29,147,30,147,33,143,36,142,35,144,34,142,34,145,32,145,29
870 DATA 5
880 DATA 139,40,140,40,140,43,139,42,139,40
890 DATA 7
900 DATA 140,46,141,45,142,48,143,50,142,50,139,48,140,46
910 DATA 4
920 DATA 140,51,140,52,139,53,140,51
930 DATA 4
940 DATA 142,50,143,52,142,52,142,50
950 DATA 10
960 DATA 144,52,145,53,144,56,143,55,143,54,142,54,142,53,142,52,143,52,144,52
970 DATA 9
980 DATA 138,54,140,54,140,60,138,62,135,62,134,060,134,57,136,57,138,54
990 DATA 8
1000 DATA 141,58,144,58,144,59,142,59,143,64,141,64,140,62,141,58
1010 DATA 5
1020 DATA 145,58,146,58,146,59,145,59,145,58
1030 DATA 15
1040 DATA 147,59,149,59,150,60,152,60,156,62,158,64,160,64,158,66,160,68,157,68
1050 DATA 155,66,152,67,151,64,148,62,147,59
1060 DATA 4
1070 DATA 143,66,140,66,140,67,141,67
1080 DATA 2
1090 DATA 143,67,144,66
1100 DATA 13
1110 DATA 160,86,162,86,163,90,160,93,159,92,154,96,152,96,152,95,158,91
1120 DATA 159,92,159,90,161,89,160,86
1130 DATA 26
1140 DATA 133,85,134,83,134,76,136,74,138,74,143,70,145,70,148,68,150,68
1150 DATA 150,70,152,72,153,68,154,68,156,76,158,78,152,88,146,89,148,90
1160 DATA 148,91,146,92,146,89,144,84,139,84,139,85,134,85,133,84
1170 DATA 10
1180 DATA 126,55,127,55,133,61,132,65,136,66,137,65,136,64,131,64,126,57,126,55
1190 DATA 9
1200 DATA 68,20,70,19,71,20,71,22,72,23,72,24,68,25,69,22,68,20
1210 DATA 5
1220 DATA 68,22,68,24,66,24,67,22,68,22
1230 DATA 178
1240 DATA 65,36,60,44,60,52,66,57,74,57,74,60,77,64,77,68,76,70,76,73,81,83
1250 DATA 86,83,91,76,91,73,94,70,94,66,93,64,93,62,100,54,100,51,96,52
1260 DATA 92,47,90,40,94,46,96,50,100,49,102,48,105,44,103,42,108,42,110,45
1270 DATA 112,45,113,52,115,55,116,55,117,52,117,55,118,55,118,53,117,52
1280 DATA 118,48,122,44,127,51,127,53,130,58,132,58,132,57,128,52,128,50
1290 DATA 132,54,134,52,134,50,132,46,132,44,136,44,138,42,139,36,136,34
1300 DATA 136,32,134,32,134,30,137,30,139,34,140,34,141,33,139,30,139,28
1310 DATA 141,28,141,28,136,18,136,16,141,16,141,14,143,14,143,18,147,21
1320 DATA 148,20,145,15,148,12,147,10,150,10,149,8,146,8,144,7,138,7,138,8
1330 DATA 134,8,134,7,126,7,126,8,122,8,122,7,115,7,114,5,110,5,110,4,108,4
1340 DATA 106,2,104,4,105,4,105,3,106,3,106,5,108,5,108,7,106,7,102,9,104,12
1350 DATA 102,12,100,8,99,8,99,10,100,12,94,12,92,13,91,11,90,11,90,14,88,15
1360 DATA 88,14,89,13,84,10,82,10,74,17,74,20,76,19,79,21,80,20,80,17,82,14
1370 DATA 84,16,82,18,83,20,80,22,76,22,76,20,75,20,75,22,70,26,69,26,70,28
1380 DATA 70,29,66,29,65,33,67,34,71,33,71,31,76,29,79,33,79,34,80,34,80,31
1390 DATA 76,28,79,28,83,34,83,32,86,31,86,28,88,28,89,29,90,27,92,27,91,28
1400 DATA 93,30,88,30,85,33,86,34,90,34,90,38,86,38,83,36,80,38,76,36,76,34
1410 DATA 71,34,70,35,67,35,65,36
1420 DATA 5
1430 DATA 96,28,98,27,100,34,98,34,96,28
1440 DATA -34
1620
WINDOW 1,"parameters",(0,137)-(622,230),16,1
WINDOW OUTPUT 2
PAINT (10,10),5,2
LINE (0,65)-(360,65),2
LINE (140,0)-(140,120),2
PAINT (165,45),5,2
WINDOW OUTPUT 1
COLOR 2,1
CLS
P=0
DEFDBL A-Z
start=0
C8$=CHR$(10)+CHR$(10)+CHR$(10)+CHR$(10)
50
ss=0
PRINT "AMSAT ORBITAL PREDICTION PROGRAM"
PRINT "COPYRIGHT 1980 DR. TOM CLARKE W3IWI"
PRINT "TRANSLATED FOR AMSAT UK BY G3WDI"
PRINT "COPYRIGHT AMSAT-UK. 1988"
REM SET STARTING DATA
INPUT "start year = ",Y:Y=Y/100:Y=INT(100* (Y-INT(Y)) + .1)
IF Y/4=INT(Y/4) THEN F9=1 ELSE F9=0
INPUT " month = ",M
INPUT " day = ",d
DEF FNt$(d)= CHR$(48+INT(d/10))+CHR$(48+d-10*INT(d/10))
t$=FNt$(d)+"/"+FNt$(M)+"/"+FNt$(Y)+" at "
RESTORE daysofyear:
FOR I= 1 TO M:READ D9:NEXT:D8=d+D9
IF M>2 THEN D8=D8+F9 :PRINT " day = ",D8
PRINT
INPUT"Start : UTC hours= ",H
INPUT" Mins= ",M
T7=D8+H/24+M/1440
t$=t$+FNt$(H)+FNt$(M)+":00"
PRINT ''
INPUT"duration hours= ",H1
INPUT" mins= ",M1:T8=T7+H1/24+M1/1440
PRINT ''
INPUT "TIMESTEP: Min= ",M2:T9=M2/1440
PRINT '
PRINT " from ",:PRINT USING"######.####";T7,:PRINT " to ";:PRINT USING"######.####";T8
RESTORE Physicaldata:
READ P1,C,R0,F,G0,G1
P2=2*P1:P0=P1/180:F=1/F
Getyear:
READ Y1,G2:IF Y1=Y THEN statdata:
IF Y1>0 THEN Getyear:
IF Y1=0 THEN PRINT "UNABLE TO FIND YEAR:STOP
statdata:
RESTORE stationdata:
READ l9,w9,H9,C$,e8
GOSUB observerdata: PRINT''
DEFDBL Q,k
GOSUB pobsdata:
PRINT "-------------satellite selection menu -------------------------"
I=0:RESTORE keps:
WINDOW 3,"which Satellite ",(362,0)-(630,120),16,1
COLOR 2,1:CLS
mnu:
READ s$:IF s$="END" THEN choice: ELSE READ I$:I=I+1
PRINT "Entry # ";I;" for ";s$
READ d,d,d,d,d,d,d,d,d,d,d,d,d,d : GOTO mnu:
choice:
INPUT "Select entry # ",J:RESTORE keps:
IF J<1 OR J>I THEN choice:
CLS
FOR I= 1 TO J:READ s$,I$,Y3,D3,H3,M3,S3 'Read keps for chosen satellite
READ K0,M0,N0,A0,i0,E0,W0,O0,F1:NEXT ' by stepping through.
WINDOW OUTPUT 1
'PRINT :PRINT "Doppler calculated for frequency = ",F1," MHz "
'INPUT "Change frequency to (0 for default) ",d
IF d<>0 THEN F1=d
IF Y3<>Y THEN PRINT "ELEMENTS NOT FROM CURRENT YEAR":STOP
IF D3=INT(D3) THEN T0=D3+H3/24+M3/1440+S3/86400& ELSE T0=D3
PRINT :PRINT "Orbital Elements for ";s$
PRINT " Reference Id.= ";I$:PRINT
'PRINT "Reference Epoch = ";Y3;" + ";T0
'PRINT "Starting Epoch = ";Y;" + ";T7;" = ";T$
'PRINT
'PRINT "Parameter";SPC(9);"Reference";SPC(22);"Starting"
t=T7
GOSUB matrix: : GOSUB meananomoly:
'PRINT "Orbit number ";SPC(10);K0;SPC(10);K
'PRINT "Mean Anomaly ";SPC(10);M0;SPC(10);M/P0
'PRINT "Inclination ";SPC(10);I0
'PRINT "Eccentricity ";SPC(10);E0
'PRINT "Mean Motion ";SPC(10);N0
'PRINT "S.M.A.,Km ";SPC(10);A0
'PRINT "Arg.Perigee ";SPC(10);W0;SPC(10);W
'PRINT " R. A. A. N. ";SPC(10);O0;SPC(10);O
'PRINT "Freq. Mhz. ";SPC(10);F1
fsh=0
k9=8999999000#:k8=8999999000#:
maincomputationloop:
FOR t=T7 TO T8 STEP T9:k7= INT(t):GOSUB meananomoly
IF k=k9 THEN 720:GOSUB matrix::k8=8999999000#:k9=8999999000#
720 GOSUB Keplerseq:
GOSUB parameters:
start = 0
IF fsh=1 AND e9<e8 THEN GOSUB last:
WINDOW OUTPUT 2
IF l5>0 THEN l6=90-l5 ELSE l6=90-l5
IF w5 <180 THEN w6=180-w5 ELSE w6 =540-w5
IF i0> 90 THEN GOTO gtr:
IF yyy>w6 THEN start=1
gtr:
IF i0>90 AND yyy<w6 THEN start=1
IF start=1 THEN PSET (w6*329/360-20,l6*129/180+10)
LINE -(w6*329/360-20,l6*129/180+10)
xxx=l6
yyy=w6
WINDOW OUTPUT 1
IF e9<e8 THEN 830
IF k7=k8 AND k9=k THEN 770
730 IF k=k9 THEN 760 ELSE GOSUB pager:
k9=k
740 PRINT " U.T.C. AZ EL DOPPLER RANGE HEIGHT LAT LONG PHASE"
750 PRINT "HHMM:SS deg deg Hz km km deg deg (256)"
760 PRINT SPC(10);"---DAY# ";k7;"---ORBIT # ";k;"----"
770 k8=k7:T4=t-k7:S4=INT(T4*86400& +.5):H4=INT(S4/3600+.000001)
780 M4=INT((S4-H4*3600)/60+.000001):S4=INT(S4-3600*H4-60*M4)
790 t$=FNt$(H4)+FNt$(M4)+":"+FNt$(S4)
GOSUB startime:
800 F9=-F1*1000000!*R8/C : DEF FNI(d)=SGN(d)*INT(ABS(d)+.5)
810 PRINT t$;:PRINT USING "######";FNI(A9);FNI(e9);:PRINT USING"#######";FNI(F9);
PRINT USING "#########";FNI(R5);FNI(R-R0);:PRINT USING"######";FNI(l5);FNI(w5);M9
820 finish$=t$
fsh=1
830 NEXT:PRINT: INPUT"PRESS RETURN TO CONTINUE:",d$:IF d$="s" THEN STOP
GOTO begin:
pager:
PRINT C9$;C$;" lat=";l9;" W.Long=";w9;" Ht. = "H9;
P=P+1:PRINT SPC(10);" Pg.="P
PRINT SPC(10);"---MINIMUM ELEVATION= ";e8;"Deg.--"
PRINT
RETURN
startime:
WINDOW OUTPUT 3
IF ss=0 THEN PRINT " listen time for :- ";s$
IF qq=1 THEN ss=0
IF qq=1 THEN qq=0
ss=ss+1
IF ss=1 THEN PRINT t$;" - ";
WINDOW OUTPUT 1
RETURN
last:
WINDOW OUTPUT 3
PRINT finish$
fsh=0
qq=1
RETURN
observerdata:
L8=l9*P0
S9=SIN(L8)
C9=COS(L8)
S8=SIN(-w9*P0):C8=COS(w9*P0)
R9=R0*(1-(F/2)+(F/2)*COS(2*L8))+H9/1000
L8=ATN((1-F)^2*S9/C9):Z9=R9*SIN(L8)
X9=R9*COS(L8)*C8:Y9=R9*COS(L8)*S8
RETURN
pobsdata:
PRINT C$;" Lat.="l9;" W.Long.=";w9;" ht.=";H9
PRINT TAB(5)"---Minimum elevation ";e8;"Deg--"
PRINT
RETURN
matrix:
IF N0>.1 THEN A0=((G0/(N0^2))^(1/3))
IF N0<=.1 THEN N0=SQR(G0/(A0^3))
E2=1-E0^2:E1=SQR(E2):Q0=M0/360+K0
K2=9.95*((R0/A0)^3.5)/(E2^2)
S1=SIN(i0*P0):C1=COS(i0*P0)
O=O0-(t-T0)*K2*C1
S0=SIN(O*P0)
C0=COS(O*P0)
W=W0+(t-T0)*K2*(2.5 * (C1^2)-.5)
S2=SIN(W*P0)
C2=COS(W*P0)
C(1,1)=+(C2*C0)-(S2*S0*C1)
C(1,2)=-(S2*C0)-(C2*S0*C1)
C(2,1)=+(C2*S0)+(S2*C0*C1)
C(2,2)=-(S2*S0)+(C2*C0*C1)
C(3,1)=+(S2*S1)
C(3,2)=+(C2*S1)
RETURN
meananomoly:
Q=N0*(t-T0)+Q0:k=INT(Q):M9=INT((Q-k)*256):M=(Q-k)*P2
RETURN
keps:
DATA "MIR"
DATA "NASA"
DATA 88,221.77631,0,0,0
DATA 14211
DATA 89.46
DATA 15.71082,0
DATA 51.62
DATA 0.0019
DATA 270.39
DATA 157.06
DATA 143.625
DATA "METEOR 2/16"
DATA "NASA"
DATA 88,221.1687,0,0,0
DATA 4923
DATA 358.69
DATA 13.83355,0
DATA 82.56
DATA 0.0013
DATA 1.45
DATA 107.54
DATA 137.850
DATA "METEOR 2/15"
DATA "NASA"
DATA 88,221.49481,0,0,0
DATA 7899
DATA 278.33
DATA 13.83599,0
DATA 82.47
DATA 0.0014
DATA 81.95
DATA 52.59
DATA 137.85
DATA"NOAA-10"
DATA"NASA"
DATA 88,221.20959,0,0,0
DATA 9817
DATA 283.30
DATA 14.22608,0
DATA 98.68
DATA 0.0015
DATA 76.98
DATA 251.17
DATA 137.5
DATA "NOAA-9"
DATA "NASA"
DATA 88,207.77328,0,0,0
DATA 18639
DATA 214.23
DATA 14.11613,0
DATA 99.1
DATA 0.0015
DATA 145.99
DATA 183.10
DATA 137.62
DATA "METEOR 30"
DATA "NASA"
DATA 87,346.29912200,0,0,0
DATA 40878
DATA 72.8717
DATA 14.98493528,0
DATA 97.7216
DATA 0.0041
DATA 286.7977
DATA 72.4335
DATA 137.010
DATA "SALYUT 7"
DATA "NASA"
DATA 88,221.79446,0,0,0
DATA 36015
DATA 336.53
DATA 15.33203,0
DATA 51.61
DATA 0.0001
DATA 23.65
DATA 35.54
DATA 20.005
DATA "oscar-9"
DATA "amsat-uk"
DATA 88,9.26122218,0,0,0
DATA 34825
DATA 182.6754
DATA 15.31087661,0
DATA 97.63
DATA 0.000
DATA 177.45
DATA 37.4965
DATA 145.825
DATA "oscar 11"
DATA "amsat-uk"
DATA 88,9.20080544,0,0,0
DATA 20580
DATA 192.7829
DATA 14.62212586,0
DATA 98.0797
DATA 0.001
DATA 167.37
DATA 75.76
DATA 145.825
DATA "END"
'ADD NEW DATA HERE NAME, SOURCE, EPOCH, ORBIT, MA, MM, INC, ECC, ARG, RAAN, FQ
Physicaldata:
DATA 3.1415926535,2.997925E5,6378.160,298.25: 'PI/VEL LIGHT/RAD EARTH/FLATTENING
DATA 7.5369793E13,1.0027379093: 'GM OF EARTH/SID/SOLAR TIME
siderealdata:
DATA 86,0.27
DATA 87,0.2753552680
DATA 88,0.2746921630
DATA 89,0.2767669670
DATA 90,0.2767669760
DATA 0,0
stationdata:
DATA 51.26833,0.56333,35,"G8NTH",1: 'Long,Lat deg west,height meters,Callsign,min ele of horz.
daysofyear:
DATA 0,31,59,90,120,151,181,212,243,273,304,334,365
Keplerseq:
E=M+E0*SIN(M)+.5*(E0^2)*SIN(2*M)
10420 S3=SIN(E):C3=COS(E):R3=1-E0*C3:M1=E-E0*S3
M5=M1-M:IF ABS(M5)<.000001 THEN 10450 ELSE E=E-M5/R3:GOTO 10420
10450 X0=A0*(C3-E0):Y0=A0*E1*S3:R=A0*R3
X1=X0*C(1,1)+Y0*C(1,2):Y1=X0*C(2,1)+Y0*C(2,2):Z1=X0*C(3,1)+Y0*C(3,2)
G7=t*G1+G2:G7=(G7-INT(G7))*P2:S7=-SIN(G7):C7=COS(G7)
X=+(X1*C7)-(Y1*S7):Y=+(X1*S7)+(Y1*C7):Z=Z1:RETURN
parameters:
x5=(X-X9):y5=(Y-Y9):Z5=Z-Z9:R5=SQR(x5^2+y5^2+Z5^2)
IF T6<>t THEN R8=((R6-R5)/(T6-t))/86400&
IF T6=t THEN R8 = -8999999000#
R6=R5:T6=t
Z8=+(x5*C8*C9)+(y5*S8*C9)+(Z5*C9)
X8=-(x5*C8*S9)-(y5*S8*S9)+(Z5*C9):Y8=(y5*C8)-(x5*S8)
S5=Z8/R5:C5=SQR(1-S5*S5):e9=ATN(S5/C5)/P0
A9=ATN(Y8/X8)/P0
w5=(ATN(Y/X))*57.3
IF X<0 THEN w5=180-w5
IF X>0 AND Y<0 THEN w5=-w5
IF X>0 AND Y>0 THEN w5=360-w5
IF X=0 AND Y>=0 THEN w5=270
IF X=0 AND Y<0 THEN w5=90
IF X8<0 THEN A9=A9+180
IF X8>0 AND Y8<0 THEN A9=360+A9
IF X8=0 AND Y8>=0 THEN A9=90
IF X8=0 AND Y8<0 THEN A9=270
B5=Z/R:l5=ATN(B5/(SQR(1-B5^2)))/P0
RETURN