8-Bit Software Online Conversion
:2.$.WRLDLOC - Listing
2A%=PAGE:B%=TOP:IFA%=&E00GOTO10
3*KEY0F.Z%=0TO(B%-A%)S.4:Z%!&E00=Z%!
A%:N.:PA.=&E00|MO.|MG.10|M
4VDU21:*FX5,0
5*FX138,0,128
6*T.
7END
10ONERRORCLS:PROCoff:Q%=0:IFERL>79PRO
Cd(P%*3.556+640,O%*4.4+352,0):PROCd(J%,K
%,0):J%=1300:K%=1300:PROCg(1300):GOTO80
20CLEAR:*FX200,2
30*FX4,1
40VDU6:DIMF%(152):DIMx%(39):DIMy%(39)
:Q%=0:v%=0:h%=1280:FORN%=0TO39:x%(N%)=13
00:NEXT:CLS:PROCon:PRINTTAB(7)"Enter dat
e and time (GMT)":REPEATINPUT'TAB(13)"M
onth (1-12) "M%:UNTILM%>0ANDM%<13
60REPEATCLS:INPUT'TAB(13)"Day (1-31)
"D%:UNTILD%>0ANDD%<32:REPEATCLS:INPUT'TA
B(13)"Hours (0-23) "H%:UNTILH%>=0ANDH%<2
4:REPEATCLS:INPUT'TAB(13)"Mins (0-59) "I
%:UNTILI%>=0ANDI%<60
70TIME=H%*360000+I%*6000:C%=TIME+6000
:u%=C%+6000:R%=FNd(M%-1)+D%:PROCoff:PRIN
T''TAB(14)"Please wait":PROCc:CLS:PROCs
:PROCp
80J%=1300:K%=1300:P%=1300:DI%=0:A=0:R
EPEATPROCgetloc(" Base "):UNTILI$<>""AND
I$<>"N"
90AO=RADLA:OO=RADLO:SA=SINAO:CA=COSAO
:O%=LA+.5:P%=LO+.5:GCOL4,0:Q%=1:PROCd(P%
*3.556+640,O%*4.4+352,0):PRINT
100NC%=0:PT%=0:REPEATPROCgetloc("Remot
e"):PROCinfo:PROCg(1300ANDH<0):UNTILI$="
N":PROCd(P%*3.556+640,O%*4.4+352,0):PROC
d(J%,K%,0):GOTO80
130DEFPROCinfo:Q%=0:IFI$=""ORI$="N"CLS
:PROCoff:NC%=0:PT%=0:H=-1:ENDPROC
140PROCd(J%,K%,0):GCOL4,0:J%=INT(LO)*3
.556+640:K%=INT(LA)*4.4+352:Q%=1:PROCd(J
%,K%,0)
150LA=RADLA:LO=RADLO-OO:DC=SA*SINLA+CA
*COSLA*COSLO:VDU31,20,VPOS:@%=5:IFABSDC>
=1-5E-9THENPRINT20015ANDDC<0;" km":H=-1:
ENDPROC
160D=INT(6371.03*ACSDC+1):PRINTD;" km
":DI%=D DIV1000:P=ABS(1+2*INT((D-1)/50)
):PT%=PT%+P:NC%=NC%+1:IF D>16000:DI%=39
170PRINT"Beam heading";:@%=4:SL=SA:CL=
CA:O=OO:GOSUB190:M=H:A=H:PRINT" Ret
heading";:@%=4:SL=SIN(LA):CL=COS(LA):LA=
AO:O=LO+OO:LO=-LO
180GOSUB190:R=H:IFD<16000THENENDPROC E
LSECOLOUR129:PRINT"Long path ";40030-D;"
km Hdg";:H=M:GOSUB210:PRINT" Ret";:H=
R:GOSUB210:COLOUR128:PRINTSTRING$(40," "
);CHR$11;:ENDPROC
190IFCL<.0001THENH=-1:GOTO210ELSEHC=(S
INLA-DC*SL)/SQR(1-DC*DC)/CL:IFABSHC>.999
95THENH=180ANDHC<0:GOTO200ELSEH=DEGACSHC
:IFH<>0THENIFO>=0ANDLO<0ANDLO>-PI ORO<0A
ND(LO<0ORLO>PI)THENH=360-H
200PRINTINT(H+.5);:VDU240,84:RETURN
210IFH<0THENPRINT" INDEF";:RETURN ELSE
H=H-180*(1ORH<180):GOTO200
220DEFPROCtime:TX%=POS:TY%=VPOS
230IF TIME>u%PROCu:u%=u%+27000
240IF TIME>C%:C%=C%+6000:PROCp:IF H%+I
%=0PROCn:PROCp:PROCs:PROCc:PROCs
260VDU31,TX%,TY%:ENDPROC
270DEFPROCngr:e$="NGR":V1%=ASC(I$):V2%
=ASC(MID$(I$,2,1)):JQ%=INSTR("STNH",LEFT
$(I$,1)):IFJQ%=0:PROCerr:ENDPROC
280IFV2%<65ORV2%>90ORV2%=73:PROCerr:EN
DPROC
290NS$=MID$(I$,3):IFZ%=6:DI%=1:JZ%=2EL
SEDI%=10:JZ%=3
300E=VAL(LEFT$(NS$,JZ%))/DI%:N=VAL(RIG
HT$(NS$,JZ%))/DI%:IFJQ%>2:N=N+500*(1-(JQ
%=4))
310E=E+((JQ%+1)MOD2)*(500*-(JQ%<>4)):V
2%=V2%+(V2%>73)-65:E=E+(V2%MOD5)*100:N=N
+400-(V2%DIV5)*100:E=E*1000:N=N*1000:PRO
CLnL:LA=DEG(K):LO=DEG(L):PROCplat:Z%=0:E
NDPROC
320DEFPROCerr:VDU7:PRINT'"Error in ";e
$:ENDPROC
330DEFPROCLnL:A1=6377563.396:B1=635625
6.910:K0=49*PI/180:L0=-2*PI/180:E0=40000
0:N0=-100000:E2=6.67053997E-3:N1=1.67322
028E-3:K=(N-N0)/A1+K0:K3=K-K0:K4=K+K0:J3
=(1+N1+5/4*N1^2+5/4*N1^3)*K3:J4=(3*N1+3*
N1^2+21/8*N1^3)*SIN(K3)*COS(K4)
340M=B1*(J3-J4):K=K+(N-N0-M)/A1:V=A1/S
QR(1-E2*SIN(K)^2):R=V*(1-E2)/(1-E2*SIN(K
)^2):H2=V/R-1:Y1=E-E0:J3=TAN(K)/(2*R*V):
K9=K-Y1^2*J3:J6=1/(COS(K)*V):L=L0+Y1*J6:
K=K9:ENDPROC
350DEFPROCgetloc(P$):REPEATCOLOUR3:PRI
NT'"Enter ";P$;" Location ";:I$=FNin:COL
OUR2
360Z%=LENI$:IFZ%=0GOTO480
400LE%=0:NU%=0:FORT%=1TOZ%:A$=MID$(I$,
T%,1):IFA$<":"ANDA$>"-"NU%=1 ELSELE%=1
410NEXT:IFNU%=0PROCplc:GOTO480
420IFLE%=0PROClat:GOTO480
425IFZ%=7ORZ%<4ANDZ%>0ORZ%>8e$="Input"
:PROCerr:GOTO480
430IFZ%=4:PROCmad
440IFZ%=5:PROCqth
450IFZ%=8:PROCngr
460IFZ%=6:IFRIGHT$(I$,1)<":":PROCngr
470IFZ%=6:IFRIGHT$(I$,1)>"@":PROCmad
480UNTILZ%=0:ENDPROC
510DEFPROCplc:IFI$="N":Z%=0:ENDPROC
520C$=I$:Q%=1:PROCb:IF Q%=0:ENDPROC
550PROCplat:Z%=0:ENDPROC
560DEFPROCmad:IF Z%=4:I$=CHR$(74+(LEFT
$(I$,1)>"4"))+"O"+I$:VDU31,22,VPOS-1,17,
3:PRINTI$:COLOUR2
580e$="Locator":Z1%=ASC(I$)-65:Z2%=ASC
(MID$(I$,2))-65:Z3%=ASC(MID$(I$,5))-65:Z
4%=ASC(RIGHT$(I$,1))-65:Z5%=ASC(MID$(I$,
3))-48:Z6%=ASC(MID$(I$,4))-48
590IF Z1%<0ORZ1%>17ORZ2%<0ORZ2%>17ORZ3
%<0ORZ3%>23ORZ4%<0ORZ4%>23ORZ5%<0ORZ5%>9
ORZ6%<0ORZ6%>9:PROCerr:ENDPROC
600LA=10*Z2%+Z6%+(Z4%+.5)/24-90:LO=20*
Z1%+2*Z5%+(Z3%+.5)/12-180
610PROCplat:Z%=0:ENDPROC
670DEFFNin:LOCALG,S$:PROCon:S$="":REPE
ATREPEATPROCtime:G=INKEY(1000):UNTILG>0:
G=G-(32ANDG>96):IFG>47ANDG<58ORG>64ANDG<
91ORG=46ORG=32S$=S$+CHR$G:VDUG:ELSEIFG=9
5ANDLENS$S$=LEFT$(S$,LENS$-1):VDU127:ELS
EIFG<>13VDU7
700UNTILG=13:PRINT:PROCoff:=S$
780DEFPROCon:VDU23,1,1;0;0;0;:ENDPROC
790DEFPROCoff:VDU23,1,0;0;0;0;:ENDPROC
800DEFPROClat:LA%=VALI$:e$="Latitude":
IFLA%<0ORLA%>90:PROCerr:ENDPROC
810CLS:PRINT'"Degrees latitude ";LA%:I
FLA%=90T=0:GOTO830
820REPEATPRINT'"Minutes latitude ";:I$
=FNin:T=VALI$:UNTILI$<>""ANDT>=0ANDT<60
830PRINT'"North or South (N/S) ";:REPE
ATG=GET AND223:UNTILG=78ORG=83
840LA=(LA%+T/60)*(1ORG=83)
850REPEATCLS:PRINT'"Degrees longitude
";:I$=FNin:LO%=VALI$:UNTILI$<>""ANDLO%>=
0ANDLO%<181:IFLO%=180T=0:GOTO870
860REPEATPRINT'"Minutes longitude ";:I
$=FNin:T=VALI$:UNTILI$<>""ANDT>=0ANDT<60
870PRINT'"East or West (E/W) ";:REPEAT
G=GET AND223:UNTILG=69ORG=87
880LO=(LO%+T/60)*(1ORG=87)
890CLS:PROCplat
910Z%=0:ENDPROC
920DEFPROCplat:AJ%=ABS(LA*60)+.5:OJ%=A
BS(LO*60)+.5:PRINT"";AJ%DIV60;CHR$240;AJ
%MOD60;"'";CHR$(78-(LA<0)*5);" ";OJ%DIV
60;CHR$240;OJ%MOD60;"'";CHR$(69-(LO<0)*1
8);SPC(12);:ENDPROC
930DEFPROCqth
940X=ASC(I$)-65:Y=ASC(MID$(I$,2))-65:Z
=ASC(MID$(I$,5))-69:V=ASC(MID$(I$,3))-48
:W=ASC(MID$(I$,4))-48:LA=40+Y-(26ANDY>20
):LO=2*X-(52ANDX>19):e$="QTH"
950IFX<0ORX>25ORY<0ORY>25ORZ<-4ORZ>5OR
Z=4ORV<0ORV>8ORW<0ORW>9OR10*V+W=0OR10*V+
W>80ORLA>=90THENPROCerr:ENDPROC ELSEIFW=
0THENV=V-1:W=10
960LA=LA+.9375-V/8+((ABS(Z)<2)-(ABS(Z)
>2ANDZ<4))/24:LO=LO+W/5-.1-(SGN(Z)ANDABS
(Z)<4)/15
970PROCplat:Z%=0:ENDPROC
980DEFFNd(M%):RESTORE1330:FORN%=1TOM%:
READE%:NEXT:IFM%=0=0ELSE=E%
990DEFFNf(A%)=RIGHT$(STR$(A%+100),2)
1000DEFFNc=INT(8-.035*R%+SIN(.037*R%-.1
85)*(6+.02*R%))
1010DEFFNm=MID$("JANFEBMARAPRMAYJUNJULA
UGSEPOCTNOVDEC",3*M%-2,3)
1020DEFFNt(z%):t%=TIME+z%:H%=(t%DIV3600
00)MOD24:I%=(t%DIV6000)MOD60:=FNf(H%)+".
"+FNf(I%)
1030DEFFNx(A%)=4*(A%DIV180)
1040DEFFNy(A%)=4*(A%MOD180)
1050DEFFNa(B$):LOCALA%,B%:FORB%=1TO3:A%
=80*A%+ASC(MID$(B$,B%,1))-47:NEXT:=A%
1060DEFPROCc:LOCALI%,J%,X%,Y%:IFR%>81AN
DR%<264 G%=1ELSEG%=-1
1070A=ABS(.4102*COS(.0172*((R%+10)MOD36
5))):c=COS(A):s=SIN(A):L%=98-INT(98*.636
5*A):IFL%>86 L%=86
1080I%=INT(TIME/6750-FNc)MODh%:IFI%<0 I
%=I%+h%
1090FORY%=1TOL%:X%=4*INT(50.6*ATN(TAN(A
CS((SIN((Y%-.5)*.01587))/c))/s)):J%=G%*(
X%-316):F%(66+Y%)=(1596-J%-I%)MODh%+10^4
*((2244+J%-I%)MODh%):IFY%<67 F%(67-Y%)=(
1596+J%-I%)MODh%+10^4*((2244-J%-I%)MODh%
)
1100NEXT:ENDPROC
1110DEFPROCs:GCOL4,0:FORY%=1TO66+L%:PRO
Cl:NEXT:IFG%=1ANDL%<86:FORY%=L%TO86:MOVE
0,4*Y%+648:DRAWh%,4*Y%+648:NEXT
1120ENDPROC
1130DEFPROCl:S%=F%(Y%)DIV10^4:E%=4*Y%+3
80:F%=F%(Y%)MOD10^4:IFS%>F%MOVE0,E%:DRAW
F%,E%:MOVES%,E%:DRAWh%,E%ELSEMOVES%,E%:D
RAWF%,E%
1140ENDPROC
1150DEFPROCb:LOCALB%:c$=LEFT$(C$,1):IFL
EN(C$)<6ORMID$(C$,5,2)=" I"ORMID$(C$,6,2
)=" I"ORMID$(C$,3,1)="H"ORMID$(C$,4,1)="
Z"ORMID$(C$,7,3)="X I"B%=3ELSEB%=5:IFMID
$(C$,3,1)<"O"c$=CHR$(ASC(c$)+32)
1160c$=c$+MID$(C$,B%,2):RESTORE1340:z%=
0:REPEAT:READK$:z%=z%+VAL(K$):UNTILLEFT$
(K$,3)=c$ORK$="*":z%=z%*60000:IFK$="*"PR
INT'"Not known":VDU7:Q%=0:ENDPROC
1170A%=FNa(RIGHT$(K$,3)):LO=(FNx(A%)-64
0)/3.556:LA=(FNy(A%)-352)/4.4:PROCt:Z%=0
:ENDPROC
1190DEFPROCt:COLOUR3:PRINTFNt(z%);" ";C
$:COLOUR2:ENDPROC
1200DEFPROCn:IFR%>=FNd(M%) D%=1:M%=(M%+
1)MOD12ELSED%=D%+1
1210R%=FNd(M%-1)+D%:ENDPROC
1220DEFPROCp:?&30B=0:PRINTTAB(0,0)FNt(0
);" GMT ";FNm;" ";FNf(D%):?&30B=20:VDU3
0:ENDPROC
1230DEFPROCu:LOCALK%:FORY%=1TO66+L%:F%=
(1276+F%(Y%)MOD10^4)MODh%:S%=(1276+F%(Y%
)DIV10^4)MODh%:F%(Y%)=F%+10^4*S%:K%=4*Y%
+380:MOVES%,K%:DRAWS%,K%:MOVEF%+4,K%:DRA
WF%+4,K%:NEXT:ENDPROC
1270DEFPROCd(X%,Y%,Z%):MOVEX%-20,Y%+304
:VDU5,240+Z%,4:PROCoff:ENDPROC
1280DEFPROCg(W%)
1290GCOL4,0:x=640+P%*3.556:K=-203.7:IFA
<180 K=-K
1300e=SIN(RAD(O%)):f=COS(RAD(O%)):g=COS
(RAD(A)):FORN%=1TO39:IFO%=90ORW%>1279ORN
%>DI%x%=1300:y%=0::GOTO1320 ELSEh=COS(N%
*PI/20):i=g*f*SIN(N%*PI/20)+e*h:j=ASN(i)
:y%=352+252*j:IFN%=21 K=-K
1310Z=(h-e*i)/f/COSj:IFABSZ>1Z=SGNZ
1315x%=(1281+x+K*ACSZ)MODh%
1320PROCd(x%(N%),y%(N%),1):PROCd(x%,y%,
1):x%(N%)=x%:y%(N%)=y%:NEXT:ENDPROC
1330DATA31,59,90,120,151,181,212,243,27
3,304,334,365
1340DATAaER3`J,aJA3a=,ACR3X=,aNS3:j,CBL
3Ho,DKA34H,dIN3KJ,eBU3R9,FRO3KS,fTO3=@,l
ON3Xp,LON3Fb,mIR36o,mOV3Af,RJ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