function click() { if (event.button==2) { alert('感謝您的光臨.') } } document.onmousedown=click function goHist(a) { history.go(a); } function getgsbutton(buttonGroup) { for (var i = 0; i < buttonGroup.length; i++) { if (buttonGroup[i].checked) { return i } } return 0 } function clear2(form) { form.earth_lat.value = ""; form.earth_lon.value = ""; form.elevation.value = ""; form.skysat_lon1.value = ""; form.xazimuth.value = ""; form.cul_status.value="輸入新資料!"; } function clear1(form) { form.skysat_lon1.value = ""; form.elevation.value = ""; form.xazimuth.value = ""; form.cul_status.value="請輸入衛星位置!"; } function compute(form) { form.cul_status.value="" if (form.earth_lat.value!="" && form.earth_lon.value!="" && form.skysat_lon1.value!="") { sat = form.skysat_lon1.value; var ld = sat - form.earth_lon.value; var cos_esl = Math.cos(form.earth_lat.value/180*(22/7)); var cos_ld = Math.cos(ld/180*(22/7)); if (form.earth_lat.value>81.3 || ld>81.3 || (cos_esl*cos_ld)<0.151 || Math.abs(ld) > 81.3){ form.elevation.value = ""; form.xazimuth.value = ""; form.cul_status.value="接收天線位置超出衛星含蓋範圍!"; /* alert("接收天線位置超出衛星含蓋範圍!") */ } else { var up = cos_esl * cos_ld - 0.151; var dn = Math.sqrt(1 - cos_esl * cos_esl * cos_ld * cos_ld); var t1 = Math.atan(up/dn); form.elevation.value=t1/3.1412*180; var t1 = Math.tan(ld/180*22/7)/Math.sin(form.earth_lat.value/180*22/7); var azimuth = Math.abs(Math.atan(t1)/3.1412*180); window.status=""; var xt= form.earth_lon.value*1; var s=sat*1; form.cul_status.value="計算完成!" form.xazimuth.value=180-azimuth form.cul_status.value=form.cul_status.value+"<本計算未含磁偏角修正量!>"; } } else { if (form.earth_lon.value=="") { form.cul_status.value ="經度 "; } if (form.earth_lat.value=="") { form.cul_status.value = form.cul_status.value+"緯度 "; } if (form.skysat_lon1.value=="") { form.cul_status.value= form.cul_status.value+"衛星位置."; } form.cul_status.value= "資料不全!請輸入" + form.cul_status.value + "。"; window.status="資料輸入錯誤!"; return; } }