|
NAMEGeo::METAR - Process aviation weather reports in the METAR format.SYNOPSISuse Geo::METAR; use strict; my $m = new Geo::METAR; $m->metar("KFDY 251450Z 21012G21KT 8SM OVC065 04/M01 A3010 RMK 57014"); print $m->dump; exit; DESCRIPTIONMETAR reports are available on-line, thanks to the National Weather Service. Since reading the METAR format isn't easy for non-pilots, these reports are relatively useles to the common man who just wants a quick glace at the weather. This module tries to parse the METAR reports so the data can be used to create readable weather reports and/or process the data in applications.USAGEHow you might use thisHere is how you might use the Geo::METAR module.One use that I have had for this module is to query the NWS METAR page (using the LWP modules) at http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=EHSB to get an up-to-date METAR. Then, I scan thru the output, looking for what looks like a METAR string (that's not hard in Perl). Oh, EHSB can be any site location code where there is a reporting station. I then pass the METAR into this module and get the info I want. I can then update my webcam page with the current temperature, sky conditions, or whatnot. See for yourself at http://webcam.idefix.net/ See the BUGS section for a remark about multiple passes with the same Geo::METAR object. FunctionsThe following functions are defined in the METAR module. Most of them are public, meaning that you're supposed to use them. Some are private, meaning that you're not supposed to use them -- but I won't stop you. Assume that functions are public unless otherwise documented.
VariablesAfter you've called metar(), you'd probably like to get at the individual values for things like temperature, dew point, and so on. You do that by accessing individual variables via the METAR object.This section lists those variables and what they represent. If you call dump(), you'll find that it spits all of these out.
NOTESTest suite is small and incomplete. Needs work yet.Older versions of this module were installed as "METAR" instaed of "Geo::METAR" BUGSThe Geo::METAR is only initialized once, which means you'll get left-over crud in variables when you call the metar() function twice.What is an invalid METAR in one country is a standard one in the next. The standard is interpreted and used by meteorologists all over the world, with local variations. This means there will always be METARs that will trip the parser. TODOThere is a TODO file included in the Geo::METAR distribution listing the outstanding tasks that I or others have devised. Please check that list before you submit a bug report or request a new feture. It might already be on the TODO list.AUTHORS AND COPYRIGHTCopyright 1997-2000, Jeremy D. Zawodny <Jeremy [at] Zawodny.com>Copyright 2007, Koos van den Hout <koos@kzdoos.xs4all.nl> Geo::METAR is covered under the GNU Public License (GPL) version 2 or later. The Geo::METAR Web site is located at: http://idefix.net/~koos/perl/Geo-METAR/ CREDITSIn addition to our work on Geo::METAR, We've received ideas, help, and patches from the following folks:* Ethan Dicks <ethan.dicks [at] gmail.com> Testing of Geo::METAR at the South Pole. Corrections and pointers to interesting cases to test. * Otterboy <jong [at] watchguard.com> Random script fixes and initial debugging help * Remi Lefebvre <remi [at] solaria.dhis.org> Debian packaging as libgeo-metar-perl.deb. * Mike Engelhart <mengelhart [at] earthtrip.com> Wind direction naming corrections. * Michael Starling <mstarling [at] logic.bm> Wind direction naming corrections. * Hans Einar Nielssen <hans.einar [at] nielssen.com> Wind direction naming corrections. * Nathan Neulinger <nneul [at] umr.edu> Lots of enhancements and corrections. Too many to list here. RELATED PROJECTSlcdproc at http://www.lcdproc.org/ uses Geo::METAR in lcdmetar.pl to display weather data on an lcd.
Visit the GSP FreeBSD Man Page Interface. |