Track Position in Cartesian x,y,z from IMU G87

How to Track Position of indoor vehicle in Cartesian x,y,z from IMU G87 ?

"IMU G87" Contain:
digital compass hmc5883l 3 axis
pressure and temperature bmp085 1 axis
gyro and accelerometer MPU6050 3 axis

You can't, for more than a minute or so. Here is why not: http://www.chrobotics.com/library/accel-position-velocity

jremington:
You can't, for more than a minute or so. Here is why not: http://www.chrobotics.com/library/accel-position-velocity

I need to apply it for short distance
as the following example:

Short term Position Tracking with an IMU

Do you have the code for example like this?

regards and thanks