Reputation: 9044
I have a GPS device that sends its position via sms in a format like this:
2937.0864,5233.3686,55000
The first digit is latitude, the second digit is longitude and the third digit is alt. When I ask google maps to display the position, it shows an error:
"We could not understand the location 2937.0864,5233.3686"
How can I convert these numbers to valid GPS position? I am writing an app with OsmDroid and I want to use the correct GPS position to display map.
Any idea?
Upvotes: 0
Views: 260
Reputation: 2783
A possibility is that the numbers are from NMEA sentences. See the following answer for the format details.
NMEA message to Android Location
If so, in your example, the two numbers 2937.0864,5233.3686 mean 29 deg 37.0864 min, and 52 deg 33.3686 min respectively.
To convert to decimal numbers they become 29 + 37.0864/60 = 29.6181066667, and 52 + 33.3686/60 = 52.5561433333
Upvotes: 1
Reputation: 21509
2937.0864,5233.3686 are certainly not latitude and longitude, but 29.370864,52.333686 or 29° 37' 08.64", 52° 33' 36.86" might be the correct position. However, your format still seems weird.
Upvotes: 1