LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulating NMEA sentences

Hi,

I understand that GPS NMEA sentences could be collected serially using COM ports. I also know that the sentences are updated sentences by sentences. If there any way I could use a log file of the NMEA sentences and make it run like it was from the GPS receiver?

Could anyone demostrate this?

Thanks alot

From
Donny
0 Kudos
Message 1 of 2
(2,849 Views)
Hello,

I believe you are asking if it is possible to write a stream of "sentences" to a file and then at some point later read that file (sentence by sentence) and write it to a serial port. The answer to that question is yes, you can read from a file and write the result to the serial port. There are only a couple things to consider:

1. If the "sentences" are not ascii, then if you read the file back as binary, you'll need to type cast to string so you can write using VISA Write, or use the VISA Write From File function.

2. If there are timing requirements between "sentences," you'll be taking care of that in software and hopefully this will provide enough granularity and accuracy in defining those timing requirements. More specifically, if you require constant time duration for loop iterations, use the wait until next millisecond multiple function with the specified wait time at least as large as the time it takes the code in your loop to execute.

I don't know the structure of GPS NMEA "sentences," but if you are having trouble from the VISA reading, file I/o, or VISA writing side of things feel free to repost!!!

Also, if you post the format and/or examples of such "sentences" I can likely give you some more specific direction!

Thank you and looking forward to your repost!

Best Regards,

JLS
Best,
JLS
Sixclear
0 Kudos
Message 2 of 2
(2,822 Views)