BMI270 raw to real data conversion

Please please please ... I need just a little help. I have searched the web, and these forums. I have also looked at the Bosch API code on GitHub but I still don't understand. I have worked with many IMUs in the past with no issues but this part is different and the data sheet seems to be incomplete.

I need to convert raw accelerometer data to "Gs" and raw gyro data of d/sec. This seems like it should be straight forward and should just require multiplying raw data by a conversion constant -- but I can't find a crisp answer.

For accelerometer data I have imperially discovered (I think) to simply multiply the raw data by 0.000244140625 no matter what the sensitivity setting is. This is a magic number but closely agrees with two data sheet statements about threshold (0xAA = 93mg and 0x90 = 70mg). Both closely agree with the magic number above.

Also max G value / 2**16 = 16/65535 = 0.000244140625. Same magic number. I hate to use such fuzzy numbers in real code though. Is accelerometer data conversion that simple?

Just as a sanity check -- the raw Z data register (which should convert to 1G when the sensor is flat) always has approximately the same value (around 4100) no mater the sensitivity setting. Is this expected behaviour?


As for gyro data I am at a loss.


As I said I have looked at the API code but it is pretty dense and it appears that the range setting is needed to do the conversion -- yet my experiments seem to say otherwise.


I am not looking for anyone to write my code -- I just need some helpย  finding a simple explanation of how to convert.


Thanks in advance

1 reply