Added mCenterHeading and math to compute it.