PID gains calculations

I would like to know (if possible info is available) how the PID gains are calculated? what are the dynamic variables considered to calculate them for example with a quadrotor application? thanks

Any help on this will be greatly appreciated