Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Put yourself on the Map

by hacker (Priest)
on Aug 20, 2002 at 12:48 UTC ( [id://191449]=note: print w/replies, xml ) Need Help??


in reply to Re: Put yourself on the Map -- correction
in thread Put yourself on the Map -- correction

To convert a decimal number (dn) to degrees (d), minutes (m) and seconds (s):
d = int(dn) mi = frac(dn)*60 m = int(mi) s = frac(mi)*60

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:

d = int(49.5125) = 49 mi = frac(49.5125)*60 = 0.5125*60 = 30.75 m = int(mi) = int(30.75) = 30 s = frac(mi)*60 = 0.75*60 = 45

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://191449]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 08:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found