Tilt compensation in Invensense MPU9150

That's a fair point, let me check into signs.

That said, I've tried implementing the algorithm described, both in straight integer form, and using floats and math.h, with no luck. Either there are bugs in the code (I definitely caught missing semicolons), or I'm doing something wrong (also quite possible).