How do I understand all the libraries required to program a quad copter?

I'm trying to fix a Quad copter I've got Arduino Mega 2560 MPU6050 and all other required hardware I want to program it on my own and not using all the libraries available over web..so I was wondering if I could get explanation for the libraries like I2cdev mpu6050 etc. and try to do things on my own ??

What is your background and current knowledge in physics and math, including tensors?

BrianBoozebacon: I want to program it on my own and not using all the libraries available over web..so I was wondering if I could get explanation for the libraries like I2cdev mpu6050 etc. and try to do things on my own ??

Learning how libraries work and figuring out how to write equivalent code is a perfectly reasonable aspiration.

Doing that at the same time as trying to get a quadcopter to work is not.

...R