Хранилища Subversion geo-modmetar

Сравнить редакции

Не учитывать пробелы Редакция 13 → Редакция 14

/trunk/ModMETAR.pm
327,7 → 327,7
SKC => "ясно",
CLR => "ясно",
SCT => "переменная облачность",
BKN => "переменная облачность",
BKN => "облачно с прояснениями",
FEW => "слабая облачность",
OVC => "сплошная облачность",
NSC => "нет существенной облачности",
352,6 → 352,24
 
my $_trend_types_pat = join("|", keys(%_trend_types));
 
my %_trend_types_ru = (
BLU => "видимость 8 км",
WHT => "видимость 5 км",
GRN => "видимость 3.7 км",
YLO => "видимость 1.6 км",
AMB => "видимость 800 м",
RED => "видимость менее 800 м",
BLACK => "аэропорт закрыт",
NOSIG => "без существенных изменений",
TEMPO => "временные изменения",
NSW => "без существенной погоды",
PROB => "вероятен",
BECMG => "становление",
LAST => "продолжается",
);
 
my $_trend_types_ru_pat = join("|", keys(%_trend_types_ru));
 
##
## Constructor.
##
416,6 → 434,7
$self->{SKY_RAW} = [ ]; # RAW data for sky
$self->{SKY_RUS} = [ ]; # current sky in Russian
$self->{VISIBILITY_RUS}= undef; # visibility info
$self->{SLP_RUS} = undef; # sea level pressure in Russian
 
$self->{tokens} = [ ]; # the "token" list
$self->{type} = "METAR"; # the report type (METAR/SPECI)
1028,7 → 1047,7
## euro type trend?
##
 
elsif (($parsestate >= $expect_modifier) and ($tok =~ /^$_trend_types_pat/)){
elsif (($parsestate >= $expect_modifier) and ($tok =~ /^$_trend_types_pat/) and ($tok =~ /^$_trend_types_ru_pat/)){
print "[$tok] is a trend.\n" if $self->{debug};
$parsestate = $expect_remarks;
next;
1066,6 → 1085,7
{
$self->{slp} = $tok;
$self->{SLP} = "$1 mb";
$self->{SLP_RUS} = "$1 мбар";
print "[$tok] is a sea level pressure.\n" if $self->{debug};
next;
}
1078,6 → 1098,7
{
$self->{slp} = "SLPNO";
$self->{SLP} = "not available";
$self->{SLP_RUS} = "нет данных";
print "[$tok] is a sea level pressure.\n" if $self->{debug};
next;
}
1560,14 → 1581,14
 
=head1 NAME
 
Mod::Geo::METAR - Process aviation weather reports in the METAR format.
Geo::ModMETAR - Process aviation weather reports in the METAR format.
 
=head1 SYNOPSIS
 
use Mod::Geo::METAR;
use Geo::ModMETAR;
use strict;
 
my $m = new Mod::Geo::METAR;
my $m = new Geo::ModMETAR;
$m->metar("KFDY 251450Z 21012G21KT 8SM OVC065 04/M01 A3010 RMK 57014");
print $m->dump;
 
1586,7 → 1607,7
 
=head2 How you might use this
 
Here is how you I<might> use the Geo::METAR module.
Here is how you I<might> use the Geo::ModMETAR module.
 
One use that I have had for this module is to query the NWS METAR page
(using the LWP modules) at:
1603,7 → 1624,7
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.
Geo::ModMETAR object.
 
=head2 Functions
 
1859,6 → 1880,10
 
Altimeter setting in hectopascals.
 
=item ALT_PL
 
QFE pressure in mmHg.
 
=item REMARKS
 
Any remarks in the report.
1874,7 → 1899,7
 
=head1 BUGS
 
The Geo::METAR is only initialized once, which means you'll get left-over
The Geo::ModMETAR 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.
1884,7 → 1909,7
 
=head1 TODO
 
There is a TODO file included in the Geo::METAR distribution listing
There is a TODO file included in the Geo::ModMETAR 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.