Finding and reprogramming PWM output of quadcopter

I’m trying to find the code which calculates the PWM that is sent to individual motors of the quadcopter. Actually, I am trying to improvise this quadcopter code into a hovercraft with 4 rotors. Since the craft is on the ground, there is no need to maintain a constant height and thus no need to constantly spin the rotors when in operation. I need to know which rotor output is currently controlled by the different inputs so I can change them.

Where do I find this code that actually calculates the final PWM to be sent to the motor? There must be a formula for this right?