the IMU temperature gradient isn't really directly measurable since there is only one temperature sensor in the IMU, and no temperature sensor on the PCB directly on the opposite side from the IMU. So the only option is to try and use the CPU temperature and IMU temperature as sort of proxies for the top and bottom temperatures of the IMU.
Log the CPU temperature and the IMU temperature, go through some heating or cooling cycles and observe the behaviour. I've done most of this, but I didn't log the CPU temperature unfortunately so I can't quantify the magnitude of the temperature gradient, only the direction (because I know where I was heating / cooling the system)
[image: 1795695397370-z-bias-thermal-runs-same-axes-resized.png]
left panel: when the board is cooled with air across the IMU, the IMU temperature goes down, and the Z acc bias goes more negative. then when the airflow is stopped, the Z acc bias returns to baseline
right panel: when the board is heated by stressing the CPU, the IMU temperature goes up, and the Z acc bias goes more negative again, then when the heating is stopped, the Z acc bias returns to baseline
in each case, the absolute temperature is being moved in the opposite direction, but the same temperature gradient is being set up... IMU exposed surface is cooler than the PCB mounted side.
We did discuss the idea of trying to use the CPU vs IMU temperature readings to estimate the temperature gradient and add some code to voxl-imu-server to try and correct for this effect, but I don't plan to attempt it any time soon.