I am using magnetometer LIS3MDL to work more like a E-Compass. We are measuring azimuth angle. I am not able to get tilt compensation right. Is there any reference design specific to this chip.
This is the equation i am trying to use. Please let me know if there is something wrong. I am able to verify pitch and roll variations correctly.roll= atan(accData.fy/accData.fz);pitch= atan(-accData.fx/accData.fz);cosRoll = cos(roll);sinRoll = sin(r...