•
Above "+(windSegment[3]+1)+" "+units[0]+"
";for(i=2;i>=0;i--){e.innerHTML+="•
"+(windSegment[i]+1)+"-"+(windSegment[i+1])+" "+units[0]+"
";}}}else{alert("For a better visual experience, use a HTML 5 compatible browser.");for(i=1;i<=9;i++){gId("h"+i).innerHTML="";gId("l"+i).innerHTML="";}gId("cdir").innerHTML="";gId("rdir").innerHTML="";}initRoseDiagram();var eu="1";gId("elev").innerHTML="472.000 "+lU[eu];refresh();}function clr(c,cvs){c.clearRect(0,0,cvs.width,cvs.height);}function tM(v,r){return Math.ceil(v/r)*r;}function drawRainBucket(canvas_name,v){if(!canvas_support)return;var cvs=gId(canvas_name);var c=cvs.getContext("2d");var top=5;var width=25;var left=cvs.width-width-3.5;var bottom_mark=0;var t_m;if(isNaN(v)){t_m=1;v=0;}else if(v<1){t_m=1;}else if(v<2){t_m=tM(v,2);}else if(v<4){t_m=tM(v,4);}else if(v<10){t_m=tM(v,10);}else if(v<20){t_m=tM(v,20);}else if(v<50){t_m=tM(v,25);}else if(v<=100){t_m=tM(v,50);}else if(v<9999){t_m=tM(v,100);}else{t_m=tM(v,1000);}var height=30;var bottom=top+height;var right=left+width;var lines_per_div=height/(t_m-bottom_mark);var middle_mark=(t_m-bottom_mark)/2;var water_height=lines_per_div*v;clr(c,cvs);c.beginPath();c.fillStyle="#fff";c.lineWidth=1;c.textBaseline="middle";c.textAlign="right";c.font="bold 11px verdana, arial, sans-serif";c.moveTo(left,top);c.lineTo(left,bottom+.5);c.lineTo(right,bottom+.5);c.lineTo(right,top);c.fillText(t_m,left-10,top);c.moveTo(left,top+.5);c.lineTo(left-5,top+.5);c.moveTo(left,bottom+.5);c.lineTo(left-5,bottom+.5);c.moveTo(left,top+(height/2));c.lineTo(left-5,top+(height/2)+.5);c.fillStyle="#269DFF";c.fillRect(left+1,bottom-water_height,width-2,water_height);c.strokeStyle="#fff";c.stroke();}function drawRect(c,x,y,w,h,col){c.save();c.fillStyle=col;c.strokeStyle=col;c.beginPath();c.rect(x,y,w,h);c.fill();c.restore();}function drawPressureGraph(vals){if(!canvas_support)return;var cvs=gId("pressure_canvas");var c=cvs.getContext("2d");var i;var highP=0;var lowP=9999999;for(i=0;i<8;i++){if(isNaN(vals[i])){}else{if(vals[i]>highP){highP=vals[i];}if(vals[i]bdiff){bdiff=d[i];}}scale=bdiff/4;scale=Math.round(scale*100)/100;y_start=-bdiff;}var x_spacing=5;var y_spacing=4;var y_bars=9;var x_bars=8;var x_indx=cvs.width-x_spacing-28;var y_indx=y_bars*(9+y_spacing);var i,y;var zero_level=vals[0];var time_text=[0,-1,-3,-6,-9,-12,-15,-24];var time_text_y=y_indx+y_spacing+9;var p_text_x=cvs.width-((x_spacing+28)*x_bars+10);var p_text_y=y_indx+(9)/3;var p_label=y_start;clr(c,cvs);c.beginPath();c.fillStyle="#ffffff";c.fillStyle="white";c.textBaseline="middle";c.textAlign="right";c.font="bold 11px verdana, arial, sans-serif";c.lineCap="round";c.lineWidth=2;for(i=0;iy_bars){vis_bars=y_bars;}c.fillText(time_text[i],x_indx+(28/2),time_text_y);for(y=0;y=dataCountInOneHour){var oldestBinNum=binHistoryArray.shift();var oldestSpeedNum=speedHistoryArray.shift();if(sectionBin[oldestBinNum]>0){sectionBin[oldestBinNum]--;}if(speedBin[oldestBinNum][oldestSpeedNum]>0){speedBin[oldestBinNum][oldestSpeedNum]--;if(speedBin[oldestBinNum][4]>0){speedBin[oldestBinNum][4]--;}}}else{dataCount++;}binHistoryArray.push(binNum);if(speed>0&&speed<=windSegment[1]){speedBin[binNum][0]++;speedHistoryArray.push(0);}else if(speed>windSegment[1]&&speed<=windSegment[2]){speedBin[binNum][1]++;speedHistoryArray.push(1);}else if(speed>windSegment[2]&&speed<=windSegment[3]){speedBin[binNum][2]++;speedHistoryArray.push(2);}else if(speed>windSegment[3]){speedBin[binNum][3]++;speedHistoryArray.push(3);}speedBin[binNum][4]++;var biggest=0;var percentages=[];for(i=0;ibiggest){biggest=percentages[i];}}var scale=c_center_x/biggest;var r=biggest*scale;var mark_length=r/4;c.lineWidth=0.5;c.strokeStyle="#000";for(i=0;i<4;i++){c.beginPath();c.arc(0,0,r,0,360*dToR,true);c.closePath();c.stroke();r-=mark_length;}c.moveTo(0,0);for(i=0;i=0;j--){c.fillStyle=windCols[j];var x1=r2*sin_d1[i];var y1=r2*cos_d1[i];var x2=r2*sin_d2[i];var y2=r2*cos_d2[i];c.beginPath();c.lineTo(x1,y1);c.lineTo(x2,y2);c.lineTo(0,0);c.closePath();c.stroke();c.fill();if(speedBin[i][4]>0){r2=r2-(r*(speedBin[i][j]/speedBin[i][4]));}}}r=biggest*scale;var b=biggest;var per_y=-r;mark_length=r/4;var perc_length=b/4;c.font="10px verdana, arial, sans-serif";c.textAlign="center";c.lineWidth=0.5;c.fillStyle="#000";for(i=0;i<4;i++){c.textBaseline="top";c.fillText(b.toFixed(2),0,per_y+2);c.textBaseline="bottom";c.fillText(b.toFixed(2),0,-per_y-2);r-=mark_length;b-=perc_length;per_y+=mark_length;}c.restore();}function drawWindDial(dir){if(!canvas_support)return;var cvs=gId("wind_canvas");var c=cvs.getContext("2d");var c_center_x=(cvs.width-20)/2;var c_center_y=(cvs.height-20)/2;r=c_center_x+10;var dial_range=360;clr(c,cvs);c.save();c.translate(c_center_x+10,c_center_y+10);c.strokeStyle="#fff";c.fillStyle="#40455f";c.beginPath();c.arc(0,0,c_center_x,0,360*dToR,true);c.closePath();c.fill();c.stroke();c.font="10pt Arial";c.fillStyle="#fff";c.textAlign="center";c.textBaseline="top";c.fillText("N",0,-c_center_y+3);c.textBaseline="bottom";c.fillText("S",0,c_center_y-1);c.textBaseline="middle";c.textAlign="left";c.fillText("W",-c_center_x+3,0);c.textAlign="right";c.fillText("E",c_center_x-3,0);for(i=45;i<=315;i+=90){var d=(i)*dToR;var s1=Math.sin(d);var c1=Math.cos(d)*-1;var x1=(c_center_x-12)*s1;var y1=(c_center_x-12)*c1;var x2=(c_center_x-2)*s1;var y2=(c_center_x-2)*c1;c.beginPath();c.moveTo(x1,y1);c.lineTo(x2,y2);c.closePath();c.stroke();}if(isNaN(dir)){c.restore();return;}c.fillStyle="red";c.strokeStyle="#fff";if(dir>=0&&dir<=360){dir=Number(dir);var d1=(dir)*dToR;var d2=(dir-8)*dToR;var d3=(dir+8)*dToR;var x1=10*Math.sin(d1);var y1=10*Math.cos(d1)*-1;var x2=r*Math.sin(d2);var y2=r*Math.cos(d2)*-1;var x3=r*Math.sin(d3);var y3=r*Math.cos(d3)*-1;c.beginPath();c.moveTo(x1,y1);c.lineTo(x2,y2);c.lineTo(x3,y3);c.lineTo(x1,y1);c.closePath();c.stroke();c.fill();}c.restore();}function drawArrow(c,x,y,fs){c.fillStyle=fs;c.beginPath();c.moveTo(x,y);c.lineTo(x+8,y-8);c.lineTo(x+8,y+8);c.lineTo(x,y);c.fill();c.closePath();}function drawRoundLine(c,x,y1,y2,col,lw){c.lineCap="round";c.lineWidth=lw;c.strokeStyle=col;c.beginPath();c.moveTo(x,y1);c.lineTo(x,y2);c.stroke();}function drawThermometer(max,min,temp,htemp,ltemp){if(!canvas_support)return;var cvs=gId("therm_canvas");var c=cvs.getContext("2d");var c_center_x=cvs.width-30;var c_center_y=cvs.height/2;var t_center_x=20/2;var t_center_y=199/2;var t_x=c_center_x-t_center_x;var t_y=c_center_y-t_center_y;var m_center_x=20/2;var m_center_y=191/2;var m_x=c_center_x-m_center_x;var m_y=c_center_y-m_center_y-1;var temp_range=max-min;var marks=10;var top_offset=10;var bottom_offset=13;var top_cap_len=4;var first_mark_y=t_y+top_offset;var last_mark_y=199-bottom_offset;var mark_range=last_mark_y-first_mark_y;var degrees_per_mark=temp_range/marks;var degrees_per_pixel=temp_range/mark_range;var pixels_per_degree=mark_range/temp_range;var pixels_per_mark=mark_range/marks;var half_pixels_per_mark=pixels_per_mark/2;var m_y_len=(temp-min)/degrees_per_pixel+top_offset;var high_x=t_x+20+1;if(htemp>max){htemp=max;}var high_y=190-((htemp-min)/degrees_per_pixel+4);var low_x=high_x;if(ltempmax){drawRoundLine(c,t_x+t_center_x,m_y+8,m_y+186,"#EB1419",14);}else if(temp Gravel Peak MET Station
Temperature: | | Today | Hi | | | Lo | | | | Yesterday | Hi | | | Lo | | | LoHi | | | | Humidity: | Today | Hi | | | Lo | | | | Yesterday | Hi | | | Lo | | | LoHi | | | | Rain: | Past Hour
| | Total Today
| | Prev 7 Days
| | Total
| Last Reset: | | Hi |
Lo | | |
Heat Index: | Wind Chill: | Dew Point: |
Wind:
Current Direction | | Rose Diagram | | | | Hi | | Lo | | |
Barometric Pressure: |
Location: | Lompoc CA | Site ID: | K7AZ | Elevation: | | Lat,Long: | 34.604 , -120.489 | |
Solar: | Cab Tmp: | BLDG TMP: |
| CH Technical Services |