DOKK / manpages / debian 12 / libham-locator-perl / Ham::Locator.3pm.en
Ham::Locator(3pm) User Contributed Perl Documentation Ham::Locator(3pm)

Ham::Locator - Convert between Maidenhead locators and latitude/longitude.

  use Ham::Locator;
  my $m = new Ham::Locator;
  $m->set_loc('IO93lo');
  my ($latitude, $longitude) = $m->loc2latlng;

  • Carp - for error handling
  • Class::Accessor - for accessor method generation

Creates a new "Ham::Locator" object.

Sets the locator to use for conversion to latitude and longitude.

$locator->set_latlng((latitude, longitude))

Sets the longitude and latitude to use for conversion to the locator.

Sets the number of characters of the locator reference to return when calling latlng2loc.

converts the latitude and longitude set by set_latlng to the locator, and returns it as a string.

Converts the locator set by set_loc to latitude and longitude, and returns them as an array of two values.

None, hopefully!

This module was written by Andy Smith <andy.smith@netprojects.org.uk>.

$Id: Locator.pm 10 2011-01-16 15:36:53Z andys $

(c)2009 Andy Smith (<http://andys.org.uk/>)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2022-01-03 perl v5.32.1