This repositiory contains the SimuLink Model and the necessary Matlab .mat file to implement Linear MPC on a PixHawk based Quadrotor platform. The model employs the Model Predictive Control, ROS, and Control Systems toolboxes so make sure they are included with your MATLAB distribution.
Here is a picture of the Model for reference: