Problems? Is your data what you think it is? | |
PerlMonks |
Re: Put yourself on the Mapby hacker (Priest) |
on Aug 20, 2002 at 12:48 UTC ( [id://191449]=note: print w/replies, xml ) | Need Help?? |
To convert a decimal number (dn) to degrees (d), minutes (m) and seconds (s):
Note that int(n) denotes taking the integer part of a number (i.e. int(49.5125) = 49) and frac its fractional part (i.e. frac(49.5125) = 0.5125). mi is an intermediate result. Example: To convert 49.5125 decimal degrees to degrees, minutes and seconds:
Many calculators have a built-in function to compute this - it is often called "dms" or "hms". Switch to scientific mode on your calculator. To convert from decimal to degrees, minutes and seconds, enter the number, then hit the dms button. To convert from degrees, minutes and seconds to decimal degrees, enter the degrees, a decimal point, then the minutes (2 digits) and seconds, then hit the [x]Inv (Inverse) button to get the inverse function and hit the dms button again.
In Section
Perl Monks Discussion
|
|