Skip Menu |

This queue is for tickets about the Geo-Postcode CPAN distribution.

Report information
The Basics
Id: 24382
Status: resolved
Priority: 0/
Queue: Geo-Postcode

People
Owner: Nobody in particular
Requestors: fade [...] fadetoblack.me.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: friendly_bearing_to()
Date: Mon, 15 Jan 2007 14:39:37 -0000
To: <bug-geo-postcode [...] rt.cpan.org>
From: "Carl Johnstone" <fade [...] fadetoblack.me.uk>
Hi, friendly_bearing_to returns a slightly wrong bearing, for example 359 degrees returns NNW when it's practically N. I would suggest changing: my @nicely = qw(N NNW NW WNW W WSW SW SSW S SSE SE ESE E ENE NE NNE); my $i = int( $bearing/22.5 ); to: my @nicely = qw(N NNW NW WNW W WSW SW SSW S SSE SE ESE E ENE NE NNE N); my $i = int( ($bearing + 11.25)/22.5 ); Carl
From: WROSS [...] cpan.org
Thank you. Stupid of me. The main push at the moment is to make GP work with freethepostcode rather than with the sample data currently provided, which is not (as I was previously assured) copyright-safe. I'll include this fix in the next release, along with the other current bug (an even stupider zero- not-true error). Some time this month is likely. best, will
From: WROSS [...] cpan.org
Thank you. Stupid of me. The main push at the moment is to make GP work with freethepostcode rather than with the sample data currently provided, which is not (as I was previously assured) copyright-safe. I'll include this fix in the next release, along with the other current bug (an even stupider zero- not-true error). Some time this month is likely. best, will
From: llap [...] cuckoo.org
On Mon Jan 15 09:37:26 2007, fade@fadetoblack.me.uk wrote: Show quoted text
> Hi, > > friendly_bearing_to returns a slightly wrong bearing, for example 359 > degrees returns NNW when it's practically N. > > I would suggest changing: > > my @nicely = qw(N NNW NW WNW W WSW SW SSW S SSE SE ESE E ENE NE NNE); > my $i = int( $bearing/22.5 ); > > to: > > my @nicely = qw(N NNW NW WNW W WSW SW SSW S SSE SE ESE E ENE NE NNE N); > my $i = int( ($bearing + 11.25)/22.5 );
Applied and on it's was to CPAN as version 0.17 Sneak peak from: https://github.com/ranguard/Geo- Postcode/commit/5b077c76288ae33d855082d3a8bee299fb29129b