Extracting IMU sensitivity/accelerometer scale range in an app

57 views Asked by At

As part of my bachelor thesis I am writing app to extract IMU data. My supervisor would like to get the sensitivity data as well, for example the scale range of the accelerometer (2g, 4g, etc.). It would not be necessary to set the sensitivity, only getting it would be enough.

After researching the last days, I think this would only be possible by writing an ioctl or syscall that somehow accesses the necessary bits in the driver code. To my knowledge, the app would then only work on the given phone model as different IMUs have different drivers.

Would this really be the only way of solving this task or is there maybe a general solution as well which works on all Android phones (maybe even iOS)?

If so, how would I go about setting this up?

Other things I tried:

  • Using the function getMaximumRange() on the sensor (see this does not give you the current sensitivity but rather some faulty value. I tried it and it returned 8g for the accelerometer, although I was able to go above that by shaking the phone vividly (I got at least 11g, the IMU in the phone also supports 16g as a scale range).

  • StackOverflow posts like this one go into a similar direction but are not exactly what I am looking for.

For reference, my supervisor gave me a Samsung Galaxy M23 which has an ST LSM6DSx IMU (see this for datasheet).

0

There are 0 answers