民航气象报文解码程序代码.doc_第1页
民航气象报文解码程序代码.doc_第2页
民航气象报文解码程序代码.doc_第3页
民航气象报文解码程序代码.doc_第4页
民航气象报文解码程序代码.doc_第5页
已阅读5页,还剩13页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

METAR Decoding Page!-/!CDATA var m3_u = (tocol=https:?/www/delivery/ajs.php:/www/delivery/ajs.php); var m3_r = Math.floor(Math.random()*99999999999); if (!document.MAX_used) document.MAX_used = ,; document.write ();/-function add_output(text) document.encoded.decreport.value = document.encoded.decreport.value + text;function is_num_digit(ch) return ( (ch = 0) | (ch = 1) | (ch = 2) | (ch = 3) | (ch = 4) | (ch = 5) | (ch = 6) | (ch = 7) | (ch = 8) | (ch = 9) );function is_alphabetic_char(ch) return ( (ch = A) & (ch 5) & (typeof myArray6 != undefined) ) if(myArray6=U) add_output(, and increasing); else if(myArray6=D) add_output(, and decreasing); add_output(n); return; / Check if token is CAVOK if(token = CAVOK) add_output(CAVOK conditions: Visibility 10 km or more,n no cloud below 5.000 feet or below the MSA (whichever is greater), n no cumulonimbus, and no significant weather fenomena inn the aerodrome or its vicinityn); return; / Check if token is NOSIG if(token = NOSIG) add_output(No significant changes expected in the near futuren); return; / Check if token is a present weather code - The regular expression is a bit / long, because several precipitation types can be joined in a token, and I / dont see a better way to get all the codes. var reWX = /(-|+)?(VC)?(MI|BC|BL|SH|TS|FZ|PR)?(DZ|RA|SN|SG|IC|PL|GR|GS)?(DZ|RA|SN|SG|IC|PL|GR|GS)?(DZ|RA|SN|SG|IC|PL|GR|GS)?(DZ|RA|SN|SG|IC|PL|GR|GS)?(DZ|RA|SN|SG|IC|PL|GR|GS|BR|FG|FU|VA|DU|SA|HZ|PO|SQ|FC|SS|DS)$/; if(reWX.test(token) add_output(Weather: ); var myArray = reWX.exec(token); for(var i=1;imyArray.length; i+) if(myArrayi = -) add_output(Light ); if(myArrayi = +) add_output(Strong ); if(myArrayi = VC) add_output(In the vicinity, ); if(myArrayi = MI) add_output(Shallow ); if(myArrayi = BC) add_output(Patches of ); if(myArrayi = SH) add_output(Showers of ); if(myArrayi = TS) add_output(Thunderstorms ); if(myArrayi = FZ) add_output(Freezing (or super-cooled) ); if(myArrayi = PR) add_output(Partial ); if(myArrayi = DZ) add_output(Drizzle ); if(myArrayi = RA) add_output(Rain ); if(myArrayi = SN) add_output(Snow ); if(myArrayi = SG) add_output(Snow grains ); if(myArrayi = IC) add_output(Ice Crystals ); if(myArrayi = PL) add_output(Ice Pellets ); if(myArrayi = GR) add_output(Hail ); if(myArrayi = GS) add_output(Small hail ( 5 mm diameter) and/or snow pellets ); if(myArrayi = BR) add_output(Mist ); if(myArrayi = FG) add_output(Fog ); if(myArrayi = FU) add_output(Smoke ); if(myArrayi = VA) add_output(Volcanic Ash ); if(myArrayi = DU) add_output(Widespread dust ); if(myArrayi = SA) add_output(Sand ); if(myArrayi = HZ) add_output(Haze ); if(myArrayi = PO) add_output(Dust/Sand whirls ); if(myArrayi = SQ) add_output(Squall ); if(myArrayi = FC) add_output(Funnel clouds ); if(myArrayi = SS) add_output(Sandstorm ); if(myArrayi = DS) add_output(Duststorm ); add_output(n); return; / Check if token is recent weather observation var reREWX = /RE(-|+)?(VC)?(MI|BC|BL|SH|TS|FZ|PR)?(DZ|RA|SN|SG|IC|PL|GR|GS)?(DZ|RA|SN|SG|IC|PL|GR|GS)?(DZ|RA|SN|SG|IC|PL|GR|GS)?(DZ|RA|SN|SG|IC|PL|GR|GS)?(DZ|RA|SN|SG|IC|PL|GR|GS|BR|FG|FU|VA|DU|SA|HZ|PO|SQ|FC|SS|DS)?$/; if(reREWX.test(token) add_output(Since the previous observation (but not at present), the followingnmeteorological phenomena were observed: ); var myArray = reREWX.exec(token); for(var i=1;imyArray.length; i+) if(myArrayi = -) add_output(Light ); if(myArrayi = +) add_output(Strong ); if(myArrayi = VC) add_output(In the vicinity, ); if(myArrayi = MI) add_output(Shallow ); if(myArrayi = BC) add_output(Patches of ); if(myArrayi = SH) add_output(Showers of ); if(myArrayi = TS) add_output(Thunderstorms ); if(myArrayi = FZ) add_output(Freezing (or super-cooled) ); if(myArrayi = PR) add_output(Partial ); if(myArrayi = DZ) add_output(Drizzle ); if(myArrayi = RA) add_output(Rain ); if(myArrayi = SN) add_output(Snow ); if(myArrayi = SG) add_output(Snow grains ); if(myArrayi = IC) add_output(Ice Crystals ); if(myArrayi = PL) add_output(Ice Pellets ); if(myArrayi = GR) add_output(Hail ); if(myArrayi = GS) add_output(Small hail ( 5 mm diameter) and/or snow pellets ); if(myArrayi = BR) add_output(Mist ); if(myArrayi = FG) add_output(Fog ); if(myArrayi = FU) add_output(Smoke ); if(myArrayi = VA) add_output(Volcanic Ash ); if(myArrayi = DU) add_output(Widespread dust ); if(myArrayi = SA) add_output(Sand ); if(myArrayi = HZ) add_output(Haze ); if(myArrayi = PO) add_output(Dust/Sand whirls ); if(myArrayi = SQ) add_output(Squall ); if(myArrayi = FC) add_output(Funnel clouds ); if(myArrayi = SS) add_output(Sandstorm ); if(myArrayi = DS) add_output(Duststorm ); add_output(n); return; / Check if token is temperature / dewpoint pair var reTempDew = /(M?dd|/)/(M?dd)?$/; if(reTempDew.test(token) var myArray = reTempDew.exec(token); if(myArray1.charAt(0)=M) add_output(Temperature: - + myArray1.substr(1,2) + degrees Celsiusn); else add_output(Temperature: + myArray1.substr(0,2) + degrees Celsiusn); if(myArray2!=) if(myArray2.charAt(0)=M) add_output(Dewpoint: - + myArray2.substr(1,2) + degrees Celsiusn); else add_output(Dewpoint: + myArray2.substr(0,2) + degrees Celsiusn); return; / Check if token is sky clear indication if(token=SKC) add_output(Clear skyn); return; / Check if token is vertical visibility indication var reVV = /VV(d3|/3)$/; if(reVV.test(token) / VVddd - ddd is vertical distance, or / if unspecified var myArray = reVV.exec(token); add_output(Sky is obscured - vertical visibility); if(myArray1 = /) add_output( cannot be assessedn); else add_output(: + (100*parseInt(myArray1,10) + feetn); return; / Check if token is cloud indication var reCloud = /(FEW|SCT|BKN|OVC)(d3)(CB|TCU)?$/; if(reCloud.test(token) / Clouds: aaadddkk - aaa indicates amount of sky covered, ddd distance over / aerodrome level, and kk the type of cloud. var myArray = reCloud.exec(token); add_output(Clouds: ); if(myArray1 = FEW) add_output(A few ); else if(myArray1 = SCT) add_output(Scattered ); else if(myArray1 = BKN) add_output(Broken sky ); else if(myArray1 = OVC) add_output(Overcast sky ); add_output(, at + (100*parseInt(myArray2,10) + feet above aerodrome level); if(myArray3 = CB) add_output(, cumulonimbus); else if(myArray3 = TCU) add_output(, towering cumulus); add_output(n); return; / Check if token is part of a wind-shear indication var reRWY = /RWY(d2)(L|C|R)?$/; if(token=WS) add_output(There is wind-shear in ); return; else if(token=ALL) add_output(all ); return; else if(token=RWY) add_output(runwaysn); return; else if (reRWY.test(token) var myArray = reRWY.exec(token); add_output(runway +myArray1); if(myArray2=L) add_output( Left); else if(myArray2=C) add_output( Central); else if(myArray2=R) add_output( Right); add_output(n); return; / Check if token is no-significant-weather indication if(token=NSW) add_output(No significant weather phenomena are observed at presentn); return; / Check if token is no-significant-clouds indication if(token=NSC) add_output(No significant clouds are observed below 5000 feet or below the minimum sector altitude (whichever is higher)n); return; / Check if token is part of trend indication if(token=BECMG) add_output(The following weather phenomena are expected to arise soon:n); return; if(token=TEMPO) add_output(The following weather phenomena are expected to arise temporarily:n); return; var reFM = /FM(d2)(d2)Z?$/; if(reFM.test(token) var myArray = reFM.exec(token); add_output( From +myArray1+:+myArray2+ UTC, ); return; var reTL = /TL(d2)(d2)Z?$/; if(reTL.test(token) var myArray = reTL.exec(token); add_output(Until +myAr

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论