Let me try to answer your question quickly as following:
1. I will not just call it delay with BMI160_ACCEL_BW_OSR_AVG4. Samples will get with desired ODR you configured. Here i call it group delay which is the duration from the real action and you read from sensor. And this value affected by ODR also. Assume you use 100Hz to work with BSX lite lib, the group delay is about 24 ms.
2. you input as acc,gyro,mag data structure. for 100Hz, you can input like ([acc, gyro], [acc,gyro],[acc, gyro],[acc,gyro,mag]) or repeat mag for all samples until you have new mag data. please do NOT use 0 instead.
3. BSX lite is not expose this function to customer this means with BSX lite, you can't make Soft Iron Compensation.
4. i suggest you skip the accuracy output from lib, it has some bugs in BSX lite. Instead of it, compare the heading result with the reference sensor
5. Yes, please use bsx_(get|set)_(acc|gyro|mag)calibprofile functions.
6. BSX lite take uT as input. Depending on which output function you used from our API and which unit you are input to lib. If mag calibration is always 0 means the input mag data is wrong. So you need to align with the input unit with the data you feed into lib.
... View more