I'm suggest the following two method:
1. perform the fast offset calibration in sensor level and store the offset value into sensor NVM.
2. since pure linear movement is not quite easy to achieve in real world, we can use gyro output as further compensate. If gyro output is 0, then we can also do offset compensate for linear acc.
But if your use case is able to get pure linear movement, then item 2 is not feasible any more.
... View more