add tilt compensation to magnetometer