Communicating data between Simulink and Ardupilot

Hi everyone,

For the past few weeks I have been working on firmware customization of arduplane to implement my custom controllers that I have made in Simulink.

So far, I have generated the cpp code of my controllers in simulink, added a new flight mode to arduplane and implemented these controllers in that new flight mode. I am running SITL between Simulink which hosts my Flight Dynamics Model, and Arduplane which hosts my controllers. I am using a connector block provided by Avium Technologies to send and receive data to and from arduplane.

So far, the progress has been good and I can contribute to the documentation of SITL and provide detailed tutorials for setting up SITL and running your own controllers in ardupilot.

The problem I am facing right now is that I have a controller that needs some data in addition to what the block is already sending to arduplane.

For that purpose, I can tinker with the cpp code of the connector block. It is not that difficult. The issue is that I am not so familiar with the broad architecture of ardupilot still. I need to know where the data I am sending is being received so I can use that in my controllers as feedback. Any help in this regard is appreciated. And I can contribute to the community by making detailed tutorials about the things I have learned and about my SITL setup along with firmware customization.

Thanks.