The drift of the MPU6050 gyroscope is determined during the flight-controllers Set-Up phase. For each of the 3 directions x, y, z the average over a number of gyro-readings is calculated. The gyroreadings in the compass-function "Calc_Pitch_Roll_Yaw_4_PID.ino" are corrected with these average drift values. The straight forward code is listed in Flight-Control source-code file:
"8_Gyro_Drift_Calcul.ino"