home *** CD-ROM | disk | FTP | other *** search
/ HAM Radio 3 / hamradioversion3.0examsandprograms1992.iso / math / coax / coax.bas (.txt)
Encoding:
GW-BASIC  |  1987-04-13  |  2.7 KB  |  65 lines

  1. 10  CLS
  2. 20  PRINT:PRINT"***** COAX CALCULATOR BY S. W. CLOW *****"
  3. 30  FOR T = 1 TO 1000: NEXT T
  4. 40  PRINT:PRINT"This program uses the velosity factor in all calculations, subracts 4 inches     from wattmeter coax lengths and uses a percentage of wavelength in cavity coax calculations.--Hit any key when ready"
  5. 50  MS$= INKEY$: IF MS$="" THEN 50
  6. 60  CLS
  7. 70  PRINT"1.   8214   RG8/U     Vel. factor = 78%"
  8. 80  PRINT"2.   8242   RG9/U     Vel. factor = 66%"
  9. 90  PRINT"3.   8219   RG58A/U   Vel. factor = 78%"
  10. 100  PRINT"4.   8240   RG58/U    Vel. factor = 66%"
  11. 110  PRINT"5.   8259   RG58A/U   Vel. factor = 66%"
  12. 120  PRINT"6.   83242  RG142B/U  Vel. factor = 69%"
  13. 130  PRINT"7.   8216   RG174/U   Vel. factor = 66%"
  14. 140  INPUT"Choose type of coax (1-7)"; X
  15. 150  IF X=1 THEN VF=0.78
  16. 160  IF X=2 THEN VF=0.66
  17. 170  IF X=3 THEN VF=0.78
  18. 180  IF X=4 THEN VF=0.66
  19. 190  IF X=5 THEN VF=0.66
  20. 200  IF X=6 THEN VF=0.695
  21. 210  IF X=7 THEN VF=0.66
  22. 214  IF X<1 THEN 140
  23. 215  IF X>7 THEN 140
  24. 220  INPUT"Enter frequency (xxx.xxxMHz)";F
  25. 225  IF F<1 THEN 220
  26. 230  PRINT
  27. 240  W=(984*10^6)/(F*10^6)
  28. 250  PRINT USING "Wavelength = ###.## feet";W
  29. 260  PRINT
  30. 270  INPUT"choose use of coax: wattmeter (1) or cavity (2)";Y
  31. 280  PRINT
  32. 290  IF Y=1 THEN GOTO 310
  33. 300  IF Y=2 THEN GOTO 400
  34. 310  PRINT:PRINT"use 1/2 wavelength coax with wattmeter":PRINT
  35. 320  HW=(((W/2)*12)-4)*VF
  36. 330  PRINTUSING"Length of coax for 1/2 wavelength at this frequency= ###.## inches";HW
  37. 340  PRINT: INPUT "Enter odd multiple for convienient length of coax in application";Z
  38. 350  HWM=((((W/2)*12)*Z)-4)*VF
  39. 360  PRINT:PRINT USING "Length of coax for this application =          ###.## inches between connectors tip to tip";HWM
  40. 370  PRINT:INPUT" Do you want another coax length (Y) or (N)";YY$
  41. 380  IF YY$="Y" THEN 310
  42. 385  IF YY$ ="y" THEN 310
  43. 390  IF YY$="N" THEN INPUT "Do you want to quit? (Y) or (N)";R$
  44. 391  IF YY$ ="n" THEN INPUT "Do you want to quit? (Y) or (N)";R$
  45. 393  IF R$ = "Y" THEN 510
  46. 394  IF R$ = "y" THEN 510
  47. 395  IF R$ = "N" THEN 60
  48. 396  IF R$ = "n" THEN 60
  49. 400  CLS:CW=(W*12)*VF:HCW= ((W*12)/2)*VF
  50. 410  PRINT:PRINT USING "length of coax will be approximately    ###.## inches";HCW
  51. 420  PRINT:INPUT "Enter multiple to determine exact coax  length convenient for application";L
  52. 430  CLS:PRINT:INPUT"Do you want the coax to connect between cavities(1) or from antenna tee to      cavity(2)";M
  53. 440  IF M = 1 THEN CLS:PRINT: PRINT USING"Length of coax between cavities= ###.## inches between connectors tip to tip";CW*L*0.55
  54. 450  IF M = 2 THEN CLS:PRINT:PRINT USING "Length of coax between antenna tee and cavity= ###.## inches between connectors tip to tip";CW*L*0.65
  55. 455  IF M>2 THEN 430
  56. 460  PRINT:INPUT"Continue (Y) or (N)"; N$
  57. 470  IF N$ ="Y" THEN CLS: INPUT"Do you want another cavity coax length (1) or return to beginning of the program   for a wattmeter coax length (2)";P
  58. 475  IF N$ ="y" THEN CLS: INPUT"Do you want another cavity coax length (1) or return to beginning of the program   for a wattmeter coax length (2)";P
  59. 480  IF N$="N" THEN END
  60. 485  IF N$="n" THEN END
  61. 490  IF P=1 THEN CLS: GOTO 400
  62. 500  IF P=2 THEN GOTO 60
  63. 505  IF P>2 THEN 470
  64. 510  CLS:END
  65.