This document contains FAQs about the eCompass API. It addresses questions about converting sensor readings to magnetic units, defining the sensor coordinate system to match the phone, differences between single and dynamic calibration APIs, correct calibration procedures, accuracy reporting definitions, and when to use the magnetic bias setting function.
2. FAQ
• IST_A001 – What’s the LSB to uT?
• IST_A002 – Why do we change the axis of acc and mag sensor to
NEU system?
• IST_A003 – What’s the difference and priority between
Set_SingleCalibration and Set_DynamicCalibration API?
• IST_A004 – How to calibrate eCompass correctly?
• IST_A005 – What’s the definition for 0, 1, 2, 3 in accuracy report ?
• IST_A006 – What time do I use “Set_MagBias” function?
3. IST_A001 – What’s the LSB to uT?
• Ans : in Isentek sensor, we read 2 byte sensor value with LSB type,
so we have to change this word unit to magnetic unit uT.
• Ex : Read X value 0x0050 = 120 LSB = 120*0.3 uT = 36 uT
• Ex : Read Y value 0xFF50 = -176 LSB = -176*0.3 uT = -52.8 uT
4. IST_A002 – Why do we change the axis of acc and mag
sensor to NEU system?
• In order to calculate correct heading angle, we define input with
NEU coordinate system as android phone system.
• Strictly coordinate system don’t make confused on users.
Sensor Coordinate System
https://developer.android.com/guide/topics/
sensors/sensors_overview.html#sensors-
coords
5. IST_A003 – What’s the difference and priority between
Set_SingleCalibration and Set_DynamicCalibration API?
• Difference :
1) Set_SingleCalibration :
calibrate immediately when
setting this flag.
2) Set_DynamicCalibration :
calibrate when reaching
calibrated condition
Set_SingleCalibration Set_DynamicCalibration
6. IST_A003 – What’s the difference and priority between
Set_SingleCalibration and Set_DynamicCalibration API?
• Difference :
1) Set_SingleCalibration : calibrate immediately when setting this flag.
• Get_CalibrationStatus() return 1 immediately that the 1 mean on calibrated process
• after calibration, Get_CalibrationStatus() return 0 mean calibrated process end
2) Set_DynamicCalibration : calibrate when reaching calibrated condition
• Get_CalibrationStatus() return 0 in initial state
• When reaching calibrated condition, Get_CalibrationStatus() return 1 that the 1 mean on
calibrated process
• After calibration, Get_CalibrationStatus() return 0 mean calibrated process end
• Priority :
1) Set_DynamicCalibration > Set_SingleCalibration : When you enable
two API, the eCompass process will run Set_DynamicCalibration
process instead Set_SingleCalibration.
7. IST_A004 – How to calibrate eCompass correctly?
• Check point
1) Correct axis direction on acc and mag sensor
2) Mag sensor input data is uT unit
3) Enable API Set_SingleCalibration() or Set_DynamicCalibration(), as well as,
Process_RunCompass(Mag_RawData, AccData, Mag_CalibratedData)
9. IST_A005 – What’s the definition for 0, 1, 2, 3 in
accuracy report ?
• Accuracy definition
1) 0: unreliable
2) 1: Low
3) 2: Medium
4) 3: High
• After system initialization process, if you don’t calibrate, it would
show 0.
10. IST_A006 – What time do I use “Set_MagBias” function?
• You have last calibrated bias value, so you can Set_MagBias in
system initialization process, then you can check if accuracy return 3.
1) If yes, this bias is good to measure in current environment
2) If no, this bias is bad, so try to calibrate in current environment again