Hello Nabid,
With a reasonable PCB layout and with NXP E-Compass Software, we can get the Accuracy of ±5 degrees maximum to minimum.
The resolution of the MAG3110 is 0.1µT and its noise is down to 0.25µT. Since the earth's magnetic field is about 25µT horizontal component, the resolution leads to a naïve calculation of 0.1 / 25 radians of angle resolution or 0.004 radians or 0.2 degrees. This is a naive calculation and simply shows that the MAG3110 magnetometer resolution is so good that it has a trivial effect on accuracy.
The earth's magnetic field is very weak compared to magnetic fields on PCBs and compared to the MAG3110 zero field offset. Calibration software must be used.
Please refer to the following link for free C code. NXP has both, hard iron and soft iron calibration:
E-Compass: NXP E-Compass Software
The MAG3110 is capable of measuring magnetic fields with an output data rate (ODR) up to 80 Hz; these output data rates correspond to sample intervals from 12.5 ms to several seconds.
In case you want to change the ODR, you may refer to the CTRL_REG1 (0x10) register at the MAG3110 datasheet.
Finally, I would like to recommend some useful documents in case you need them:
1. MAG3110 Frequently Asked Questions
2. MAG3110 - Bare metal example project
I hope this information will be useful for you.
If I misunderstood your question, feel free to let me know. I will be glad to help.
Have a great day.
David Diaz.
PS: If my answer helps to solve your question, please mark it as "Correct". Thank you.