I'm using a 3DRobotics teletry kit and I'm trying to make my 3DR qaudcopter to communicate realtime with
MATLAB. Since the telemetry kit has a UART interface, I tried creating a serial object with baudrate 57600 in MATLAB.(I tried using fread, and fgets functions to read data in MATLAB) But the data
that I receive in MATLAB is like if they were encyrted (refer the attachment). And ofcourse 3DR radio uses MAVLink protocol where packet encryption is done.
I don't know to decide whether the reason or for this is;
- encryption of MAVLink data packets, or
- mismatch of the format between the actual data received by the ground station and the serial object properties such as bit order, stop bit, parity bit,..etc ,
-or something else.
I would be truly grateful for some advice and ideas to come out of this dead end.
Did you resolve the problem?
Currently, I'm trying to do the same work as you did, but I don't know how to decode the MAVlink data. If you resolved your problem, could you please share some information about that?
Thank you in advance.
Back then, I was using MissionPlanner and it was open source.
One option you can do is that; in the open source project, you can track down the place where the data is being displayed in the UI. Edit the code such that the data is being written to some external readable file(eg: xml), in real time. From your Matlab script, read that file and extract the new data, every time that file is being updated.
Basically what you would be doing here is letting the MissionPlanner to handle the underlying protocol for you. And since matlab was faster than the reception data rate to the MissionPlanner by the uav, you could expect almost no latency.