Does MATLAB support UBX protocol ?

조회 수: 8(최근 30일)
Samuel Olufemi Taiwo
Samuel Olufemi Taiwo 2021년 3월 26일
댓글: Samuel Olufemi Taiwo 2021년 4월 7일
data stream coming from my receiver has binary stream of data in ubx form.
The message structure of the ubx binary lines that I am interetsed in always start with b5 hexa.
how do I write the matlab to read the binary line and also is there any callback function for binary data stream?
  댓글 수: 2
Samuel Olufemi Taiwo
Samuel Olufemi Taiwo 2021년 4월 7일
I am trying to read streams of binary data in from a device via the serial port.
My short code is shown below:
function gnssbinary
device = serialport("COM4", 115200);
data = read(device,50000, 'uint64');
disp(dec2hex(data))
end
  1. The information I am looking or have header, Class and and ID of 0 x b5 , 0 x 62 , 0 x 02 and 0 x 15 in that order and the following messages should be the real information I need.
  2. I arbitrary used 5000 as the number of values (in the read syntax) to be read because it is like looking for a needle in a hay stack
  3. I have been able to get 0 x b5 , 0 x 62 , 0 x 02 from the binary but not yet what I am looking for which should still have 0 x 15.
  4. how do I program the MATLAB to keep identify the messahe identifier in (1) above, read the messages that come after and ignore the rest until it encounters the same message identifer again and repeat the process?

댓글을 달려면 로그인하십시오.

답변(0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by