Tricopter algorithm [HELP - CONFIRM]

freak174:
Error = setpoint - input -> this would generate a negative value, but in my code it only gives me a 0.

Then your code is wrong - perhaps using unsigned instead of signed values. Using a separate PID instance for each direction is daft - the PIDs have state and you will just end up with a mess.

Design your sensor processing so that the error is positive in one direction and negative in the other, for each degree of freedom you want to control. Use one PID for each degree of freedom to output a control demand for that DoF.

Merge the control demands from each DoF to give you the total demand for each motor.