Dear all,
I am working in im6xq board. We have connected mag3110 to the i2c1 line. A platfrom data we are given is 0. The problem is, we are not able to interpret the data output of the sensor. Our team calculated the angle as taninverse (My/Mx), where My and Mx are raw data obtained from magnetometer. But this angle is varying only between some 45 degrees, eventhough we tried full rotation. Any way is there for calibrating this magnetometer? Also it will be helpfull, if let us know any mistake in angle calculation we are doing. Data output we obtained while running magnetometer is included here.
Test Count = 11, Mx = 565, My = 1556, Mz = 1359
Test Count = 12, Mx = 566, My = 1559, Mz = 1363
Test Count = 13, Mx = 566, My = 1559, Mz = 1370
Test Count = 14, Mx = 569, My = 1562, Mz = 1372
Test Count = 15, Mx = 563, My = 1558, Mz = 1361
Test Count = 16, Mx = 561, My = 1559, Mz = 1356
Test Count = 17, Mx = 565, My = 1554, Mz = 1369
Test Count = 18, Mx = 569, My = 1555, Mz = 1360
Test Count = 19, Mx = 562, My = 1565, Mz = 1377
Test Count = 20, Mx = 567, My = 1561, Mz = 1367
Test Count = 21, Mx = 567, My = 1567, Mz = 1361
Test Count = 22, Mx = 567, My = 1558, Mz = 1372
Test Count = 23, Mx = 567, My = 1556, Mz = 1357
Test Count = 24, Mx = 568, My = 1555, Mz = 1358
Test Count = 25, Mx = 569, My = 1559, Mz = 1360
Test Count = 26, Mx = 568, My = 1555, Mz = 1362
Test Count = 27, Mx = 564, My = 1555, Mz = 1347
Test Count = 28, Mx = 566, My = 1560, Mz = 1369
Test Count = 29, Mx = 572, My = 1569, Mz = 1355
Test Count = 30, Mx = 565, My = 1556, Mz = 1355
Test Count = 31, Mx = 566, My = 1557, Mz = 1363
Test Count = 32, Mx = 566, My = 1553, Mz = 1362
Test Count = 33, Mx = 566, My = 1560, Mz = 1361
Test Count = 34, Mx = 568, My = 1556, Mz = 1355
Test Count = 35, Mx = 565, My = 1568, Mz = 1355
Test Count = 36, Mx = 570, My = 1558, Mz = 1365
Test Count = 37, Mx = 574, My = 1562, Mz = 1364
This output we obtained without any rotation, but in resting position. We need an complete angle rotation ie, form 0 to 360 on board rotaion, for our eCompass application. Any suggestion or comments are invited. Waiting for your valuable replies.
Thanks and Regards
Ajna