I have MNEA latitude and longitude, for example 4003.8914N, 10512.5933W, and I want to convert them to something that google maps can understand. www.gpsvisualizer.com translate 4003.8914N, 10512.5933W to 40.0649,-105.2099. What is the algorithm for conversion? Or what google maps require for input?
1- Take the first 2 or 3 characters of the input depending on how many numbers are before the decimal point. Essentially you can find the decimal and move 2 characters to the left. This number is your degree N/S/E/W.
2- The remaining portion is the fractional angle in Minutes. If you want to go straight to a google map just put an apostrophe before the N/S/E/W and you’ll have it. To Convert an angle in Degrees and minutes to decimal follow the next two steps, otherwise you can ignore them.
3- Take the number in step 2 and divide it by 60.
4- Add the number from step 1
5- For the +/-: North and East are +, West and South are -.
To make this clearer I’ll give you an example from the NMEA sentence you gave:
4003.8914N, 10512.5933W
Step 1- Count back 2 places from the decimal and remove all the numbers before. That is the degrees.
4003.8914 N
Step 2- Take the remainder and simplify if desired. This is the Minutes portion. You can place an apostrophe after it to directly search it on google.
3.8914’
Step 3- To convert the angle to decimal divide step 2 by 60.
3.8914 / 60 = .064856
Step 4- Add Step 1 + Step 2
40.064856 N
Step 5- Set the sign of the result-- The direction is north, so we take the result as is. (S/W multiply the result by -1)
40.064856
Rinse, Lather, Repeat for the other coordinate.
Google maps will accept any format you want to throw at it. A search for “40 03.8914N, 105 12.5933W” turns up an accurate result.
Or you could simply add a space after the whole number portion of the degrees.
For example:
4003.8914N, 10512.5933W
Becomes:
40 03.8914N, 105 12.5933W
Google Maps will understand this as well.
this help a lot… woot woot thanks