Read OpenMV Cam H7 Data in Simulink via Pixhawk Cube


I have interfaced the Cam H7 with pixhawk cube and I am trying to read the serial data in Simulink for optical flow purposes. I am using the optical flow MAVLink example script.

I can successfully acquire raw serial data from the Cam H7 inside Simulink, but I am trying to decode this data so I can access data for my project. I tried to use the OPTICAL_FLOW topic in the MAVLink Deserializer block. I also tried using the Byte Unpack block (as it appears the python script does byte packing before sending to uart), but haven’t successfully been able to get readable data.

Has anyone used Simulink to decode serial data from Cam H7 and has anyone been able to unpack the serial data?

Thanks a ton!

You might have to just process the data using byte wise operations. You can see exactly how the data is serialized in the script.