Ask a question to Desklib · AI bot


Utilizing the Appropriate Code

Added on -2019-09-16

| 5 pages
| 1902 words

Trusted by 2+ million users,
1000+ happy students everyday

Working individually you will create a series of regular expressions that identify different parts composing a METAR. METARs are reports assembled with a particular format that is easy to decode with computer systems using regular expressions. These reports typically come in two forms: North American METARs and International METARs. Create a series of regular expressions that decode each token of information using the North American METAR form.You can find METAR reports at the following address: order to find the weather information you need to get a METAR report from any airport you wish utilizing the appropriate code (Baltimore-Washington International is KBWI) and then apply the different regular expressions to identify each token and eventually extract it from the report.Your homework submission should be a script that reads a single line METAR from a file named: metar.txt Your script output (to the shell screen) should include:1.the report type: either METAR or SPECI for “Special Report”2.the station identifies (four characters starting with a K)3.Day of the month and time the report was filed4.If the token ‘AUTO’ is present, you should output “This is a fully automated report”5.If the token ‘COR’ is present, you should output “This is a corrected observation”6.Wind direction and speed, wind gusting, and variable wind directions7.Visibility in statute miles8.Light, medium, or heavy rain (-RA|RA|+RA)9.Cloud Conditions: [0 or more occurrences of each of the following]a.Sky Clearb.Few Clouds <altitude>c.Scattered Clouds <altitude>d.Broken Clouds <altitude>e.Overcast Clouds <altitude>10.Temperature11.Dew Point12.Barometric Pressure13.If the token ‘TH’ is present, you should output “Thunderstorms reported in the area”
KEY TO DECODING THE U.S. METAR OBSERVATIONREPORTKEY TO DECODING A METAR REPORTMETARTYPE OF REPORTMETAR: hourly (scheduled) report; SPECI: special (unscheduled) report.KABCICAO STATION(location) IDENTIFIERFour character ICAO location identifier.121755ZDATE/TIME groupAll dates and times in UTC using a 24-hour clock; two-digit date and four-digit time; always appended with Z to indicate UTC.AUTOREPORT MODIFIERAUTO: Indicates a fully automated report with no human intervention. It is removed when an observer logs on to the system. COR: Indicates a corrected observation. No modifier indicates human observer or automated system with human logged on for oversight functions.21016G24KT180V240WIND DIRECTIONAND SPEEDDirection in tens of degrees from true north (first three digits); next two digits: speed in whole knots; if needed, include character as: Gusts (character) followed by maximum observed speed; always appended with KT to indicate knots; 00000KT for calm; if direction varies by 60o or more and speed greater than 6 knots, a Variable wind direction group is reported, otherwise omitted. If wind direction is variable and speed 6 knots or less, replace wind direction with VRB followed by wind speed in knots. 1SMVISIBILITYPrevailing visibility in statute miles and fractions with space between whole miles and fractions; always appended with SM to indicate statute miles; values <1/4SM reported as M1/4SM.R11/P6000FTRUNWAY VISUALRANGEA 10-minute RVR evaluation value in hundreds of feet is reported if prevailing visibility is < or = 1 mile or RVR < or = 6000 feet; always appended with FT to indicate feet; value prefixed with M orP to indicate value is lower or higher than the reportable RVR value. See -RA BRWEATHERPHENOMENAPresent weather: QUALIFIERIntensity or Proximity- Light"no sign" Moderate+ HeavyVC Vicinity: but not at aerodrome; in U.S. METAR, between 5SM and 10SM of the point(s) of observation.DescriptorMI ShallowBL BlowingBC PatchesSH showersPR PartialDR DriftingTS ThunderstormFZ FreezingWEATHER PHENOMENA

Found this document preview useful?

You are reading a preview
Upload your documents to download
Become a Desklib member to get accesss

Students who viewed this