PRINT "Values for other frequencies may be obtained by interpolation."
INPUT "Do you need to interpolate from the table";A$
IF LEFT$(A$,1)="Y" OR LEFT$(A$,1)="y" THEN GOSUB INTERPOLATE
RETURN
CALCLOSS:
' CALC ACTUAL LOSS FROM DB VALUES
' 1ST OBTAIN LOG FROM DB BY DIV/10
L=L/10
' ANTILOG OF L
AL=10^L
P1=XMITTERPOWER/AL
E=AL*POWERTOANTENNA
RETURN
INTERPOLATE:
' INTERPOLATION ROUTINE
CLS
PRINT
PRINT
INPUT "What is operating frequency";OF
CLS
GOSUB TABLE1
INPUT "What is closest frequency below operating frequency listed in table";LF
INPUT "What is the next higher frequency listed";HF
INPUT "Give loss at next lower frequency";DBCABLELOSS
INPUT "Give loss at next higher frequency";L2
FD=HF-LF
LD=L2-DBCABLELOSS
OD=OF-LF
OL=OD*LD/FD
LINELOSS=OL+DBCABLELOSS
PRINT
PRINT "Loss of transmission line at";OF;"MHz IS";LINELOSS;"db/100 Ft."
INPUT"Press <ENTER> to continue............";XX$
CLS
RETURN
FINISH:
GOTO BYE
PGMB:
PRINT " The first part of this section allows you to enter the trans-":PRINT"mitter output power and the effective radiated power you desire.":PRINT"YOU WILL THEN GET THE GAIN NEEDED TO OBTAIN THIS ERP."
PRINT"In the second part, you will enter the power that you
PRINT STRING$(80,"=");
INPUT "Do you want to find required system gain (1) or maximum allowable feedline loss (2)";T
INPUT "What is your transmitter power output power";P1
IF T=2 THEN GOTO GETPOWER
INPUT "What is your desired effective radiated power";E
GOSUB CALCPOWER
GOTO PRINTGAIN
CALCPOWER:
EL=E/P1
D=10*(LOG(EL)/LOG(10))
RETURN
PRINTGAIN:
CLS
PRINT "The required gain of your system is";D;"DB."
GOTO RUNAGAIN
GETPOWER:
E=0:INPUT "How much power do you expect to deliver to the antenna";E
GOSUB CALCPOWER
CLS
PRINT "The maximum allowable feedline loss to maintain";E;"Watts to"
PRINT"the antenna with a transmitter power output of";P1;"is";D;"db."
RUNAGAIN:
PRINT
PRINT
PRINT
PRINT
PRINT
INPUT "Do you want to run the (1) ERP program or(2) The maximum loss program or (3) terminate this session";W
CLS
PRINT STRING$(80,"=");
ON W GOTO START,PGMB,BYE
BYE:
PRINT STRING$(80,"=");
PRINT
PRINT
PRINT
PRINT "******************* B Y E *********************"