2

I am receiving tracking data from a device and I am not sure what is the format/standard of this string in order to properly process the variables, this is a sample string received:

#355488020131816##1#0000#AUT#01#2260012b9cbb47#2112.703000,E,4545.754120,N,0.07,0.00#031213#184625.000##

I am not sure about the variables 2,3,4,5, (##1#0000#AUT#01#) the others seem obvious, position, speed, bearing, date,time.

The device appears to be GT02A

  • Is this the product you are referring to (gpsmart.com.au/products/gt02a) ? Have you tried contacting the vendor for the details of their data stream? – RyanDalton Dec 16 '13 at 16:22
  • It is from eBay and it comes from China in many versions without knowing who made it. I seen multiple formats of this string from same device GT02A. – adrianTNT Dec 16 '13 at 23:04
2

I suspect that this might be the sirfstar binary protocol, converted to some kind of non standard ascii format.

The details of the sirf star binary protocol can be found here

Sirf Star II/III binary protocol manual

There are really only two major formats that are widely used and those are Sirfstar & Nmea, with Nmea being the more prevalent.

Certainly looking at the product page linked to on GpsMart, and what I know about most of those devices that come from china, 90% of them do have Sirf Star chip sets in them of some description so there's a high chance that I'm aiming in the right direction, even if I'm not hitting the correct target.

as for the sample you provided, well, lets try break this down a bit.

Firstly I'm suspecting, that what you have there are multiple sentences, rather than one sentence, if we break it into lines on the # symbols we get:

--------------- Start -----------------

355488020131816

1
0000
AUT
01
2260012b9cbb47
2112.703000,E,4545.754120,N,0.07,0.00
031213
184625.000

---------------------------- end ---------------

The start and end markers are deliberate as there are blank lines at the beginning and the end of the data stream.

As you've already pretty much worked out, line 9 does indeed look like positional information, mores the point it looks exactly like the relevant parts of an NMEA $GPGGA sentence, where the location is encoded as Degrees & Minutes of longitude and latitude.

that basically gives us 2112.703000 degrees east and 4545.754120 degrees north, or

4545.754120 N represents 45 degrees 45 minutes and 75.4120 seconds north 2112.703000 E represents 21 degrees 12 minutes and 70.30 seconds east

Now if we read this for what it is, we know 3 things that really Don't make sense

1) It's impossible to have 75.4120 seconds as there can be no more than 59.99 seconds in a minute

2) the order is back to front, it's usually N/S then E/W NOT E/W first

3) In a normal nmea sentence, the 2112.703000 would a) be preceded by a zero and have 2 less numbers on the end, EG: 02112.7030

At this point then, reading what I'm reading suggests to me that the measurements are in decimal meters, possibly some kind of UTM projection, or a country specific projection.

If you have an idea where that point was recorded, then you can get a lat/lng for it, and using various converters and other mapping software, try and work out where that location refers too.

Once you know that, you can then try to find a projection that projects your on the ground co-ordinates to be the same location as those you've extracted from the sentence (or at least close too)

Once you have an idea of the projection, you can then narrow your search down to devices, that are "hard coded" to produce data in only that projection.

Moving onto the other lines in the data stream:

the second one looks like it might be some kind of date/time information

355488020131816

putting some spaces in at obvious points gives us

3554880 2013 18 16

I'm not sure about the first 7 characters, but there's a good chance that you have the year 2013 in there and either "18:16" or "16:18" as a 24 hour time.

Again, if you know what time of day these where generated, then you can back engineer that to prove the hypotheses, and it might even help you be more sure of the actual location too, because then you can tie it to a time zone.

the 1 & 0000 lines could mean anything, but drawing on previous experience of decoding unknown data formats, I'd take a stab at them being some kind of packet count.

As for the AUT part, again previous experience tells me this is likely to be some kind of fix or state information, maybe it's telling us that it's an *AUT*omobile device, in which case you've narrowed your search down even further now, or it might mean we have an *AUT*omatic fix available, what ever it is, I don't believe it's related to counts or positions.

skipping over the 01 brings us to the following

2260012b9cbb47

This to me looks like some kind of hash, possibly an MD5 or an SHA1, there are plenty of online hash converters around, I would be tempted to take the next line as one chunk and feed it into a few of these converters, see if you get anything that resembles that number.

If you do, then it's almost guaranteed that, that line is being used as some kind of a check sum value to enforce data integrity in some way.

Skipping over the line with the positional info in we get

031213

This looks to me like a date 3rd of December 2013 or 12th March 2013 depending on how dates in the spec are formatted.

As for the last line, well again that's likley to be meters if it's some kind of measurement, and chances are it will in some way relate to what we've already discussed. It might be mean height above sea level, or the elipsoid hieght of what ever the used projection is, once you figure out what the projection is, you'll likley be able to match it up to something.

While I don't know exactly what the data format is, I hope what I've written gives you some ideas and avenues to explore, or some pointers to aid you further in your quest.

If you do figure out what it is please let us know, I'm certainly curious as I might suppose many others are too.

Shawty

  • I believe it is more likely that the positional values are degrees decimal minutes, not projected coordinates. – mkennedy Dec 17 '13 at 20:41
  • quite possible, I'm just making an educated guess based on what I see :-) If you re-read the part where I mention the co-ordinates I tried to break them down into decimal minutes, but the values just don't fit correctly. – shawty Dec 18 '13 at 20:07
  • Well, yes, split off the degree part, and the remainder fits very well into decimal minutes: 12.703000 and 45.754120. In other words, 12 minutes 42.18 seconds and 45 minutes 45.2472 seconds. NMEA also uses DDMM.mmmmmm, not DDMM.SSssss. – mkennedy Dec 18 '13 at 20:13
0

After testing the device, here are the values I found from the above string, this is a paste from my PHP code, but it should be readable...

355488020131816##1#0000#AUT#01#2260012b9cbb47#2112.703000,E,4545.754120,N,0.07,0.00#031213#184625.000

// convert the sentance to variables
preg_match('/#(.*)##(.*)#(.*)#(.*)#(.*)#(.*)#(.*),(.*),(.*),(.*),(.*),(.*)#(.*)#(.*)##/', $data, $matches);

$imei = $matches[1];
//
$junk_1 = $matches[2];
$junk_2 = $matches[3];
// !! this might be the fixed satellite thing
$junk_aut = $matches[4];
$junk_3 = $matches[5];
$checksum = $matches[6];
//
$long_decimal = $matches[7];
$long_hem = $matches[8];
$lat_decimal = $matches[9];
$lat_hem = $matches[10];
// seems to be miles per hour, I multiply it with 1.60934 to display kmh, seems accurate
$speed = $matches[11];
$bearing = $matches[12];
// date looks like 111213 (meaning 11 Dec 2013)
$device_date = $matches[13];
// hour looks like 004525.000 (meaning 00:45:25)
$device_time = $matches[14]; 
-2

355488020131816 i think is the IMEI number

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

  • Welcome to GIS@SE .. One line answers are not very meaningful. To make your answer useful, you should explain how you arrived at your answer with links to relevant material to back up your explanation. – Mark Cupitt Sep 28 '14 at 5:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.