BHI260ap sensor calibration

Hello,
We are using the BHI260ap sensor (in the nicla sense me) do do orientation tracking of a segment of the body. To get accurate data, we need to calibrate the sensor every time again. I tried bhy2_get_calibration_profile and bhy2_set_calibration_profile functions, but the calibration levels remains 0.
Do you have example code that shows how to get and set the calibration profiles for all the sensors? The example from this page does not really help: https://community.bosch-sensortec.com/mems-sensors-forum-jrmujtaw/post/bhi260ap-calibration-problem-aAEFn6pn0Lwlsuw

Moreover, how necessary is it to recalibrate the sensor in a different environment than where the initial calibration profile was made?
Thanks a lot!

8 replies