Skip to content

Instantly share code, notes, and snippets.

@hrpunio
Created January 11, 2012 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hrpunio/1596249 to your computer and use it in GitHub Desktop.
Save hrpunio/1596249 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
# http://search.cpan.org/~waltman/Geo-Coordinates-DecimalDegrees-0.05/DecimalDegrees.pm
use Geo::Coordinates::DecimalDegrees;
#
my @dms = @ARGV ;
print STDERR "*** dms2decimal hr min sec ... hr/min/sec niekoniecznie sa liczbami calkowitymi....\n";
while (@dms) {
$deg = shift @dms ; $min = shift @dms ; $sec = shift @dms ;
printf "%f %f %f = %.6f\n", $deg, $min, $sec, dms2decimal($deg, $min, $sec);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment