function TestArray(){var e=new Date;var t=[];alert(1);alert(tracking_data_170h[38778][0]);alert(tracking_data_170h[38778][1][0]);alert(1)}function select_ITU_spec_and_axis_range(){if(document.getElementById("ITUR_BO1213").checked==true)ITUspec="ITUR_BO1213";else if(document.getElementById("ITUR_BO1900").checked==true)ITUspec="ITUR_BO1900";else ITUspec="auto";offaxisrange=document.getElementById("IDoffaxisrange").value}function initialize(){inchtometer=.0254;inctofeet=1/12;feettometer=inchtometer*12;metertoinch=1/inchtometer;metertofeet=metertoinch/12;feettoinch=1*12;AntSize=1*document.getElementById("AntSize").value;document.getElementById("AntSizeFeet").value=formatvalue(AntSize*metertofeet,4);document.getElementById("AntSizeInches").value=formatvalue(AntSize*metertofeet*feettoinch,5);find_off_axis_gain()}function draw_chart(){drawVisualization()}function drawVisualization(){var e,t,n,r,s,o;pi=Math.PI;o=299792458;Frequency=1*document.getElementById("Frequency").value;AntSize=1*document.getElementById("AntSize").value;n=1/100*document.getElementById("AntEfficiency").value;s=o/(Frequency*1e3*1e3*1e3);r=10*log10(n*(pi*AntSize/s)*(pi*AntSize/s));var u=[];var a=[];var f=[];var l=[];var c=[];f.push(["x","Co-polar relative gain[dB]","Cross-polar relative gain[dB]"]);for(i=-Math.round(offaxisrange*10);i=10.7&&Frequency<=12.75)t=ITUR_BO1213_CrosspolAntennaPatternKU(AntSize*1,n*1,Frequency*1,50,Math.abs(i/10));else if(Frequency>=21.4&&Frequency<=22)t=ITUR_BO1900_CrosspolAntennaPatternKA(AntSize*1,n*1,Frequency*1,50,Math.abs(i/10));else t=ITUR_BO1213_CrosspolAntennaPatternKU(AntSize*1,n*1,Frequency*1,50,Math.abs(i/10));f.push([i/10,1*formatnumber(Math.round(e*10)/10,2),1*formatnumber(Math.round(t*10)/10,2)])}l.push(["x","Co-polar gain[dBi]","Cross-polar isolation[dB]"]);for(i=-Math.round(offaxisrange*10);i=10.7&&Frequency<=12.75)t=ITUR_BO1213_CrosspolAntennaPatternKU(AntSize*1,n*1,Frequency*1,50,Math.abs(i/10));else if(Frequency>=21.4&&Frequency<=22)t=ITUR_BO1900_CrosspolAntennaPatternKA(AntSize*1,n*1,Frequency*1,50,Math.abs(i/10));else t=ITUR_BO1213_CrosspolAntennaPatternKU(AntSize*1,n*1,Frequency*1,50,Math.abs(i/10));l.push([i/10,1*formatnumber(Math.round(1*(r+e)*10)/10,2),1*formatnumber(Math.round(Math.abs(Math.abs(e)-1*Math.abs(t))*10)/10,2)])}u=google.visualization.arrayToDataTable(f);a=google.visualization.arrayToDataTable(l);var h=(new google.visualization.LineChart(document.getElementById("chart_div"))).draw(u,{curveType:"function",width:700,height:400,vAxis:{gridlines:{color:"#333",count:10}},hAxis:{gridlines:{color:"#333",count:10}}});var p=(new google.visualization.LineChart(document.getElementById("chart_div2"))).draw(a,{curveType:"function",width:700,height:400,vAxis:{gridlines:{color:"#333",count:10}},hAxis:{gridlines:{color:"#333",count:10}}})}function find_off_axis_gain(){var e,t,n,r,i,s,o,u;select_ITU_spec_and_axis_range();i=299792458;s=Math.PI;Frequency=1*document.getElementById("Frequency").value;o=i/(Frequency*1e3*1e3*1e3);t=1/100*document.getElementById("AntEfficiency").value;AntSize=1*document.getElementById("AntSize").value;n=1*document.getElementById("IDoffaxisangle").value;if(n<0){alert("Off axis angle must be positive\r\nChanging the value set to positive value");n=-n;document.getElementById("IDoffaxisangle").value=formatvalue(n,4)}e=ITUR_BO1213_AntennaPattern(AntSize*1,t*1,Frequency*1,50,n);document.getElementById("IDoffaxisgain_red").value=formatvalue(1*e,6);r=10*log10(t*(s*AntSize/o)*(s*AntSize/o));document.getElementById("IDantenna_gain").value=formatvalue(1*r,4);document.getElementById("IDoffaxisgain").value=formatvalue(1*(r+e),6);if(ITUspec=="ITUR_BO1213")u=ITUR_BO1213_CrosspolAntennaPatternKU(AntSize*1,t*1,Frequency*1,50,Math.abs(n));else if(ITUspec=="ITUR_BO1900")u=ITUR_BO1900_CrosspolAntennaPatternKA(AntSize*1,t*1,Frequency*1,50,Math.abs(n));else if(Frequency>=10.7&&Frequency<=12.75)u=ITUR_BO1213_CrosspolAntennaPatternKU(AntSize*1,t*1,Frequency*1,50,Math.abs(n));else if(Frequency>=21.4&&Frequency<=22)u=ITUR_BO1900_CrosspolAntennaPatternKA(AntSize*1,t*1,Frequency*1,50,Math.abs(n));else u=ITUR_BO1213_CrosspolAntennaPatternKU(AntSize*1,t*1,Frequency*1,50,Math.abs(n));document.getElementById("IDcrosspolisolation").value=formatvalue(Math.abs(Math.abs(e)-1*Math.abs(u)),6);document.getElementById("IDcrosspolgain").value=formatvalue(Math.abs(1*u),6);drawVisualization()}function find_off_axis_angle(){var e,t,n,r,s,o,u,a;select_ITU_spec_and_axis_range();s=299792458;o=Math.PI;Frequency=1*document.getElementById("Frequency").value;u=s/(Frequency*1e3*1e3*1e3);e=1*document.getElementById("IDoffaxisgain_red").value;if(e>0){alert("Off axisgain reduction value must be negative\r\nChanging the value to a negative value");document.getElementById("IDoffaxisgain_red").value=formatvalue(-e,6);e=-e}AntSize=1*document.getElementById("AntSize").value;Frequency=1*document.getElementById("Frequency").value;t=1/100*document.getElementById("AntEfficiency").value;n=find_offaxis_for_gain_reduction(e,AntSize*1,1*t);document.getElementById("IDoffaxisangle").value=formatvalue(n,4);r=10*log10(t*(o*AntSize/u)*(o*AntSize/u));document.getElementById("IDantenna_gain").value=formatvalue(1*r,4);document.getElementById("IDoffaxisgain").value=formatvalue(1*(r+e),6);if(ITUspec=="ITUR_BO1213")a=ITUR_BO1213_CrosspolAntennaPatternKU(AntSize*1,t*1,Frequency*1,50,Math.abs(n));else if(ITUspec=="ITUR_BO1900")a=ITUR_BO1900_CrosspolAntennaPatternKA(AntSize*1,t*1,Frequency*1,50,Math.abs(i/10));else if(Frequency>=10.7&&Frequency<=12.75)a=ITUR_BO1213_CrosspolAntennaPatternKU(AntSize*1,t*1,Frequency*1,50,Math.abs(n));else if(Frequency>=21.4&&Frequency<=22)a=ITUR_BO1900_CrosspolAntennaPatternKA(AntSize*1,t*1,Frequency*1,50,Math.abs(n));else a=ITUR_BO1900_CrosspolAntennaPatternKA(AntSize*1,t*1,Frequency*1,50,Math.abs(n));document.getElementById("IDcrosspolisolation").value=formatvalue(Math.abs(Math.abs(e)-1*Math.abs(a)),6);document.getElementById("IDcrosspolgain").value=formatvalue(Math.abs(1*a),6);drawVisualization()}function find_off_axis_angle_from_offaxis_gain(){var e,t,n,r,i,s,o,u;select_ITU_spec_and_axis_range();Frequency=1*document.getElementById("Frequency").value;t=1/100*document.getElementById("AntEfficiency").value;i=299792458;s=Math.PI;Frequency=1*document.getElementById("Frequency").value;o=i/(Frequency*1e3*1e3*1e3);AntSize=1*document.getElementById("AntSize").value;r=10*log10(t*(s*AntSize/o)*(s*AntSize/o));if(1*document.getElementById("IDoffaxisgain").value>r){alert("You specified a gain higher than boresight gain\r\nGain set to max gain");document.getElementById("IDoffaxisgain").value=formatvalue(1*r,4)}document.getElementById("IDantenna_gain").value=formatvalue(1*r,4);e=1*document.getElementById("IDoffaxisgain").value-r;document.getElementById("IDoffaxisgain_red").value=formatvalue(e,6);n=find_offaxis_for_gain_reduction(e,AntSize*1,1*t);document.getElementById("IDoffaxisangle").value=formatvalue(n,4);if(ITUspec=="ITUR_BO1213")u=ITUR_BO1213_CrosspolAntennaPatternKU(AntSize*1,t*1,Frequency*1,50,Math.abs(n));else if(ITUspec=="ITUR_BO1900")u=ITUR_BO1900_CrosspolAntennaPatternKA(AntSize*1,t*1,Frequency*1,50,Math.abs(n));else if(Frequency>=10.7&&Frequency<=12.75)u=ITUR_BO1213_CrosspolAntennaPatternKU(AntSize*1,t*1,Frequency*1,50,Math.abs(n));else if(Frequency>=21.4&&Frequency<=22)u=ITUR_BO1900_CrosspolAntennaPatternKA(AntSize*1,t*1,Frequency*1,50,Math.abs(n));else u=ITUR_BO1900_CrosspolAntennaPatternKA(AntSize*1,t*1,Frequency*1,50,Math.abs(n));document.getElementById("IDcrosspolisolation").value=formatvalue(Math.abs(Math.abs(e)-1*Math.abs(u)),6);document.getElementById("IDcrosspolgain").value=formatvalue(Math.abs(1*u),6);drawVisualization()}function ITUR_BO1213_AntennaPattern(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m;s=299792458;o=Math.PI;c=Math.pow(10,34/25);u=s/(n*1e3*1e3*1e3);m=e/u;document.getElementById("warning").innerHTML="";if(n<=12.75&&n>=10.7&&m<11||ITUspec=="ITUR_BO1213"&&m<=11){alert("Antenna size too small for the ITU-R antenna pattern\r\nAutomaticly increase to valid antenna size!");document.getElementById("AntSize").value=formatvalue(u*11.1,4);document.getElementById("AntSizeFeet").value=formatvalue(AntSize*metertofeet,4);document.getElementById("AntSizeInches").value=formatvalue(AntSize*metertofeet*feettoinch,5);e=u*11.1}else if(n<=22&&n>=21.4&&m<32||ITUspec=="ITUR_BO1900"&&m<=32){alert("Antenna size too small for the ITU-R antenna pattern\r\nAutomaticly increase to valid antenna size!");document.getElementById("AntSize").value=formatvalue(u*32.1,4);document.getElementById("AntSizeFeet").value=formatvalue(AntSize*metertofeet,4);document.getElementById("AntSizeInches").value=formatvalue(AntSize*metertofeet*feettoinch,5);e=u*32.1}else if(n>12.75&&n<21.4||n>22||n<10.7){document.getElementById("warning").style.color="red";document.getElementById("warning").innerHTML="Warning1: Frequency not valid for this ITU-R antenna pattern!";if(ITUspec=="ITUR_BO1213"&&m<11){document.getElementById("AntSize").value=formatvalue(u*11.1,4);document.getElementById("AntSizeFeet").value=formatvalue(AntSize*metertofeet,4);document.getElementById("AntSizeInches").value=formatvalue(AntSize*metertofeet*feettoinch,5);e=u*11.1;document.getElementById("warning").innerHTML="Warning1: Frequency not valid for this ITU-R Ku antenna pattern!
Warning2:Antenna size too small, increased size!
"}else if(ITUspec=="ITUR_BO1900"&&m<32){document.getElementById("AntSize").value=formatvalue(u*32.1,5);document.getElementById("AntSizeFeet").value=formatvalue(AntSize*metertofeet,4);document.getElementById("AntSizeInches").value=formatvalue(AntSize*metertofeet*feettoinch,5);e=u*32.1;document.getElementById("warning").innerHTML="Warning1: Frequency not valid for this ITU-R Ka antenna pattern!
Warning2:Antenna size too small, increased size!
"}else{if(m<11){document.getElementById("AntSize").value=formatvalue(u*11.1,4);document.getElementById("AntSizeFeet").value=formatvalue(AntSize*metertofeet,4);document.getElementById("AntSizeInches").value=formatvalue(AntSize*metertofeet*feettoinch,5);e=u*11.1;document.getElementById("warning").innerHTML="Warning1: Frequency not valid for this ITU-R antenna pattern!
Warning2:Antenna size too small, increased size!
"}}}document.getElementById("selected_antennapattern").style.color="blue";if(ITUspec=="ITUR_BO1900"){document.getElementById("selected_antennapattern").innerHTML="ITU-R BO.1900 Ka pattern used!"}else if(ITUspec=="ITUR_BO1213"){document.getElementById("selected_antennapattern").innerHTML="ITU-R BO.1213 Ku pattern used!"}else{if(n>=10.7&&n<=12.75)document.getElementById("selected_antennapattern").innerHTML="ITU-R BO.1213 Ku pattern used!";else if(n>=21.4&&n<=22)document.getElementById("selected_antennapattern").innerHTML="ITU-R BO.1900 Ka pattern used!";else document.getElementById("selected_antennapattern").innerHTML="ITU-R BO.1213 Ku pattern used!"}m=e/u;d=10*log10(t*(o*e/u)*(o*e/u));l=95*(u/e);p=29-25*log10(l);f=u/e*Math.sqrt((d-p)/.0025);if(0<=i&&i0)alert("Antenna cross pol pattern not valid for this combination of antenna size,frequency and off-axis value!");if(0<=i&&i=32)return w-g}function find_offaxis_for_gain_reduction(e,t,n){var r,s,o,u;for(i=0;i<1800;i++){r=i/10;s=ITUR_BO1213_AntennaPattern(1*t,1*n,1*Frequency,54,r);if(s==99)return-1*1;if(s0)alert("Antenna cross pol pattern not valid for this combination of antenna size,frequency and off-axis value!");if(0<=i&&i<.25*p)w=g-25;if(.25*p<=i&&i<.44*p)w=g-25+8*((i-.25*p)/(.19*p));if(.44*p<=i&&i=11)return w-g}function find_offaxis_for_gain_reduction(e,t,n){var r,s,o,u;for(i=0;i<1800;i++){r=i/10;s=ITUR_BO1213_AntennaPattern(1*t,1*n,1*Frequency,54,r);if(s==99)return-1*1;if(s-1?n.substr(0,r):n;document.cookie=i+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT"}}function formatvalue(e,t){var n="**************************";var r,i;var s="999999999999999999999999";var o=""+e;var u=parseFloat(o);if(o.length<=t)return o;if(o.indexOf("e")!=-1||u>parseFloat(s.substring(0,t)+".4"))return n.substring(0,t);var a=""+(u+(u-parseFloat(o.substring(0,t))));r=a.substring(0,t);return r}function formatnumber(e,t){var n,r,i,s,o,u,a;var f=new Array;a=e;var l=Math.pow(10,Math.abs(t)==t?t:2);n=String(Math.round(e*l)/l).replace(/^(\d)/," $1");if(e<0)n=" "+n;f=n.split(".");if(e!==0&&f.length>1){i=f[1];o=f[0];if(i.length=0)n=" "+n;return n}function ShowCookie(){var e,t,n,r,i,s,o,u;var a=new Array;var f=new Array;var l,c,h,p;u=40;s=document.cookie;if(s!==""){a=s.split(":");p="COOKIE CONTENT:";p=p+"\nSite Latitude:"+a[0]+" "+a[1];p=p+"\r\nSite Latitude:"+a[2]+" "+a[3];p=p+"\r\nSite Position List Index:"+a[4];p=p+"\r\nSat Position List Index:"+a[5];p=p+"\r\nSet Location:"+a[6];p=p+"\r\nCalibrate pulsevalue:"+a[7];p=p+"\r\nCalibrate puls per HA degree:"+a[8];p=p+"\r\nPulse counter increasing in direction:"+a[9];p=p+"\r\nHourangle for calibrated position:"+a[10];p=p+"\r\nHight above ocean:"+a[11]+"[km]";p=p+"\r\nAntenna Size:"+1*a[12]+"[m]";p=p+"\r\nRx Frequency:"+1*a[13]+"[GHz]";p=p+"\r\nCookie14:"+a[14];p=p+"\r\nSite name:"+a[15];p=p+"\r\nGoogle Map Zoom:"+a[16];p=p+"\r\nAntenna hight above ground:"+1*a[17]+"[m]";p=p+"\r\nCookie18:"+a[18];p=p+"\r\nCookie19:"+a[19];p=p+"\r\nHorizon-Horizon polarotor pulsecounter offset:"+a[20];alert(p)}else alert("Cookie is empty")}var inchtometer,feettometer,metertoinch,metertofeet,inchtofeet,feettoinch,AntSize,Frequency;var ITUspec,offaxisrange;var testarray344=[];var ttestarray13=[];google.load("visualization","1",{packages:["corechart"]})