public static double convertDdmCoordinatesToDecimal ( String ddmCoordinate ) { checkArgument ( isNotBlank ( ddmCoordinate ) , "Coordinate to convert can't be null nor blank." ) ; int dotIndex = ddmCoordinate . indexOf ( ' ' ) ; double degrees = parseDouble ( ddmCoordinate . substring ( 0 , dotIndex - 2 ) ) ; double minutes = parseDouble ( ddmCoordinate . substring ( dotIndex - 2 ) ) ; double decimalCoordinates = degrees + minutes / 60 ; LOG . debug ( "Converted NMEA DDM degree coordinate {} (degrees/minutes: {}/{}) to decimal coordinate {}." , ddmCoordinate , degrees , minutes , decimalCoordinates ) ; return decimalCoordinates ; }
Converts Degrees Decimal Minutes GPS coordinate string into the decimal value .