Search code examples
c#mathcoordinatesconverterscoordinate

DDM to DD Geographic Coordinate Conversion Algorithm


I have used http://www.pgc.umn.edu/tools/conversion to convert

52 37.9418 N 01.18.8020 E (DDM I Think?)

To

Latitude 52.632363 Longitude 1.313367

This seems to be very accurate, i have played about with the calculations to convert these values myself but they never seem to be accurate.

http://en.wikipedia.org/wiki/Geographic_coordinate_conversion

What is the math behind this convertion?


Solution

  • //Parsing the DDM format is left as an excersize to the reader,
    //  as is converting this code snippet into a usable function.
    double inputDegrees = 52;
    double inputMinutes = 37.9418;
    double latitude = inputDegrees + (inputMinutes/60);  // 52.632363