Skip Menu |

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

Report information
The Basics
Id: 82893
Status: resolved
Priority: 0/
Queue: Geo-Coordinates-UTM

People
Owner: grahamc [...] cpan.org
Requestors: dave.steele [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.09
Fixed in: 0.10



Subject: mgrs_to_utm function southern hemisphere
Date: Wed, 23 Jan 2013 15:42:53 +1000
To: bug-Geo-Coordinates-UTM [...] rt.cpan.org
From: David Steele <dave.steele [...] gmail.com>
It seems there is an issue with the mgrs_to_utm function when converting locations in the southern hemisphere. For example passing latitude -19.4574 longtitude 146.4264 to the latlon_to_mgrs function correctly returns the MGRS of 55KDU3979548461. However feeding this MGRS back into the mgrs_to_latlon function returns -1.3709 146.4588. I've found that commenting out line 384 of the module which is advancing $tmpNorth by one in the mgrs_to_utm function corrects this. As I don't fully understand the math of this conversion I'm not sure if this solution will work for all zone letters, but hopefully can point in the right direction for a fix.
S. Hemisphere calculations amended in version 0.10 Also added in some MGRS calculation tests