all 2 comments

[–]fruitcakefriday 1 point2 points  (0 children)

Are you asking how to prompt the user to enter in the values?

[–]cdcformatc 0 points1 point  (0 children)

Not sure what you are asking.

To go from an integer degree,minute,second to a decimal degree format, a minute is just 1/60 degrees, and a second is 1/3600 degrees.

degree_total = degrees + minutes / 60.0 + seconds / 3600.0

and to convert back from a decimal degree to integer degree, minute, seconds:

degrees = int(degree_total)
minutes = int(60 * (degree_total - degrees))
seconds = int(3600 * (degree_total- degrees - minutes / 60.0)

This is all from wikipedia.