The MPU6050 or even the MPU9150 is really a magnificent cra...aaahm: mess... ;-/
I'm using this one:
CMPS11
feat. 3D-accelerometer and 3D-Gyro and 3D-compass and temperature compensating and Kalman filtering by a dedicated 16bit signal-processor on board!
just reading heading (yaw), pitch, and roll perfectly filtered from single registers of your interest
- or even the raw 3D values one by one!
http://www.robot-electronics.co.uk/htm/cmps11i2c.htm
Register Function
0 Command register (write) / Software version (read)
1 Compass Bearing 8 bit, i.e. 0-255 for a full circle
2,3 Compass Bearing 16 bit, i.e. 0-3599, representing 0-359.9 degrees. register 2 being the high byte
4 Pitch angle - signed byte giving angle in degrees from the horizontal plane, Kalman filtered with Gyro
5 Roll angle - signed byte giving angle in degrees from the horizontal plane, Kalman filtered with Gyro
6,7 Magnetometer X axis raw output, 16 bit signed integer with register 6 being the upper 8 bits
8,9 Magnetometer Y axis raw output, 16 bit signed integer with register 8 being the upper 8 bits
10,11 Magnetometer Z axis raw output, 16 bit signed integer with register 10 being the upper 8 bits
12,13 Accelerometer X axis raw output, 16 bit signed integer with register 12 being the upper 8 bits
14,15 Accelerometer Y axis raw output, 16 bit signed integer with register 14 being the upper 8 bits
16,17 Accelerometer Z axis raw output, 16 bit signed integer with register 16 being the upper 8 bits
18,19 Gyro X axis raw output, 16 bit signed integer with register 18 being the upper 8 bits
20,21 Gyro Y axis raw output, 16 bit signed integer with register 20 being the upper 8 bits
22,23 Gyro Z axis raw output, 16 bit signed integer with register 22 being the upper 8 bits
24,25 Temperature raw output, 16 bit signed integer with register 24 being the upper 8 bits
26 Pitch angle - signed byte giving angle in degrees from the horizontal plane (no Kalman filter)
27 Roll angle - signed byte giving angle in degrees from the horizontal plane (no Kalman filter)
btw,
the user manual writes "bearing" but that's faulty, it has to be called "heading".
"heading" is the "direction of the nose" (longitudinal axis),
"bearing" is the relative locating angle of an object instead