convert gps coordinates
decimal degree to degree:minute:second#!/usr/bin/perl #$input="11.06056" #output: 11 3 38 --> 11° 3' 38" $input=@ARGV[0]; ($grd,$rest) = split /\./, $input; $rest="0.".$rest; $mindump=$rest*60; ($min,$rest) = split /\./, $mindump; $rest="0.".$rest; $secdump=$rest*60; ($sec,$rest) = split /\./, $secdump; print "$grd $min $sec\n";degree:minute:second to decimal degree
#!/usr/bin/perl #$input="11=03=38"; # output 11.0605555555556 $input=@ARGV[0]; ($grd,$min,$sec) = split /=/, $input; $dez_min=$min/60+$sec/60/60; $dez_grd=$grd+$dez_min; print "$dez_grd\n";sample:
./dez_grd 11.06056
11 3 38
./grd_dez "11=03=38"
11.0605555555556



