Splitting Data
Splitting Data
(OP)
Hi,
I'm having trouble splitting up data that I am receiving through a COM port. The data I am receiving is a mix between two different GPS readings and a telemetry reading. Right now the data comes through a timer control that takes whatever is in the receive buffer and writes to a text file every twenty milliseconds. Each string in the text file may contain any combination of the three types of data received. I want each type of data to be its own string, distinguishable from the other two. Any help would be very much appreciated.
-Thanks
P.S. Each data type is preceded by its own specific character (i.e. GPS - $ or B and ARTS (Telemetry) - A)
I'm having trouble splitting up data that I am receiving through a COM port. The data I am receiving is a mix between two different GPS readings and a telemetry reading. Right now the data comes through a timer control that takes whatever is in the receive buffer and writes to a text file every twenty milliseconds. Each string in the text file may contain any combination of the three types of data received. I want each type of data to be its own string, distinguishable from the other two. Any help would be very much appreciated.
-Thanks
P.S. Each data type is preceded by its own specific character (i.e. GPS - $ or B and ARTS (Telemetry) - A)
RE: Splitting Data
Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
RE: Splitting Data
The thing is is that the telemetry data gets sent at a higher rate (50 Hz) than the GPS, and the data can be in variable length strings. And by using the timer control this may split up strings of one type of data into different lines
Telemetry gets sent in ASCII, and each string starts with an A.
GPS either starts with $GP...and a string of numbers/letters/commas
or
GPS starts with a B and then a string of characters.