How do you remove drift data?
The drift is removed by computing the histograms of small signal batches and matching them to an ideal (non-shifted) histogram. The resulting shifts are already much better than those from e.g. a rolling mean. The shifts are then further smoothed by approximating them with 4th degree polynomials.
What causes integration drift?
It is a well-known fact that the use of numerical integration of acceleration/angular rate information from inertial sensors (accelerometers/gyroscopes) to obtain position/orientation information inherently causes position/orientation errors to grow with time, which is commonly known as “integration drift”.
Why do accelerometers drift?
The reason is that the test mass inside the accelerometer is subject to gravity.