Horizontale cilindrische tankcalculator

<script language="JavaScript"> </script> <script language = JavaScript> var newtext=""; var prnttext= new Array(); var numin=0; var sigfig=4; var stpt=1; var stplast=0; var labl =new Array(" Inches ", " Feet ", " Meters ", " cm "); var labl2=new Array(" U S gallons", " U S gallons", " Liters", " Liters"); var spcs=new Array("", " ", "   ", "       ", "               ","                               ") var numout=""; var ans1="";var ans2="";var ans3="";var ans4="";var ans5="";var ans6="";var ans7=""; var spc=""; var spc2=""; var sp6=" "; var brk="
" var prg="

" var print2=""; var sw=0; var diam=0; var lev=0; var len=0; var rad=0; var ansr = new Array(); var rng=0; var hgt=0; var leg=0; centang=0; var circ=0; var sec=0; var invsec=0; var tri=0; var seg=0; var circprt=0; var voltotal=0; var volhalf=0; var volliq=0; var volair=0; var pcliq=0; var pcair=0; var conv=0; </script> <script language = JavaScript> function erase(){ document.boxes.s1a.value=""; document.boxes.s2a.value=""; document.boxes.s3a.value=""; document.boxes.s4a.value=""; document.boxes.s5a.value=""; document.boxes.s6a.value=""; } </script> <script language = JavaScript> function calc(boxes) {stplast=1; spc2=sp6; diam=0;lev=0;len=0;rad=0;hgt=0;chord=0;seg=0;tri=0;circ=0;centang=0;invsec=0; if(sw==0){document.boxes.s0a.value=" Cubic Inches";document.boxes.s0b.value=" Gallons";conv=0.00432900397220055}; if(sw==1){document.boxes.s0a.value=" Cubic Feet";document.boxes.s0b.value=" Gallons";conv=7.480518863962546}; if(sw==2){document.boxes.s0a.value=" Cubic Meters";document.boxes.s0b.value=" Liters";conv=1000}; if(sw==3){document.boxes.s0a.value=" Cubic Centimeters";document.boxes.s0b.value=" Liters";conv=.001}; lev=eval(document.boxes.s1a.value); diam=eval(document.boxes.s2a.value); len=eval(document.boxes.s3a.value); document.boxin.box1.value=sw; document.boxin.box2.value=len; document.boxin.box3.value=diam; document.boxin.box4.value=conv; rad=diam/2; circ=Math.PI*(rad)*(rad); hgt=rad-lev; leg=(Math.sqrt(rad*rad-(hgt*hgt))); tri=hgt*leg; centang=2*(180/Math.PI)*Math.atan(leg/hgt); if(centang<=0){centang=360+centang;tri=tri*-1}; invsec=((360-centang)/360)*circ; seg=(circ-tri-invsec); voltotal=Math.PI*(rad)*(rad)*len; volliq=seg*len; if (lev/diam>.5){invsec=(centang/360)*circ;volliq=(invsec+tri)*len}; volair=voltotal-volliq; pcliq=100*(volliq/voltotal); pcair=100-pcliq; ansr[1]=volliq; ansr[2]=volliq*conv; ansr[3]=pcliq; ansr[4]=volair; ansr[5]=volair*conv; ansr[6]=pcair; ansr[7]=voltotal; ansr[8]=voltotal*conv; ct=1; if (sigfig>-1){ while(ct<9){ ansr[ct]=ansr[ct].toExponential(sigfig); if (ansr[ct]>.001 && ansr[ct]<1000){ansr[ct]=ansr[ct]*1}; ct=ct+1} } document.boxes.s4a.value=" "+ ansr[1]; document.boxes.s4b.value=" "+ ansr[2]; document.boxes.s4c.value=" "+ ansr[3]; document.boxes.s5a.value=" "+ ansr[4]; document.boxes.s5b.value=" "+ ansr[5]; document.boxes.s5c.value=" "+ ansr[6]; document.boxes.s6a.value=" "+ ansr[7]; document.boxes.s6b.value=" "+ ansr[8]; } </script> <script language="javascript"> function dipcalc() { if (stplast != 0) { sw=document.boxin.box1.value; len=document.boxin.box2.value; diam=document.boxin.box3.value; conv=document.boxin.box4.value; rad=diam/2; rng=diam; newtext=''; newtext=' Tank Depth'+' Volume'+"\r" stpt=0;ct=0; voltotal=Math.PI*(rad)*(rad)*len; circ=Math.PI*(rad)*(rad); while (ct<=rng) { hgt=rad-stpt; leg=(Math.sqrt(rad*rad-(hgt*hgt))); tri=hgt*leg; centang=2*(180/Math.PI)*Math.atan(leg/hgt); if(centang<=0){centang=360+centang;tri=tri*-1}; invsec=((360-centang)/360)*circ; seg=(circ-tri-invsec); volliq=seg*len; if (stpt/diam>.5){invsec=(centang/360)*circ;volliq=(invsec+tri)*len}; volair=voltotal-volliq; volliq=volliq*conv; volliq=volliq.toExponential(sigfig) volliq=volliq*1; if(stpt==0){spc=spc, spc=sp6} if(stpt==0){volliq=0}; spc2=sp6; numin=volliq; ans1=numin; ans2=ans1+""; ans3=""+ans2; if (ans3.indexOf(".")==-1){ans3+="."} ans4=ans3.substr(0,ans3.indexOf("."));ans5=ans4-0 ans6=ans3.substr(ans3.indexOf(".")) while (ans6.length<3){ans6+="0"} if (ans5>=1000) { ans7=ans4.length ans4=parseInt(""+(ans5/1000))+","+ans4.substring(ans7-3,ans7)} numout = ans4 + ans6; volliq=numout; newtext=newtext+spc+stpt.toFixed(2)+labl[sw]+" "+volliq+labl2[sw]+"\n" prnttext[stpt]=stpt.toFixed(2)+labl[sw]+spcs[3]+volliq+labl2[sw] ct=ct+stplast; stpt=stpt+stplast; } }else{alert("Please click an increment")}; } </script> <script> function pagetwo(){ if(stplast != 0){ ct=0; // diam=document.boxin.box3.value; rng=diam; document.open() document.write(brk) document.write(brk) document.write(spcs[4]);document.write("cyltank.php");document.write(brk);document.write(brk); document.write(spcs[4]); document.write("1728 Software Systems") document.write(brk) document.write(spcs[4]);document.write("Horizontal Cylinder Calculator"); document.write(brk) document.write(brk); document.write(spcs[4]);document.write("Cylinder Diameter= "+ diam + labl[sw]); document.write(brk) document.write(spcs[4]);document.write("Cylinder Length="+spcs[2]+ len + labl[sw]);document.write(brk);document.write(brk) document.write(spcs[3]+"When Tank" + spcs[1] + spcs[3] +"Then Tank");document.write(brk) document.write(spcs[3]+"Depth Equals " + spcs[1] + spcs[2]+ " Volume Equals");document.write(brk) document.write(brk); while(ct<=rng){ document.write(spcs[3]); document.write(prnttext[ct]); document.write(brk) ct=ct+stplast} document.write(brk) document.write(brk) document.close() } } </script>

>>>>>
>>>>>
>>>>>
The numbers input above are in which units?
or or or



Significant Figures >>>
Horizontale cilindrische tankcalculator