AnsweredAssumed Answered

FXOS8700CQ - calibration in KW36 boards

Question asked by Niranjan ravi on Aug 19, 2019
Latest reply on Aug 22, 2019 by Estephania Martinez

Hi,

   I ran the ecompass demo present in KW36Z boards and I got different results in few scenarios. 

1. when I compared the magnetometer values with a compass application from my smart phone. As per datasheet, I found FXOS8700C location and aligned the board in same direction as smart phone but the resulting angle were totally different? Why is this behavior? 

 

2. I also need to obtain x,y,z values from accelerometer. When i calibrate the board and run the demo the accelerometer values are not following a pattern, it shoots negatives and positive in random manner irrespective of the direction i move the board. I checked both raw values from sensor data and averaged value as well. 

 

I have read the documentation and my goal is achieve the angle at which the board is moving and x,y axis precisely. I tried all possible ways but couldn't figure. 

 

Edit: Would be great if you could me what could go wrong in calibration? Cause one out of 10 calibration barely matches compass reading. I have calibration drone hardware but never faced any such issues.  And I needed value in range of 0 to 360 so I added this piece of code in ecompass.c file

if( g_Yaw_LP < 0 )
{
g_Yaw_LP += 360.0; // convert negative to positive angles
}

Thanks and Regadrs

Niranjan

Outcomes