Issue with thermal calibration fitting

Hello,

I tried to use the offboard sensor thermal calibration on my cube, but I had some issues.

The board take 1h to get to the desired temperature and ended with low temperature slope. So, my samples distribution is very different between the beginning and the end of the log. That causes an issue because the fitting gives a lot of weight to the high temperature and don’t fit the lower.

Here are two bad fittings


To fix that, I added a re-sampling step before fitting in the script process_sensor_caldata.py .

This resampling gives a constant sample distribution along temperature. It can be found here : https://github.com/NicolasM0/Firmware/commit/bcdefd71c3e2be0bbb005187ae1b87fa96385758


Does someone have a better way to fix that ? maybe by heating the sensors (externally or with the internal heater) or with an other fitting ?

The new fitting is the black line and the default is the red one. The black line is not easily visible

my log is too big for flight review but you can find it here : https://drive.google.com/open?id=1S6DmBSPDqqoGf8g0y6GKBcZfOAmegnBM

bellow are the fitting of all the sensors with default method (in red) and mine (in orange)