There's an app for that. I mean, seriously. It's called demagnetizing the accelerometer. This basically allows it to either remain at zero, or points within 0 indicating little to no movement. Sort of like your typical EA programmer.
You can tune a piano, but you can't tuna fish. You can tune a filesystem, but you can't tuna fish. -- from the tunefs(8) man page