This app was mentioned in 4 comments, with an average of 1.25 upvotes
You don't need any app really, I just do it on the homescreen when it gets out of wack and it fixes it.
But here is the app that I first got those instructions from: Compass
Compass 2.1.0 released!
I don't know if you can do it systemwide (it's possible, since they're physical sensors). Just open an app that uses it (Like Compass) and just flail away. The app I linked even tells you this stuff as you open it.
I use this compass