Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm getting this unreadable string from a GPS tracking device and I need to decode these information so I can use it in my application (c#).

$A  grQ05Ah@‘)????????????°#~à??U

But in fact what i expect is something like below :

*HQ,XXXXXX,41,4#V1,time,A,**Lat**,N/S,**Lng**,W/E,000.00,000,date,FFFFFBFF,432,35,32448,334

How can i convert the string to standard format in c# ?

I convert data to byte as you can see :

24-41-20-20-67-72-51-30-35-41-68-40-91-29-3F-3F-3F-FF-FF-FB-FF-FF-3F-3F-3F-3F-B0-23-7E-C0-82-A1-55
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
337 views
Welcome To Ask or Share your Answers For Others

1 Answer

Its really some binary information and If you have clearly read out the product manual then it says formation of this binaries.

Converting the data to hex will give something like this..

24-41-20-20-67-72-51-30-35-41-68-40-91-29-3F-3F-3F-FF-FF-FB-FF-FF-3F-3F-

And then you need to refer the manual for exact meaning of these hex numbers

ex--(in some chinese devices)

2 bytes(24),  stand for standard mode
10 bytes,  is device'ID (41 20 20 67 72)
6 bytes, is time 
6 bytes, is data
8 bytes, is latitude
2 bytes, battery like this 06= 100% 05=80% 04=60% 03=40% 02=20% 01=10%
10 bytes is  longitude

** You are receiving these binaries because you've asked it to send the info in binary mode.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...