C++ functions to convert between decimal degrees and degrees, minutes, and seconds

Filed under: Software Development — master @ August 24, 2005 - 3:03 pm

I’ve run into situations where it was necessary to convert decimal degrees to degrees, minutes, and seconds.

Here’s a couple of C++ functions which handle the conversion between these two formats:


std::string DegreesMinutesSeconds(double ang) ;

double DecimalDegrees(const std::string& dms) ;

These are inline functions defined in the header file, dms.h:

(more…)



Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>