Eccovi un programma sviluppato per progettare un’antenna wireless….. l’ho voluto chiamare WirAnt…. il linguaggio utilizzato è l’HTML… ovviamente rientra il JavaScript…. per farla breve vi scrivo il codice sorgente….. (perdonate l’indentazione)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//IT">
<html>
<head>
<title>Calcolatore di Antenna Wireless</title>
</head>
<body text=#ffffff bgColor=#000000>
<center>
<h2><b>WirAnt</b></h2><i>Ed ecco che Giovanni vi realizza il programmino per costruire le antenne..... WirAnt sta per Wireless Antenna</i><b>  (by  G.D.M.)</b></center>
<hr>
<b>Lunghezza del cavo</b>
<form name=dipole><br>Freq. in MHz<br><input size=10 name=freq> <input onclick=calculation() type=button value=Calcola> <input type=reset value=Azzera>
<p>Lunghezza totale del cavo: <input size=15 name=total1><br>Deve essere
<input size=15 name=total2> in un lato.
<hr>
</from><b>Elementi</b>
<from name=beam><br> Freq. in MHz<br><input size=10 name=freq> <input onclick=calc() type=button value=Calcola> <input type=reset value=Azzera>
<p>A. <input size=15 name=total3> Perno centrale<br>B. <input size=15 name=total5>
Lato da avvolgere e rientrare (Perno)<BR>C. <input size=15 name=total1> Riflettore<br>D. <input
size=15 name=total4> Distanza tra il Riflettore ed il Perno<br>E. <input size=15 name=total2> Lunghezza totale della guida</form>
<hr>
<form name=vertical>Freq. in MHz<br><input size=10 name=freq> <input onclick=vert1() type=button value="1/4 onda"> <input onclick=vert2() type=button value="1/2 onda"> <input onclick=vert3() type=button value="7/8 onda"> <input onclick=vert4() type=button value="Tot. onda"> <input type=reset value=Reimposta><br>Lunghezza totale del cavo in verticale:<br><input size=15 name=total> </form>
<script language=JavaScript>
function calculation() {
var x= 468;
var y= document.dipole.freq.value;
  var result= x / y;
  var ft= Math.floor(result);
var temp1= result - ft;
var temp2= temp1 * 12;
var inch= Math.floor(temp2);
var temp3= temp2 - inch;
if (temp3 <= .03125) fract = "1/32"
else if ((temp3 > .03125) && (temp3 <=.0625)) fract= "1/16"
else if ((temp3 > .0625) && (temp3 <=.09375)) fract = "3/32"
else if ((temp3 > .09375) && (temp3 <=.125)) fract= "1/8"
else if ((temp3 > .125) && (temp3 <=.15625)) fract= "5/32"
else if ((temp3 > .15625) && (temp3 <=.1875)) fract= "3/16"
else if ((temp3 > .1875) && (temp3 <=.21875)) fract= "7/32"
else if ((temp3 > .21875) && (temp3 <=.25)) fract="1/4"
else if ((temp3 > .25) && (temp3 <=.28125)) fract="9/32"
else if ((temp3 > .28125) && (temp3 <=.3125)) fract="5/16"
else if ((temp3 > .3125) && (temp3 <=.34375)) fract="11/32"
else if ((temp3 > .34375) && (temp3 <=.375)) fract="3/8"
else if ((temp3 > .375) && (temp3 <=.40625)) fract="13/32"
else if ((temp3 > .40625) && (temp3 <=.4375)) fract="7/16"
else if ((temp3 > .4375) && (temp3 <=.46875)) fract="15/32"
else if ((temp3 > .46875) && (temp3 <=.5)) fract="1/2"
else if ((temp3 > .5) && (temp3 <=.53125)) fract="17/32"
else if ((temp3 > .53125) && (temp3 <=.5625)) fract="9/16"
else if ((temp3 > .5625) && (temp3 <=.59375)) fract="19/32"
else if ((temp3 > .59375) && (temp3 <=.625)) fract="5/8"
else if ((temp3 > .625) && (temp3 <=.65625)) fract="21/32"
else if ((temp3 > .65625) && (temp3 <=.6875)) fract="11/16"
else if ((temp3 > .6875) && (temp3 <=.71875)) fract="23/32"
else if ((temp3 > .71875) && (temp3 <=.75)) fract="3/4"
else if ((temp3 > .75) && (temp3 <=.78125)) fract="25/32"
else if ((temp3 > .78125) && (temp3 <=.8125)) fract="13/16"
else if ((temp3 > .8125) && (temp3 <=.84375)) fract="27/32"
else if ((temp3 > .84375) && (temp3 <=.875)) fract="7/8"
else if ((temp3 > .875) && (temp3 <=.90625)) fract="29/32"
else if ((temp3 > .90625) && (temp3 <=.9375)) fract="15/16"
else if (temp3 > .9375) fract="31/32";
  var half1 = result / 2;
var halfft= Math.floor(half1);
var temp1= half1 - halfft;
var temp2= temp1 * 12;
var halfinch= Math.floor(temp2);
var temp3= temp2 - halfinch;
if (temp3 <= .03125) halffract = "1/32"
else if ((temp3 > .03125) && (temp3 <=.0625)) halffract= "1/16"
else if ((temp3 > .0625) && (temp3 <=.09375)) halffract = "3/32"
else if ((temp3 > .09375) && (temp3 <=.125)) halffract= "1/8"
else if ((temp3 > .125) && (temp3 <=.15625)) halffract= "5/32"
else if ((temp3 > .15625) && (temp3 <=.1875)) halffract= "3/16"
else if ((temp3 > .1875) && (temp3 <=.21875)) halffract= "7/32"
else if ((temp3 > .21875) && (temp3 <=.25)) halffract="1/4"
else if ((temp3 > .25) && (temp3 <=.28125)) halffract="9/32"
else if ((temp3 > .28125) && (temp3 <=.3125)) halffract="5/16"
else if ((temp3 > .3125) && (temp3 <=.34375)) halffract="11/32"
else if ((temp3 > .34375) && (temp3 <=.375)) halffract="3/8"
else if ((temp3 > .375) && (temp3 <=.40625)) halffract="13/32"
else if ((temp3 > .40625) && (temp3 <=.4375)) halffract="7/16"
else if ((temp3 > .4375) && (temp3 <=.46875)) halffract="15/32"
else if ((temp3 > .46875) && (temp3 <=.5)) halffract="1/2"
else if ((temp3 > .5) && (temp3 <=.53125)) halffract="17/32"
else if ((temp3 > .53125) && (temp3 <=.5625)) halffract="9/16"
else if ((temp3 > .5625) && (temp3 <=.59375)) halffract="19/32"
else if ((temp3 > .59375) && (temp3 <=.625)) halffract="5/8"
else if ((temp3 > .625) && (temp3 <=.65625)) halffract="21/32"
else if ((temp3 > .65625) && (temp3 <=.6875)) halffract="11/16"
else if ((temp3 > .6875) && (temp3 <=.71875)) halffract="23/32"
else if ((temp3 > .71875) && (temp3 <=.75)) halffract="3/4"
else if ((temp3 > .75) && (temp3 <=.78125)) halffract="25/32"
else if ((temp3 > .78125) && (temp3 <=.8125)) halffract="13/16"
else if ((temp3 > .8125) && (temp3 <=.84375)) halffract="27/32"
else if ((temp3 > .84375) && (temp3 <=.875)) halffract="7/8"
else if ((temp3 > .875) && (temp3 <=.90625)) halffract="29/32"
else if ((temp3 > .90625) && (temp3 <=.9375)) halffract="15/16"
else if (temp3 > .9375) halffract="31/32";
  var totallength = (ft + "ft. " + inch + " - " + fract +"in.")
var halflength = (halfft + "ft. "+ halfinch + " - " + halffract + "in.")
  document.dipole.total1.value = totallength;
document.dipole.total2.value = halflength;
}
function calc() {
var re= 501;
var dr= 473;
var di= 445;
var x= 468;
var y= document.beam.freq.value;
  var ref= re / y;
var dri= dr / y;
var dir= di / y;
var result= x / y;
var result= result * 2;
var spa= result * .2;
  var reft= Math.floor(ref);
var temp1= ref - reft;
var temp2= temp1 * 12;
var reinch= Math.floor(temp2);
var temp3= temp2 - reinch;
if (temp3 <= .03125) refract = "1/32"
else if ((temp3 > .03125) && (temp3 <=.0625)) refract= "1/16"
else if ((temp3 > .0625) && (temp3 <=.09375)) refract = "3/32"
else if ((temp3 > .09375) && (temp3 <=.125)) refract= "1/8"
else if ((temp3 > .125) && (temp3 <=.15625)) refract= "5/32"
else if ((temp3 > .15625) && (temp3 <=.1875)) refract= "3/16"
else if ((temp3 > .1875) && (temp3 <=.21875)) refract= "7/32"
else if ((temp3 > .21875) && (temp3 <=.25)) refract="1/4"
else if ((temp3 > .25) && (temp3 <=.28125)) refract="9/32"
else if ((temp3 > .28125) && (temp3 <=.3125)) refract="5/16"
else if ((temp3 > .3125) && (temp3 <=.34375)) refract="11/32"
else if ((temp3 > .34375) && (temp3 <=.375)) refract="3/8"
else if ((temp3 > .375) && (temp3 <=.40625)) refract="13/32"
else if ((temp3 > .40625) && (temp3 <=.4375)) refract="7/16"
else if ((temp3 > .4375) && (temp3 <=.46875)) refract="15/32"
else if ((temp3 > .46875) && (temp3 <=.5)) refract="1/2"
else if ((temp3 > .5) && (temp3 <=.53125)) refract="17/32"
else if ((temp3 > .53125) && (temp3 <=.5625)) refract="9/16"
else if ((temp3 > .5625) && (temp3 <=.59375)) refract="19/32"
else if ((temp3 > .59375) && (temp3 <=.625)) refract="5/8"
else if ((temp3 > .625) && (temp3 <=.65625)) refract="21/32"
else if ((temp3 > .65625) && (temp3 <=.6875)) refract="11/16"
else if ((temp3 > .6875) && (temp3 <=.71875)) refract="23/32"
else if ((temp3 > .71875) && (temp3 <=.75)) refract="3/4"
else if ((temp3 > .75) && (temp3 <=.78125)) refract="25/32"
else if ((temp3 > .78125) && (temp3 <=.8125)) refract="13/16"
else if ((temp3 > .8125) && (temp3 <=.84375)) refract="27/32"
else if ((temp3 > .84375) && (temp3 <=.875)) refract="7/8"
else if ((temp3 > .875) && (temp3 <=.90625)) refract="29/32"
else if ((temp3 > .90625) && (temp3 <=.9375)) refract="15/16"
else if (temp3 > .9375) refract="31/32";var drft= Math.floor(dri);
var temp1= dri - drft;
var temp2= temp1 * 12;
var drinch= Math.floor(temp2);
var temp3= temp2 - drinch;
if (temp3 <= .03125) drfract = "1/32"
else if ((temp3 > .03125) && (temp3 <=.0625)) drfract= "1/16"
else if ((temp3 > .0625) && (temp3 <=.09375)) drfract = "3/32"
else if ((temp3 > .09375) && (temp3 <=.125)) drfract= "1/8"
else if ((temp3 > .125) && (temp3 <=.15625)) drfract= "5/32"
else if ((temp3 > .15625) && (temp3 <=.1875)) drfract= "3/16"
else if ((temp3 > .1875) && (temp3 <=.21875)) drfract= "7/32"
else if ((temp3 > .21875) && (temp3 <=.25)) drfract="1/4"
else if ((temp3 > .25) && (temp3 <=.28125)) drfract="9/32"
else if ((temp3 > .28125) && (temp3 <=.3125)) drfract="5/16"
else if ((temp3 > .3125) && (temp3 <=.34375)) drfract="11/32"
else if ((temp3 > .34375) && (temp3 <=.375)) drfract="3/8"
else if ((temp3 > .375) && (temp3 <=.40625)) drfract="13/32"
else if ((temp3 > .40625) && (temp3 <=.4375)) drfract="7/16"
else if ((temp3 > .4375) && (temp3 <=.46875)) drfract="15/32"
else if ((temp3 > .46875) && (temp3 <=.5)) drfract="1/2"
else if ((temp3 > .5) && (temp3 <=.53125)) drfract="17/32"
else if ((temp3 > .53125) && (temp3 <=.5625)) drfract="9/16"
else if ((temp3 > .5625) && (temp3 <=.59375)) drfract="19/32"
else if ((temp3 > .59375) && (temp3 <=.625)) drfract="5/8"
else if ((temp3 > .625) && (temp3 <=.65625)) drfract="21/32"
else if ((temp3 > .65625) && (temp3 <=.6875)) drfract="11/16"
else if ((temp3 > .6875) && (temp3 <=.71875)) drfract="23/32"
else if ((temp3 > .71875) && (temp3 <=.75)) drfract="3/4"
else if ((temp3 > .75) && (temp3 <=.78125)) drfract="25/32"
else if ((temp3 > .78125) && (temp3 <=.8125)) drfract="13/16"
else if ((temp3 > .8125) && (temp3 <=.84375)) drfract="27/32"
else if ((temp3 > .84375) && (temp3 <=.875)) drfract="7/8"
else if ((temp3 > .875) && (temp3 <=.90625)) drfract="29/32"
else if ((temp3 > .90625) && (temp3 <=.9375)) drfract="15/16"
else if (temp3 > .9375) drfract="31/32";
  var dift= Math.floor(dir);
var temp1= dir - dift;
var temp2= temp1 * 12;
var diinch= Math.floor(temp2);
var temp3= temp2 - diinch;
if (temp3 <= .03125) difract = "1/32"
else if ((temp3 > .03125) && (temp3 <=.0625)) difract= "1/16"
else if ((temp3 > .0625) && (temp3 <=.09375)) difract = "3/32"
else if ((temp3 > .09375) && (temp3 <=.125)) difract= "1/8"
else if ((temp3 > .125) && (temp3 <=.15625)) difract= "5/32"
else if ((temp3 > .15625) && (temp3 <=.1875)) difract= "3/16"
else if ((temp3 > .1875) && (temp3 <=.21875)) difract= "7/32"
else if ((temp3 > .21875) && (temp3 <=.25)) difract="1/4"
else if ((temp3 > .25) && (temp3 <=.28125)) difract="9/32"
else if ((temp3 > .28125) && (temp3 <=.3125)) difract="5/16"
else if ((temp3 > .3125) && (temp3 <=.34375)) difract="11/32"
else if ((temp3 > .34375) && (temp3 <=.375)) difract="3/8"
else if ((temp3 > .375) && (temp3 <=.40625)) difract="13/32"
else if ((temp3 > .40625) && (temp3 <=.4375)) difract="7/16"
else if ((temp3 > .4375) && (temp3 <=.46875)) difract="15/32"
else if ((temp3 > .46875) && (temp3 <=.5)) difract="1/2"
else if ((temp3 > .5) && (temp3 <=.53125)) difract="17/32"
else if ((temp3 > .53125) && (temp3 <=.5625)) difract="9/16"
else if ((temp3 > .5625) && (temp3 <=.59375)) difract="19/32"
else if ((temp3 > .59375) && (temp3 <=.625)) difract="5/8"
else if ((temp3 > .625) && (temp3 <=.65625)) difract="21/32"
else if ((temp3 > .65625) && (temp3 <=.6875)) difract="11/16"
else if ((temp3 > .6875) && (temp3 <=.71875)) difract="23/32"
else if ((temp3 > .71875) && (temp3 <=.75)) difract="3/4"
else if ((temp3 > .75) && (temp3 <=.78125)) difract="25/32"
else if ((temp3 > .78125) && (temp3 <=.8125)) difract="13/16"
else if ((temp3 > .8125) && (temp3 <=.84375)) difract="27/32"
else if ((temp3 > .84375) && (temp3 <=.875)) difract="7/8"
else if ((temp3 > .875) && (temp3 <=.90625)) difract="29/32"
else if ((temp3 > .90625) && (temp3 <=.9375)) difract="15/16"
else if (temp3 > .9375) difract="31/32";
  var spft= Math.floor(spa);
var temp1= spa - spft;
var temp2= temp1 * 12;
var spinch= Math.floor(temp2);
var temp3= temp2 - spinch;
if (temp3 <= .03125) spfract = "1/32"
else if ((temp3 > .03125) && (temp3 <=.0625)) spfract= "1/16"
else if ((temp3 > .0625) && (temp3 <=.09375)) spfract = "3/32"
else if ((temp3 > .09375) && (temp3 <=.125)) spfract= "1/8"
else if ((temp3 > .125) && (temp3 <=.15625)) spfract= "5/32"
else if ((temp3 > .15625) && (temp3 <=.1875)) spfract= "3/16"
else if ((temp3 > .1875) && (temp3 <=.21875)) spfract= "7/32"
else if ((temp3 > .21875) && (temp3 <=.25)) spfract="1/4"
else if ((temp3 > .25) && (temp3 <=.28125)) spfract="9/32"
else if ((temp3 > .28125) && (temp3 <=.3125)) spfract="5/16"
else if ((temp3 > .3125) && (temp3 <=.34375)) spfract="11/32"
else if ((temp3 > .34375) && (temp3 <=.375)) spfract="3/8"
else if ((temp3 > .375) && (temp3 <=.40625)) spfract="13/32"
else if ((temp3 > .40625) && (temp3 <=.4375)) spfract="7/16"
else if ((temp3 > .4375) && (temp3 <=.46875)) spfract="15/32"
else if ((temp3 > .46875) && (temp3 <=.5)) spfract="1/2"
else if ((temp3 > .5) && (temp3 <=.53125)) spfract="17/32"
else if ((temp3 > .53125) && (temp3 <=.5625)) spfract="9/16"
else if ((temp3 > .5625) && (temp3 <=.59375)) spfract="19/32"
else if ((temp3 > .59375) && (temp3 <=.625)) spfract="5/8"
else if ((temp3 > .625) && (temp3 <=.65625)) spfract="21/32"
else if ((temp3 > .65625) && (temp3 <=.6875)) spfract="11/16"
else if ((temp3 > .6875) && (temp3 <=.71875)) spfract="23/32"
else if ((temp3 > .71875) && (temp3 <=.75)) spfract="3/4"
else if ((temp3 > .75) && (temp3 <=.78125)) spfract="25/32"
else if ((temp3 > .78125) && (temp3 <=.8125)) spfract="13/16"
else if ((temp3 > .8125) && (temp3 <=.84375)) spfract="27/32"
else if ((temp3 > .84375) && (temp3 <=.875)) spfract="7/8"
else if ((temp3 > .875) && (temp3 <=.90625)) spfract="29/32"
else if ((temp3 > .90625) && (temp3 <=.9375)) spfract="15/16"
else if (temp3 > .9375) spfract="31/32";
  var half1 = dri / 2;
var halfft= Math.floor(half1);
var temp1= half1 - halfft;
var temp2= temp1 * 12;
var halfinch= Math.floor(temp2);
var temp3= temp2 - halfinch;
if (temp3 <= .03125) halffract = "1/32"
else if ((temp3 > .03125) && (temp3 <=.0625)) halffract= "1/16"
else if ((temp3 > .0625) && (temp3 <=.09375)) halffract = "3/32"
else if ((temp3 > .09375) && (temp3 <=.125)) halffract= "1/8"
else if ((temp3 > .125) && (temp3 <=.15625)) halffract= "5/32"
else if ((temp3 > .15625) && (temp3 <=.1875)) halffract= "3/16"
else if ((temp3 > .1875) && (temp3 <=.21875)) halffract= "7/32"
else if ((temp3 > .21875) && (temp3 <=.25)) halffract="1/4"
else if ((temp3 > .25) && (temp3 <=.28125)) halffract="9/32"
else if ((temp3 > .28125) && (temp3 <=.3125)) halffract="5/16"
else if ((temp3 > .3125) && (temp3 <=.34375)) halffract="11/32"
else if ((temp3 > .34375) && (temp3 <=.375)) halffract="3/8"
else if ((temp3 > .375) && (temp3 <=.40625)) halffract="13/32"
else if ((temp3 > .40625) && (temp3 <=.4375)) halffract="7/16"
else if ((temp3 > .4375) && (temp3 <=.46875)) halffract="15/32"
else if ((temp3 > .46875) && (temp3 <=.5)) halffract="1/2"
else if ((temp3 > .5) && (temp3 <=.53125)) halffract="17/32"
else if ((temp3 > .53125) && (temp3 <=.5625)) halffract="9/16"
else if ((temp3 > .5625) && (temp3 <=.59375)) halffract="19/32"
else if ((temp3 > .59375) && (temp3 <=.625)) halffract="5/8"
else if ((temp3 > .625) && (temp3 <=.65625)) halffract="21/32"
else if ((temp3 > .65625) && (temp3 <=.6875)) halffract="11/16"
else if ((temp3 > .6875) && (temp3 <=.71875)) halffract="23/32"
else if ((temp3 > .71875) && (temp3 <=.75)) halffract="3/4"
else if ((temp3 > .75) && (temp3 <=.78125)) halffract="25/32"
else if ((temp3 > .78125) && (temp3 <=.8125)) halffract="13/16"
else if ((temp3 > .8125) && (temp3 <=.84375)) halffract="27/32"
else if ((temp3 > .84375) && (temp3 <=.875)) halffract="7/8"
else if ((temp3 > .875) && (temp3 <=.90625)) halffract="29/32"
else if ((temp3 > .90625) && (temp3 <=.9375)) halffract="15/16"
else if (temp3 > .9375) halffract="31/32";
  var relength = (reft + "ft. " + reinch + " - " + refract +"in.")
var drlength = (drft + "ft. " + drinch + " - " + drfract +"in.")
var dilength = (dift + "ft. " + diinch + " - " + difract +"in.")
var splength = (spft + "ft. " + spinch + " - " + spfract +"in.")
var drhalflength = (halfft+ "ft. " + halfinch + " - " + halffract +"in.")
  document.beam.total1.value = relength;
document.beam.total2.value = drlength;
document.beam.total3.value = dilength;
document.beam.total4.value = splength;
document.beam.total5.value = drhalflength;
}
function vert1() {
var x=468;
var y=document.vertical.freq.value;
  var result=x / y;
var result=result / 2;
var ft=Math.floor(result);
var temp1=result - ft;
var temp2= temp1 * 12;
var inch= Math.floor(temp2);
var temp3= temp2 - inch;
if (temp3 <= .03125) fract = "1/32"
else if ((temp3 > .03125) && (temp3 <=.0625)) fract= "1/16"
else if ((temp3 > .0625) && (temp3 <=.09375)) fract = "3/32"
else if ((temp3 > .09375) && (temp3 <=.125)) fract= "1/8"
else if ((temp3 > .125) && (temp3 <=.15625)) fract= "5/32"
else if ((temp3 > .15625) && (temp3 <=.1875)) fract= "3/16"
else if ((temp3 > .1875) && (temp3 <=.21875)) fract= "7/32"
else if ((temp3 > .21875) && (temp3 <=.25)) fract="1/4"
else if ((temp3 > .25) && (temp3 <=.28125)) fract="9/32"
else if ((temp3 > .28125) && (temp3 <=.3125)) fract="5/16"
else if ((temp3 > .3125) && (temp3 <=.34375)) fract="11/32"
else if ((temp3 > .34375) && (temp3 <=.375)) fract="3/8"
else if ((temp3 > .375) && (temp3 <=.40625)) fract="13/32"
else if ((temp3 > .40625) && (temp3 <=.4375)) fract="7/16"
else if ((temp3 > .4375) && (temp3 <=.46875)) fract="15/32"
else if ((temp3 > .46875) && (temp3 <=.5)) fract="1/2"
else if ((temp3 > .5) && (temp3 <=.53125)) fract="17/32"
else if ((temp3 > .53125) && (temp3 <=.5625)) fract="9/16"
else if ((temp3 > .5625) && (temp3 <=.59375)) fract="19/32"
else if ((temp3 > .59375) && (temp3 <=.625)) fract="5/8"
else if ((temp3 > .625) && (temp3 <=.65625)) fract="21/32"
else if ((temp3 > .65625) && (temp3 <=.6875)) fract="11/16"
else if ((temp3 > .6875) && (temp3 <=.71875)) fract="23/32"
else if ((temp3 > .71875) && (temp3 <=.75)) fract="3/4"
else if ((temp3 > .75) && (temp3 <=.78125)) fract="25/32"
else if ((temp3 > .78125) && (temp3 <=.8125)) fract="13/16"
else if ((temp3 > .8125) && (temp3 <=.84375)) fract="27/32"
else if ((temp3 > .84375) && (temp3 <=.875)) fract="7/8"
else if ((temp3 > .875) && (temp3 <=.90625)) fract="29/32"
else if ((temp3 > .90625) && (temp3 <=.9375)) fract="15/16"
else if (temp3 > .9375) fract="31/32";
  var totallength = (ft + "ft. " + inch + " - " + fract +"in.")
document.vertical.total.value = totallength;
}
function vert2() {
var x=468;
var y=document.vertical.freq.value;
  var result=x / y;
var ft=Math.floor(result);
var temp1=result - ft;
var temp2= temp1 * 12;
var inch= Math.floor(temp2);
var temp3= temp2 - inch;
if (temp3 <= .03125) fract = "1/32"
else if ((temp3 > .03125) && (temp3 <=.0625)) fract= "1/16"
else if ((temp3 > .0625) && (temp3 <=.09375)) fract = "3/32"
else if ((temp3 > .09375) && (temp3 <=.125)) fract= "1/8"
else if ((temp3 > .125) && (temp3 <=.15625)) fract= "5/32"
else if ((temp3 > .15625) && (temp3 <=.1875)) fract= "3/16"
else if ((temp3 > .1875) && (temp3 <=.21875)) fract= "7/32"
else if ((temp3 > .21875) && (temp3 <=.25)) fract="1/4"
else if ((temp3 > .25) && (temp3 <=.28125)) fract="9/32"
else if ((temp3 > .28125) && (temp3 <=.3125)) fract="5/16"
else if ((temp3 > .3125) && (temp3 <=.34375)) fract="11/32"
else if ((temp3 > .34375) && (temp3 <=.375)) fract="3/8"
else if ((temp3 > .375) && (temp3 <=.40625)) fract="13/32"
else if ((temp3 > .40625) && (temp3 <=.4375)) fract="7/16"
else if ((temp3 > .4375) && (temp3 <=.46875)) fract="15/32"
else if ((temp3 > .46875) && (temp3 <=.5)) fract="1/2"
else if ((temp3 > .5) && (temp3 <=.53125)) fract="17/32"
else if ((temp3 > .53125) && (temp3 <=.5625)) fract="9/16"
else if ((temp3 > .5625) && (temp3 <=.59375)) fract="19/32"
else if ((temp3 > .59375) && (temp3 <=.625)) fract="5/8"
else if ((temp3 > .625) && (temp3 <=.65625)) fract="21/32"
else if ((temp3 > .65625) && (temp3 <=.6875)) fract="11/16"
else if ((temp3 > .6875) && (temp3 <=.71875)) fract="23/32"
else if ((temp3 > .71875) && (temp3 <=.75)) fract="3/4"
else if ((temp3 > .75) && (temp3 <=.78125)) fract="25/32"
else if ((temp3 > .78125) && (temp3 <=.8125)) fract="13/16"
else if ((temp3 > .8125) && (temp3 <=.84375)) fract="27/32"
else if ((temp3 > .84375) && (temp3 <=.875)) fract="7/8"
else if ((temp3 > .875) && (temp3 <=.90625)) fract="29/32"
else if ((temp3 > .90625) && (temp3 <=.9375)) fract="15/16"
else if (temp3 > .9375) fract="31/32";
  var totallength = (ft + "ft. " + inch + " - " + fract +"in.")
document.vertical.total.value = totallength;
}
function vert3() {
var x=468;
var y=document.vertical.freq.value;
  var result=x / y;
var result=result * 2 * 7 / 8;
var ft=Math.floor(result);
var temp1=result - ft;
var temp2= temp1 * 12;
var inch= Math.floor(temp2);
var temp3= temp2 - inch;
if (temp3 <= .03125) fract = "1/32"
else if ((temp3 > .03125) && (temp3 <=.0625)) fract= "1/16"
else if ((temp3 > .0625) && (temp3 <=.09375)) fract = "3/32"
else if ((temp3 > .09375) && (temp3 <=.125)) fract= "1/8"
else if ((temp3 > .125) && (temp3 <=.15625)) fract= "5/32"
else if ((temp3 > .15625) && (temp3 <=.1875)) fract= "3/16"
else if ((temp3 > .1875) && (temp3 <=.21875)) fract= "7/32"
else if ((temp3 > .21875) && (temp3 <=.25)) fract="1/4"
else if ((temp3 > .25) && (temp3 <=.28125)) fract="9/32"
else if ((temp3 > .28125) && (temp3 <=.3125)) fract="5/16"
else if ((temp3 > .3125) && (temp3 <=.34375)) fract="11/32"
else if ((temp3 > .34375) && (temp3 <=.375)) fract="3/8"
else if ((temp3 > .375) && (temp3 <=.40625)) fract="13/32"
else if ((temp3 > .40625) && (temp3 <=.4375)) fract="7/16"
else if ((temp3 > .4375) && (temp3 <=.46875)) fract="15/32"
else if ((temp3 > .46875) && (temp3 <=.5)) fract="1/2"
else if ((temp3 > .5) && (temp3 <=.53125)) fract="17/32"
else if ((temp3 > .53125) && (temp3 <=.5625)) fract="9/16"
else if ((temp3 > .5625) && (temp3 <=.59375)) fract="19/32"
else if ((temp3 > .59375) && (temp3 <=.625)) fract="5/8"
else if ((temp3 > .625) && (temp3 <=.65625)) fract="21/32"
else if ((temp3 > .65625) && (temp3 <=.6875)) fract="11/16"
else if ((temp3 > .6875) && (temp3 <=.71875)) fract="23/32"
else if ((temp3 > .71875) && (temp3 <=.75)) fract="3/4"
else if ((temp3 > .75) && (temp3 <=.78125)) fract="25/32"
else if ((temp3 > .78125) && (temp3 <=.8125)) fract="13/16"
else if ((temp3 > .8125) && (temp3 <=.84375)) fract="27/32"
else if ((temp3 > .84375) && (temp3 <=.875)) fract="7/8"
else if ((temp3 > .875) && (temp3 <=.90625)) fract="29/32"
else if ((temp3 > .90625) && (temp3 <=.9375)) fract="15/16"
else if (temp3 > .9375) fract="31/32";
  var totallength = (ft + "ft. " + inch + " - " + fract +"in.")
document.vertical.total.value = totallength;
}
function vert4() {
var x=468;
var y=document.vertical.freq.value;
  var result=x / y;
var result=result * 2;
var ft=Math.floor(result);
var temp1=result - ft;
var temp2= temp1 * 12;
var inch= Math.floor(temp2);
var temp3= temp2 - inch;
if (temp3 <= .03125) fract = "1/32"
else if ((temp3 > .03125) && (temp3 <=.0625)) fract= "1/16"
else if ((temp3 > .0625) && (temp3 <=.09375)) fract = "3/32"
else if ((temp3 > .09375) && (temp3 <=.125)) fract= "1/8"
else if ((temp3 > .125) && (temp3 <=.15625)) fract= "5/32"
else if ((temp3 > .15625) && (temp3 <=.1875)) fract= "3/16"
else if ((temp3 > .1875) && (temp3 <=.21875)) fract= "7/32"
else if ((temp3 > .21875) && (temp3 <=.25)) fract="1/4"
else if ((temp3 > .25) && (temp3 <=.28125)) fract="9/32"
else if ((temp3 > .28125) && (temp3 <=.3125)) fract="5/16"
else if ((temp3 > .3125) && (temp3 <=.34375)) fract="11/32"
else if ((temp3 > .34375) && (temp3 <=.375)) fract="3/8"
else if ((temp3 > .375) && (temp3 <=.40625)) fract="13/32"
else if ((temp3 > .40625) && (temp3 <=.4375)) fract="7/16"
else if ((temp3 > .4375) && (temp3 <=.46875)) fract="15/32"
else if ((temp3 > .46875) && (temp3 <=.5)) fract="1/2"
else if ((temp3 > .5) && (temp3 <=.53125)) fract="17/32"
else if ((temp3 > .53125) && (temp3 <=.5625)) fract="9/16"
else if ((temp3 > .5625) && (temp3 <=.59375)) fract="19/32"
else if ((temp3 > .59375) && (temp3 <=.625)) fract="5/8"
else if ((temp3 > .625) && (temp3 <=.65625)) fract="21/32"
else if ((temp3 > .65625) && (temp3 <=.6875)) fract="11/16"
else if ((temp3 > .6875) && (temp3 <=.71875)) fract="23/32"
else if ((temp3 > .71875) && (temp3 <=.75)) fract="3/4"
else if ((temp3 > .75) && (temp3 <=.78125)) fract="25/32"
else if ((temp3 > .78125) && (temp3 <=.8125)) fract="13/16"
else if ((temp3 > .8125) && (temp3 <=.84375)) fract="27/32"
else if ((temp3 > .84375) && (temp3 <=.875)) fract="7/8"
else if ((temp3 > .875) && (temp3 <=.90625)) fract="29/32"
else if ((temp3 > .90625) && (temp3 <=.9375)) fract="15/16"
else if (temp3 > .9375) fract="31/32";
  var totallength = (ft + "ft. " + inch + " - " + fract +"in.")
document.vertical.total.value = totallength;
}
// -->
</script>
</body>
</html>
Copiate tutto il codice nel blocco note e salvate il file con nome aggiungendo l’estensione .html
Faccio un esempio…:
WirAnt.html
Da questo momtento in poi potete aprire il file ed immettere i dati, avrete tutte le dimensioni per costruire l’antennino Wireless…… 😉
Progettare Antenna Wireless con WirAnt
Vota...