r20966 - in /trunk/libgeo-metar-perl/debian: README.Debian changelog control patches/01-various-#262397.patch patches/pressure.patch patches/series patches/various.patch patches/visibility.patch patches/wind.patch
tincho at users.alioth.debian.org
tincho at users.alioth.debian.org
Fri Jun 13 05:38:54 UTC 2008
Author: tincho
Date: Fri Jun 13 05:38:53 2008
New Revision: 20966
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=20966
Log:
* debian/control: added myself to Uploaders, fixed case in short desc.
* debian/patches: finally merged all the patches from #304962 and #262397
with the new upstream release! (Closes: #304962).
Added:
trunk/libgeo-metar-perl/debian/patches/pressure.patch
trunk/libgeo-metar-perl/debian/patches/various.patch
trunk/libgeo-metar-perl/debian/patches/visibility.patch
trunk/libgeo-metar-perl/debian/patches/wind.patch
Removed:
trunk/libgeo-metar-perl/debian/patches/01-various-#262397.patch
Modified:
trunk/libgeo-metar-perl/debian/README.Debian
trunk/libgeo-metar-perl/debian/changelog
trunk/libgeo-metar-perl/debian/control
trunk/libgeo-metar-perl/debian/patches/series
Modified: trunk/libgeo-metar-perl/debian/README.Debian
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgeo-metar-perl/debian/README.Debian?rev=20966&op=diff
==============================================================================
--- trunk/libgeo-metar-perl/debian/README.Debian (original)
+++ trunk/libgeo-metar-perl/debian/README.Debian Fri Jun 13 05:38:53 2008
@@ -8,17 +8,23 @@
http://bugs.debian.org/libgeo-metar-perl
Contributors:
- Timo Hietanen <thietanen at iki.fi> (#262397)
- - also grabs the altimeter setting if it's reported in hectopascals (Q\d\d\d\d instead of A\d\d\d\d)
+ Timo Hietanen <thietanen at iki.fi> (#262397)
+ - also grabs the altimeter setting if it's reported in hectopascals
+ (Q\d\d\d\d instead of A\d\d\d\d)
- dont's set $self->{MOD} to "AUTO" by default
- tries a bit harder not to mix up weather groups with station identifiers
- - recognizes the visibility setting "CAVOK" (ceiling and visibility OK)
- - Doesn't recognize the METAR tag dddVddd (d = digit), which defines wind direction's variation.
- - Assumes that station ID begins with the letter 'K' (matches /K[A-Z]{3,3}/), while it should match /[A-Z]{4,4}/
- - Tries to find the visibility information even though $self->{visibility} isn't defined (information
- missing from the METAR report). This leads to a couple of warnings about uninitalized variables.
+ - Tries to find the visibility information even though $self->{visibility}
+ isn't defined (information missing from the METAR report). This leads to
+ a couple of warnings about uninitalized variables.
+A couple of bugs that need fixing, reported by Timo:
- --Jay Bonci
- <jaybonci at debian.org>
-
+- Unknown METAR group: RESHRA
+- Unknown METAR group: R06/P1500UU
+- Unknown METAR group: VV002
+- Unknown METAR group: 6000NE
+- Unknown METAR group: 24CLRD//
+- Unknown METAR group: 2419//95
+- Interprets R24/0650V1400N R06/0800V1200D as temperature 24, dew point 6
+- Convert numerals to numeric (04 -> 4)
+
Modified: trunk/libgeo-metar-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgeo-metar-perl/debian/changelog?rev=20966&op=diff
==============================================================================
--- trunk/libgeo-metar-perl/debian/changelog (original)
+++ trunk/libgeo-metar-perl/debian/changelog Fri Jun 13 05:38:53 2008
@@ -6,6 +6,9 @@
* New upstream release, new upstream maintainer.
* debian/docs: removed HACKING.
* debian/copyright: updated CP info, plus new format.
+ * debian/control: added myself to Uploaders, fixed case in short desc.
+ * debian/patches: finally merged all the patches from #304962 and #262397
+ with the new upstream release! (Closes: #304962).
-- MartÃn Ferrari <martin.ferrari at gmail.com> Sat, 05 Jan 2008 16:04:11 -0200
Modified: trunk/libgeo-metar-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgeo-metar-perl/debian/control?rev=20966&op=diff
==============================================================================
--- trunk/libgeo-metar-perl/debian/control (original)
+++ trunk/libgeo-metar-perl/debian/control Fri Jun 13 05:38:53 2008
@@ -2,7 +2,7 @@
Section: perl
Priority: optional
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Jay Bonci <jaybonci at debian.org>
+Uploaders: Jay Bonci <jaybonci at debian.org>, MartÃn Ferrari <tincho at debian.org>
Build-Depends-Indep: debhelper (>= 5), quilt
Build-Depends: perl (>= 5.6.0-16)
Standards-Version: 3.7.3
@@ -13,7 +13,7 @@
Package: libgeo-metar-perl
Architecture: all
Depends: ${perl:Depends}
-Description: Accessing Aviation Weather Information with Perl
+Description: accessing Aviation Weather Information with Perl
Geo::METAR is a Perl module to access and parse aviation weather information
with Perl.
.
Added: trunk/libgeo-metar-perl/debian/patches/pressure.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgeo-metar-perl/debian/patches/pressure.patch?rev=20966&op=file
==============================================================================
--- trunk/libgeo-metar-perl/debian/patches/pressure.patch (added)
+++ trunk/libgeo-metar-perl/debian/patches/pressure.patch Fri Jun 13 05:38:53 2008
@@ -1,0 +1,88 @@
+Index: libgeo-metar-perl/METAR.pm
+===================================================================
+--- libgeo-metar-perl.orig/METAR.pm
++++ libgeo-metar-perl/METAR.pm
+@@ -185,9 +185,9 @@
+
+ # PRESSURE
+ #
+-# The pressure, or altimeter setting, at the reporting site recorded in
+-# inches of mercury (Hg) minus the decimal point. It should always look
+-# like (A\d\d\d\d).
++# The pressure, or altimeter setting, at the reporting site recorded in whole
++# hectopascals (starts with a Q) or inches of mercury (Hg) minus the decimal
++# point (starts with an A). It should always look like ([AQ]\d\d\d\d).
+ #
+ # KNMI: Q\d\d\d\d pressure in hPa calculated for sea level
+
+@@ -354,7 +354,8 @@ sub new
+ $self->{HOURLY_DEW_F} = undef; # hourly dew point, celcius
+ $self->{HOURLY_DEW_C} = undef; # hourly dew point, fahrenheit
+ $self->{HOURLY_PRECIP} = undef; # hourly precipitation
+- $self->{ALT} = undef; # altimeter setting
++ $self->{ALT} = undef; # altimeter setting (Hg)
++ $self->{ALT_HP} = undef; # altimeter setting (hPa)
+ $self->{SLP} = undef; # sea level pressure
+ $self->{REMARKS} = undef; # remarks
+
+@@ -891,18 +892,14 @@ sub _process
+ }
+
+ ##
+- ## is it an altimeter setting?
++ ## is it an altimeter setting? (in.Hg)
+ ##
+
+ elsif (($parsestate >= $expect_modifier) and ($parsestate < $expect_remarks) and ($tok =~ /^A(\d\d)(\d\d)$/i))
+ {
+ $self->{alt} = $tok;
+- $self->{ALT} = "$1.$2";
+-
+- # inches Hg pressure. How imperial can you get
+- # conversion using 'units'
+-
+- $self->{pressure} = 33.863886 * $self->{ALT};
++ $self->{ALT} = "$1.$2"+0;
++ $self->{ALT_HP} = "$1.$2" * 33.863886;
+
+ print "[$tok] is an altimeter setting.\n" if $self->{debug};
+ $parsestate = $expect_recentweather;
+@@ -910,14 +907,14 @@ sub _process
+ }
+
+ ##
+- ## is it a pressure?
++ ## is it a pressure? (hPa)
+ ##
+
+ elsif (($parsestate >= $expect_modifier) and ($parsestate < $expect_remarks) and ($tok =~ /^Q(\d\d\d\d)$/i))
+ {
+ $self->{pressure} = $1;
+-
+- $self->{ALT} = 0.029529983*$self->{pressure};
++ $self->{ALT_HP} = $1;
++ $self->{ALT} = 0.029529983 * $self->{pressure};
+ print "[$tok] is an air pressure.\n" if $self->{debug};
+ $parsestate = $expect_recentweather;
+ next;
+@@ -1378,7 +1375,8 @@ sub dump
+ print "weather: " . join(', ', @{$self->{weather}}) . "\n";
+ print "sky: " . join(', ', @{$self->{sky}}) . "\n";
+ print "temp_dew: $self->{temp_dew}\n";
+- print "alt: $self->{ALT}\n";
++ print "alt: $self->{alt}\n";
++ print "pressure: $self->{pressure}\n";
+ print "slp: $self->{slp}\n";
+ print "remarks: " . join (', ', @{$self->{remarks}}) . "\n";
+ print "\n";
+@@ -1668,6 +1666,10 @@ Hourly dewpoint, celcius
+
+ Altimeter setting (barometric pressure).
+
++=item ALT_HP
++
++Altimeter setting in hectopascals.
++
+ =item REMARKS
+
+ Any remarks in the report.
Modified: trunk/libgeo-metar-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgeo-metar-perl/debian/patches/series?rev=20966&op=diff
==============================================================================
--- trunk/libgeo-metar-perl/debian/patches/series (original)
+++ trunk/libgeo-metar-perl/debian/patches/series Fri Jun 13 05:38:53 2008
@@ -1,1 +1,4 @@
-#01-various-#262397.patch
+wind.patch
+pressure.patch
+visibility.patch
+various.patch
Added: trunk/libgeo-metar-perl/debian/patches/various.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgeo-metar-perl/debian/patches/various.patch?rev=20966&op=file
==============================================================================
--- trunk/libgeo-metar-perl/debian/patches/various.patch (added)
+++ trunk/libgeo-metar-perl/debian/patches/various.patch Fri Jun 13 05:38:53 2008
@@ -1,0 +1,28 @@
+Index: libgeo-metar-perl/METAR.pm
+===================================================================
+--- libgeo-metar-perl.orig/METAR.pm
++++ libgeo-metar-perl/METAR.pm
+@@ -364,8 +364,7 @@ sub new
+ # default=METAR
+ $self->{site} = undef; # the site code (4 chars)
+ $self->{date_time} = undef; # date/time
+- $self->{modifier} = "AUTO"; # the AUTO/COR modifier (if
+- # any) default=AUTO
++ $self->{modifier} = undef; # the AUTO/COR modifier
+ $self->{wind} = undef; # the wind information
+ $self->{windtype} = undef; # the wind speed type (knots/meterpersecond/kilometersperhour)
+ $self->{windvar} = undef; # the wind variation
+@@ -1431,8 +1430,11 @@ applications.
+ Here is how you I<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
++(using the LWP modules) at:
++
++I<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.
Added: trunk/libgeo-metar-perl/debian/patches/visibility.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgeo-metar-perl/debian/patches/visibility.patch?rev=20966&op=file
==============================================================================
--- trunk/libgeo-metar-perl/debian/patches/visibility.patch (added)
+++ trunk/libgeo-metar-perl/debian/patches/visibility.patch Fri Jun 13 05:38:53 2008
@@ -1,0 +1,22 @@
+Index: libgeo-metar-perl/METAR.pm
+===================================================================
+--- libgeo-metar-perl.orig/METAR.pm
++++ libgeo-metar-perl/METAR.pm
+@@ -1282,7 +1282,7 @@ sub _process
+ ## Visibility.
+ ##
+
+- {
++ if($self->{visibility}) {
+ my $vis = $self->{visibility};
+ # test for statute miles
+ if ($vis =~ /SM$/){
+@@ -1290,7 +1290,7 @@ sub _process
+ if ($vis =~ /M(\d\/\d)/o) {
+ $self->{VISIBILITY} = "Less than $1 statute miles";
+ } else {
+- $self->{VISIBILITY} = $vis . " Statute Miles";
++ $self->{VISIBILITY} = $vis . " statute miles";
+ } # end if
+ # auto metars can have non-directional visibility reports
+ } elsif (($self->{MOD} eq 'AUTO') and ($vis =~ /(\d+)NDV$/)){
Added: trunk/libgeo-metar-perl/debian/patches/wind.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgeo-metar-perl/debian/patches/wind.patch?rev=20966&op=file
==============================================================================
--- trunk/libgeo-metar-perl/debian/patches/wind.patch (added)
+++ trunk/libgeo-metar-perl/debian/patches/wind.patch Fri Jun 13 05:38:53 2008
@@ -1,0 +1,210 @@
+Index: libgeo-metar-perl/METAR.pm
+===================================================================
+--- libgeo-metar-perl.orig/METAR.pm
++++ libgeo-metar-perl/METAR.pm
+@@ -333,9 +333,13 @@ sub new
+ $self->{WIND_GUST_KTS} = undef; # wind gusts (knots)
+ $self->{WIND_MPH} = undef; # wind speed (MPH)
+ $self->{WIND_GUST_MPH} = undef; # wind gusts (MPH)
++ $self->{WIND_MS} = undef; # wind speed (m/s)
++ $self->{WIND_GUST_MS} = undef; # wind gusts (m/s)
+ $self->{WIND_VAR} = undef; # wind variation (text)
+ $self->{WIND_VAR_1} = undef; # wind variation (direction 1)
+ $self->{WIND_VAR_2} = undef; # wind variation (direction 2)
++ $self->{WIND_VAR_ENG_1}= undef; # wind variation (text, direction 1)
++ $self->{WIND_VAR_ENG_2}= undef; # wind variation (text, direction 2)
+ $self->{VISIBILITY} = undef; # visibility info
+ $self->{RUNWAY} = [ ]; # runway vis.
+ $self->{WEATHER} = [ ]; # current weather
+@@ -1112,14 +1116,20 @@ sub _process
+ {
+ my $wind = $self->{wind};
+ my $dir_deg = substr($wind,0,3);
++ my $wind_speed;
+ my $dir_eng = "";
+ my $dir_abb = "";
+
++ $wind_speed = $1 if($wind =~ /...(\d{2,3})/o);
+ # Check for wind direction
+ if ($dir_deg =~ /VRB/i) {
+- $dir_deg = "Variable";
++ $dir_deg = $dir_eng = "Variable";
+ } else {
+- if ($dir_deg < 15) {
++ if ($wind_speed == 0 and $dir_deg == 0) {
++ # Calm wind (00000KT in METAR)
++ $dir_eng = "Calm";
++ print "wind is calm\n" if $self->{debug};
++ } elsif ($dir_deg < 15) {
+ $dir_eng = "North";
+ $dir_abb = "N";
+ } elsif ($dir_deg < 30) {
+@@ -1167,38 +1177,45 @@ sub _process
+ } elsif ($dir_deg < 345) {
+ $dir_eng = "North/Northwest";
+ $dir_abb = "NNW";
+- } else {
++ } elsif ($dir_deg < 360) {
+ $dir_eng = "North";
+ $dir_abb = "N";
++ } else {
++ # Shouldn't happen, but if for some reason the METAR
++ # information doesn't contain a reasonable direction...
++ $dir_eng = "undeterminable";
+ }
+ }
+
+ my $kts_speed = undef;
+ my $mph_speed = undef;
++ my $mps_speed = undef;
+
+ my $kts_gust = "";
+ my $mph_gust = "";
++ my $mps_gust = "";
+
+ # parse knots
+
+ if ($self->{windtype} == $wt_knots){
+ $wind =~ /...(\d\d\d?)/o;
+ $kts_speed = $1;
+- $mph_speed = $kts_speed * 1.1508;
+-
++ $mph_speed = $kts_speed * 1.15077945;
++ $mps_speed = $kts_speed * 0.514444444;
+
+ if ($wind =~ /.{5,6}G(\d\d\d?)/o) {
+ $kts_gust = $1;
+- $mph_gust = $kts_gust * 1.1508;
++ $mph_gust = $kts_gust * 1.15077945;
++ $mps_gust = $kts_gust * 0.514444444;
+ }
+ # else: parse meters/second
+ } elsif ($self->{windtype} == $wt_mps){
+ $wind=~ /...(\d\d\d?)/o;
+- my $mps_speed = $1;
++ $mps_speed = $1;
+ $kts_speed = $mps_speed * 1.9438445; # units
+ $mph_speed = $mps_speed * 2.2369363;
+ if ($wind =~ /\d{5,6}G(\d\d\d?)/o) {
+- my $mps_gust = $1;
++ $mps_gust = $1;
+ $kts_gust = $mps_gust * 1.9438445;
+ $mph_gust = $mps_gust * 2.2369363;
+ }
+@@ -1208,9 +1225,11 @@ sub _process
+
+ $self->{WIND_KTS} = $kts_speed;
+ $self->{WIND_MPH} = $mph_speed;
++ $self->{WIND_MS} = $mps_speed;
+
+ $self->{WIND_GUST_KTS} = $kts_gust;
+ $self->{WIND_GUST_MPH} = $mph_gust;
++ $self->{WIND_GUST_MS} = $mps_gust;
+
+ $self->{WIND_DIR_DEG} = $dir_deg;
+ $self->{WIND_DIR_ENG} = $dir_eng;
+@@ -1226,8 +1245,39 @@ sub _process
+ {
+ if ($self->{windvar} =~ /^(\d\d\d)V(\d\d\d)$/){
+ $self->{WIND_VAR} = "Varying between $1 and $2";
+- $self->{WIND_VAR_1} = $1;
+- $self->{WIND_VAR_2} = $2;
++ $self->{WIND_VAR_1} = $1;
++ $self->{WIND_VAR_2} = $2;
++ my @direction = (
++ 15 => "North",
++ 30 => "North/Northeast",
++ 60 => "Northeast",
++ 75 => "East/Northeast",
++ 105 => "East",
++ 120 => "East/Southeast",
++ 150 => "Southeast",
++ 165 => "South/Southeast",
++ 195 => "South",
++ 210 => "South/Southwest",
++ 240 => "Southwest",
++ 265 => "West/Southwest",
++ 285 => "West",
++ 300 => "West/Northwest",
++ 330 => "Northwest",
++ 345 => "North/Northwest",
++ 360 => "North",
++ 1000 => "undeterminable");
++ for(my $x = 0; $x < $#direction; $x += 2) {
++ if($self->{WIND_VAR_1} < $direction[$x]) {
++ $self->{WIND_VAR_ENG_1} = $direction[$x+1];
++ last;
++ }
++ }
++ for(my $x = 0; $x < $#direction; $x += 2) {
++ if($self->{WIND_VAR_2} < $direction[$x]) {
++ $self->{WIND_VAR_ENG_2} = $direction[$x+1];
++ last;
++ }
++ }
+ }
+ }
+
+@@ -1322,6 +1372,7 @@ sub dump
+ print "date_time: $self->{date_time}\n";
+ print "modifier: $self->{modifier}\n";
+ print "wind: $self->{wind}\n";
++ print "variable wind: $self->{vrbwind}\n";
+ print "visibility: $self->{visibility}\n";
+ print "runway: $self->{runway}\n";
+ print "weather: " . join(', ', @{$self->{weather}}) . "\n";
+@@ -1503,11 +1554,11 @@ Modifier (AUTO/COR) if any.
+
+ =item WIND_DIR_ENG
+
+-The current wind direction in english (Southwest, East, North, etc.)
++The current wind direction in English (Southwest, East, North, etc.)
+
+ =item WIND_DIR_ABB
+
+-The current wind direction in abbreviated english (S, E, N, etc.)
++The current wind direction in abbreviated English (S, E, N, etc.)
+
+ =item WIND_DIR_DEG
+
+@@ -1521,6 +1572,10 @@ The current wind speed in Knots.
+
+ The current wind speed in Miles Per Hour.
+
++=item WIND_MS
++
++The current wind speed in Metres Per Second.
++
+ =item WIND_GUST_KTS
+
+ The current wind gusting speed in Knots.
+@@ -1529,6 +1584,10 @@ The current wind gusting speed in Knots.
+
+ The current wind gusting speed in Miles Per Hour.
+
++=item WIND_GUST_MS
++
++The current wind gusting speed in Metres Per Second.
++
+ =item WIND_VAR
+
+ The wind variation in English
+@@ -1537,10 +1596,18 @@ The wind variation in English
+
+ The first wind variation direction
+
++=item WIND_VAR_ENG_1
++
++The first wind variation direction in English
++
+ =item WIND_VAR_2
+
+ The second wind variation direction
+
++=item WIND_VAR_ENG_2
++
++The second wind variation direction in English
++
+ =item VISIBILITY
+
+ Visibility information.
More information about the Pkg-perl-cvs-commits
mailing list