/* From the feeble mind of N3GO - Gary O'Neil - March 17, 1995 */
/* End-fed Zepp/J-pole design calculations */
/* */
/* Converted from BASIC to C by SM5SXL Mats Petersson 950407 */
main()
{
HideCur();
while(1)
{
clrscr();
printf("J-Pole design calculations by N3GO Gary O'Neil\n");
printf("----------------------------------------------\n\n");
printf("(1) Antenna design calculations\n");
printf("(2) Antenna adjustment calculations\n");
printf("(3) Velocity factor calculations\n\n");
printf("(Q) Quit\n");
switch(bioskey(0) & 0xff) {
case '1': design();break;
case '2': tuning();break;
case '3': velocity();break;
case 'q':
case 'Q': ShowCur();
exit(0);
}
}
}
design()
{
/* ZA = Antenna Feedpoint Impedance, ZF = Feedline Impedance, and */
/* Z0 = the impedance of the matching transmission line. */
/* ZA = 3500 to 5000 ohms for end fed dipole. */
/* ZF = 50 ohms in my analysis */
/* Z0 = 300 Ohms nominal ** Note: Maximum = sqrt(ZA*ZF) */
/* The constant 5606 is 95 per cent of the speed of light in inches
for a half wavelength at 1 MHz */
dipole = 5606 / f; /* Equation A9 - A */
/* The constant 32.78 is the speed of light in inches/degree/MHz */
series = 32.78 * v * (l1/f); /* Equation A9 - B */
shunt = 32.78 * v * (l2/f); /* Equation A9 - C */
printf(" Frequency in MHz = %f\n",f);
printf(" Wavelength in air = %f cm\n",(299.7*39.37/f) * 2.54);
printf(" Length of stub = %f wavelengths\n",(l1+l2)/360);
printf(" Height of 'Tap' = %f wavelengths\n",l2/360);
printf(" Dipole Length = %f cm\n",dipole * 2.54);
printf(" Series Trans. Line = %f cm\n",series * 2.54);
printf(" Shunt Trans. Line = %f cm\n",shunt * 2.54);
printf(" Stub Length = %f cm\n",series * 2.54 + shunt * 2.54);
printf(" Overall Length = %f cm\n",series * 2.54 + shunt * 2.54 + dipole * 2.54);
printf("\n\n\n");
printf("Impedances used for this calculation are as follows: \n");
printf("\n");
printf(" Impedance of End-fed Dipole: %.0f Ohms\n",za);
printf(" Antenna System Feedline Impedance: %.0f Ohms\n",zf);
printf("Matching Section Transmission line Impedance: %.0f Ohms\n",z0);
printf(" Maximum Usable Matching line Impedance: %.0f Ohms\n",zmax);
printf(" Velocity Factor of Matching Section: %f\n",v);
printf("\n\n\n");
input("New Velocity factor (enter zero to quit): ",s,&v);
if(v == 0) return;
}
errexit:
printf("Use matching transmission line impedance less than %f Ohms\n",zmax);
printf("Change term in data statement to reflect a lower impedance.\n");
}
if(dl > 0)
printf(" Reduce the length of the halfwave element by: %f cm\n",dl * 12 * 2.54);
else
printf(" Increase the length of the halfwave element by: %f cm\n",fabs(dl) * 12 * 2.54);
printf("\n\n");
}
clrscr();
printf("\n\n\n Good Job!!!\n");
getch();
}
while(1)
{
input(" Frequency (MHz) where VSWR is lowest: ",s,&f2);
clrscr();
printf("\n\n");
/* Compute new velocity factor estimate based on VSWR measurement result */
v = l1 * f2 / 491.78;
printf(" Current velocity factor estimate: %f\n",v);
printf("\n");
/* Compute new sample length based on new velocity factor estimate */
l2 = 491.78 * v / f1;
/* Compute length change required for desired frequency sample */
dl = l2 - l1;
printf(" Adjusted length of %f MHz sample: %f\n", f1, l2 * 12 * 2.54);
printf("\n\n\n");
printf(" Does the VSWR at %.4f MHz equal that of the dummy load?", f2);