@mgrouch Hi there, the M5Unified library has a calibration routine that works well. See the IMU example in the library, and make sure to read all of the comments carefully.
You press the Atom BtnA (screen) and it will calibrate for 10 seconds, enough to do one axis at a time. You are best to calibrate the accelerometer, gyro and magnetometer separately for best results.
Personally I modified the example so that the calibration starts on press BtnA, and ends on the second press of BtnA. i.e. no 10 second countdown. This way I can take my time and calibrate all 3 axes of each sensor (accl, gyro, or mag) in one continuous movement.