This is the first time I've worked with an IMU. I have no idea whether it's possible to get the position data using the using quaternions and yaw, pitch and roll data? It would be great if someone can explain how to find the position of the sensor (translation in cm or mm and rotation in degrees) using that sketch.
I have never worked with this component before.
First off, you may or may not realize, but it is impossible to measure exact position with the gyro & accelerometer, but only change in position. The gyroscope will give you orientation, but if you are not moving, or moving with negligible acceleration, the 3-axis accelerometers in your MPU-6150 will not give any signal.
I would suggest to look at the datasheet. Which I found here:
By the looks of it the device will use an I²C Bus which you will have to use to communicate between the two embedded devices.
Hope it helps