For my master’s project I need to create the Simulink model for the position and attitude controllers of the PX4 firmware, so I can perform some analyses on its performances in simulation. I see that they are very dependents of the flight mode but for the moment I am just looking for a general diagram of the controller structure (Inner/Outer loop P, PID). I have review the mc_att_control_main.cpp and I have identified the following block diagram.
I see that position control use a similar controller but I do not understand yet how it is connected to the attitude controller.
I would appreciate if someone could confirm the identification I have done and suggest documentation about this problem so I can better understand the code.