Order Tray | Contact Us | Home | SIG Lists

[aprssig] Need PERL Decimal degrees to Deg Minutes

Joel Maslak jmaslak-aprs at antelope.net
Sat Jun 3 04:36:17 UTC 2006


On Jun 2, 2006, at 10:15 PM, Andrew Rich wrote:

> I have an app that puts out decicmal degrees,
>
> Need to convert to APRS object deg minutes.
>
> Any PERL code floating around ?

Probably, but this is a pretty easy to write - easier than looking it  
up.

Something like:
=====
my $pos = -105.70232;

my $deg = int($pos);
my $min = abs($pos - $deg) * 60;

  print "$deg' $min\"\n";
=====

Note that you'll have to check the sign on $deg to determine if it's  
E/W/N/S if you are sending it out as an APRS formatted (uncompressed)  
lat/lon.

-- 
Joel Maslak
N7XUC




More information about the aprssig mailing list