I need to transform a GPS point from DDD MM.MMM (string) to decimal (two values: latitude & longitude) with Java.
For example, I have this String:
String a = "N 39° 28.941 W 0° 23.275"
I need to transform that string into these two values:
double lat= 39.48235
double lon= -0.38792
How can I do it with Java code?
Parse the string for those six values:
… the same for longitude
Quick hack to do so: