Incorporated compass sensor

Was using an ADXL chip as an accelerometer.  The ADXL had no compass heading.  New LSM chip has compass and accelerometer.  The compass is not affected by tilt or gravity.