Skip Menu |

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

Report information
The Basics
Id: 36264
Status: resolved
Priority: 0/
Queue: Geo-Ellipsoid

People
Owner: JGIBSON [...] cpan.org
Requestors: derren.phillips [...] satamatics.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.10
Fixed in: 1.0



Subject: at() method now returns longitude values > 180
Date: Thu, 29 May 2008 11:29:04 +0100
To: <bug-geo-ellipsoid [...] rt.cpan.org>
From: "Derren Phillips" <derren.phillips [...] satamatics.com>
I've recently updated my copy of Geo::Ellipsoid.pm to version 1.0, and the behaviour of the at() method seems to have changed; it now returns longitude values greater than 180 degrees, rather than negative values. For example: #!/usr/bin/perl -w use strict; use Geo::Ellipsoid; my $geo = Geo::Ellipsoid->new(ellipsoid => 'WGS84', units => 'degrees'); my ($lat, $lon) = $geo->at(52, -2, 100, 45); print "$lat, $lon\n"; The above code prints "52.0006354979386, -1.9989703884374" with version 0.904, but "52.0006354979386, 358.001029611563" with the latest release. Regards, Derren Phillips -- Satamatics Limited Miller Court; Severn Drive Tewkesbury Gloucestershire GL20 8DN, UK Tel: +44 (0)1684 278610 Fax: +44 (0)1684 278611 Web: www.satamatics.com
Subject: Re: [rt.cpan.org #36264] at() method now returns longitude values > 180
Date: Sun, 1 Jun 2008 16:14:49 -0700
To: bug-Geo-Ellipsoid [...] rt.cpan.org
From: Jim Gibson <Jim [...] Gibson.org>
Show quoted text
>Thu May 29 06:29:40 2008: Request 36264 was acted upon. >Transaction: Ticket created by derren.phillips@satamatics.com > Queue: Geo-Ellipsoid > Subject: at() method now returns longitude values > 180 > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: derren.phillips@satamatics.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=36264 > > > >I've recently updated my copy of Geo::Ellipsoid.pm to version 1.0, and >the behaviour of the at() method seems to have changed; it now returns >longitude values greater than 180 degrees, rather than negative values.
Thanks for the feedback. I did change the output values in the latest release. I hope that is not a problem. All output values should be in the range (0,360) or (0,2pi) for radians. I did this because I got a report that some of the installation tests were failing under Perl 5.10. Some values were being calculated as around 360 instead of around zero as under 5.8. I decided to "normalize" the output values by ensuring they were in the range (0,360). Apparently, that did not fix all of the test failures. I believe that the actual values are accurate, and it is just the tests that are failing. The next release will not have any test values of zero. I am not able to reproduce the test failures on the two systems on which I 5.10 installed. I hope you can adjust to the new output range. I think that always having values in the expected range will make using the module easier for most people, but I realized changing the values output may be an inconvenience for some. Hope it is not too much. Thanks again for your feedback. -- Jim Gibson Jim@Gibson.org