Debugged inertia calculation