convert raw gyroscope output to Euler angles ??

I am trying to measure linear acceleration using the MPU6050.

i need to represent the orientation of my device in Euler form in order to calculate linear acceleration. I don't know how to convert the raw gyro values to euler angles.

I know jeff rowberg has supplied libraries that can do this but for my project i need to show the actual algorithm. Once i can convert the raw values to euler angles i can do the rest from there. Please help !

Gyros output the time rate of change of angle.

So, the best you can do is multiply by the time in seconds since the last gyro reading, to find the difference in the total angle for each axis, since the last reading.

To find absolute sensor orientation you need external references, like "North" and "down".