This is a PID controller using the Modelica Synchronous library to model the PID blocks. It has inputs that account for the dictated position of the quadcopter and yaw. It compares the actual XYZ position of the quadcopter to the commanded XYZ position and controls the current applied to each of the motors as a result.