Hi All,

I am a beginner in using APM's and I am currently working on a problem where I am trying to do a Hardware in loop simulation with APM 2.6 in Matlab. I have connected APM to mission planner and instead of using flight gear or xplane for simulation I intend to use Matlab because of the customization needed for my research.

I am using Matlab to read in actuator commands from the mission planner through UDP and do simulation in Matlab and send back the sensor data to the mission planner again through UDP. The mission planner in turn communicates with the APM through Mavlink thus closing the loop.

So far I have read in actuator commands send by the mission planner through UDP in Matlab and I am currently working on sending the simulated data back to the mission planner. It would be of great help to me if someone who has already done it could share the details. Help in this regard would be greatly appreciated.


Views: 604

Reply to This

Replies to This Discussion


....Ok it is possible to use matlab/simulink instead of  flight gear or xplane for HILS..but first, you have build the flight simulator via simulink, that means you have to  set up the equation of motion and then implement it via simulink...and then compile and download it via real time workshop into the xpc target. For detailed info,.. please visit my blog endriuav.blogspot.com...   

Hello Devaprakash!

I am also trying to connect Matlab Simulink with Misison Planner but I am unable to make it run. I used an UDP block but there is no data being sent from MP. Could you tell me how you did it? I dont know how to connect properly MP and Simulink nor I know what data are sent nor how to chose them.

Did you manage to send back data to MP?


I am trying to connect Simulink and Mission Planner also. Does anyone know what settings are required in Mission Planner to receive Mavlink messages from Simulink.  

Reply to Discussion



Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service