0

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?

Ali Behzadian Nejad
  • 8,804
  • 8
  • 56
  • 106

2 Answers2

1

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.

scai
  • 20,297
  • 4
  • 56
  • 72
1

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

Community
  • 1
  • 1
headuck
  • 2,763
  • 16
  • 19