LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parsing of a serial GPS

I have been working with labview for only a couple weeks now.  My current assignment is to parse a GPS signal.  I have taken the time to understand how  the packets for the GPS works.  I understand you compare the header to known possible values to understand what the payload entails.  

 

The labview program I am trying to write will take in a string then try to find a set of numbers (the header) in the string.  From there I can find the payload in the packet and interpret the findings.  My question is how do I find a 'set' of numbers in a long string.  

 

I was going to use a case structures depending on what set of numbers I find.  I thought I knew what I was going to do when I started up     

0 Kudos
Message 1 of 12
(4,280 Views)

It doesn't look like you got far enough in your message to actually state what your problem is...

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 12
(4,272 Views)

I guess your GPS is using the NEMA 0183 protocol. And that you are able to read a complete message from the GPS. Anyway can you post how the message string from the GPS look like. And your current code also. Can not help much without some info you know



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 3 of 12
(4,261 Views)

@COq Rouge wrote:

I guess your GPS is using the NEMA 0183 protocol.


 

Upsk that was a typo. I meant MNEA 0183

http://en.wikipedia.org/wiki/NMEA_0183

 



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 4 of 12
(4,252 Views)

Sorry about the confusion guys.  I should have caught those mistakes before submitting.  The receiver supports 2 protocols: a standard called NMEA and a proprietary protocol called UBX.  For this we are using the UBX protocol.  

 

An example string from the GPS looks like:

 

 B562 0106 3400 B61E 0B0F 69B1 0600 E205 03DD CCBB 0A05 FDE9 1CE2 40A7 E016 B003 0000 0000 0000 0000 0000 0000 0000 1100 0000 FD00 0005 1212 0100 52F6 B562 0102 1C00 B61E 0B0F 60D2 2AD0 005F 8115 361A 0A00 619A 0A00 3714 0000 D91E 0000 CF5D B562 0103 1000 B61E 0B0F 03DD 0000 7407 0000 6EFD 5F00 27CD B562 0130 C800 B61E 0B0F 1000 0000 0002 0D07 2244 6201 DFFC FFFF 010C 0C01 002B FD00 0000 0000 020A 0D04 163B CE00 5E22 0000 0304 0C01 0026 4000 0000 0000 0405 0D04 1724 0E01 8FE6 FFFF 051E 0C01 001B 2B01 0000 0000 060D 0D06 2111 3500 D20F 0000 0718 0401 000E 0E01 0000 0000 0817 0C07 2203 2100 0000 0000 0911 0D04 1A0C 8100 6FFF FFFF 0A1D 0401 000C 3801 0000 0000 0B7A 0001 00F7 0000 0000 0000 0C00 0000 0000 0000 0000 0000 0D00 0000 0000 0000 0000 0000 0E00 0000 0000 0000 0000 0000 0F00 0000 0000 0000 0000 0000 FE70 

 

I suppose my question here is just simply starting the project.  I understand you need a configure message (CFG-PRT) to set things like the transfer rate.  In the message we only need to intrepret the "NAV-POSLLH" and the " NAV-STATUS" packets.  My thought was to look through the string and look for the header of either message.  If I found the header I was planning to find the "payload" and interpret.  I have never worked with this type of system before.  

 

I have also attached the protocol spec sheet.

0 Kudos
Message 5 of 12
(4,229 Views)

If you have the choice why not use NMEA mode?

 

I have some vi's around that decode most of the NMEA messages that I used on a project years ago.

 

Here is some good information on NMEA messages http://www.gpsinformation.org/dale/nmea.htm

 

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 12
(4,216 Views)

We are required to use the UBX protocal

0 Kudos
Message 7 of 12
(4,202 Views)

You have a full protocol description. I am not sure what your problem is. Please be more specific in why and how you struggle.  I can see it is some topics her that may be difficult to grasp for a Labview novice. But it is quite forward to parse that string.  On the other hand then you do not tell me anything I am not able to help. I can not nor will I just present a turn key ready solution


@dwhamm wrote:

We are required to use the UBX protocal


School project......Smiley Wink



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 8 of 12
(4,194 Views)

It is indeed a school project and I do not want anyone to do this project for me.  I would like to learn labview and how it works, but as I said I have only completed one previous labview assignment, none involving strings.  I suppose I am having trouble understanding how one generaly parses a signal.  

 

My thought was just to search the string for the specific header.  From there use a case structure depending on what header is found to interpret the finding.  

 

Does this make sense or is there a more "standard" way this is done?   

0 Kudos
Message 9 of 12
(4,163 Views)

It would depend on what your message stream looks like and how the protocol is defined. However, a general approach if you know the protocol is to retrieve whatever amount of data from the beginning of the string to identify the data (i.e.. read the packet header). Parse the header for the information you need in order to interpret the following data. Knowing the protocol you should be able to read the specific data from the string and process it in whatever way you need. Continue doing this over your entire data set. You can use a single string and manipulate the index into the string or your can continually remove the data you read from the string so the beginning is always the next piece of data.

 

Depending on the protocol you may be able to use the "Scan String For Tokens" VI.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 10 of 12
(4,154 Views)