Filter löschen
Filter löschen

Does MATLAB support UBX protocol ?

15 Ansichten (letzte 30 Tage)
Samuel Olufemi Taiwo
Samuel Olufemi Taiwo am 26 Mär. 2021
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 Kommentare
Aditya Patil
Aditya Patil am 31 Mär. 2021
Can you provide more details about the device and the format itself? That way the community will find it easier to help you.
Samuel Olufemi Taiwo
Samuel Olufemi Taiwo am 7 Apr. 2021
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?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by