Support for soft iron distorting in DMP library

By ozil11 , 9 May 2018

Hey, I have an InvenSense ICM-20948 sensor with me and I was wondering if the DMP libraries have any support for soft-iron compensation. I have seen a function called "inv_icm20948_compass_dmp_cal()" which sets up the soft-iron matrix but how do I use this in my application code, do I just call the function "inv_device_set_sensor_mounting_matrix()" [which is basically used to call the inv_icm20948_compass_dmp_cal() function ] and pass the "s->soft_iron_matrix" as the matrix argument. Also I've seen in the function "inv_icm20948_init_matrix()" that we initialize some of the values for soft-iron matrix
"//initialize soft iron matrix
s->soft_iron_matrix[0] = (1L<<30);
s->soft_iron_matrix[4] = (1L<<30);
s->soft_iron_matrix[8] = (1L<<30);"

what does this signify? Can implement soft-iron compensation based on these functions provided by DMP library?

phpbb Topic ID
36896