Gravity vs. Temperature

Here’s a short and slightly chaotic indoor flight tracking IMU temperature, and the value of earth gravity from the sensors.  It looks like it takes roughly 2.5s for the IMU temperature to stabilize once the props are spinning.

Gravity is only being updated during the RTF time used to bring the motors up to near hover speed before lift off – currently 1.5s.

Gravity vs. Temperature

Gravity vs. Temperature

I think I need to separate the cooling period from the RTF period.  For a few seconds before the flight controller code kicks off, run the props a minimum speed to generate the breeze to cool the IMU.  Then read the base-level gravity at that point.  And then kick off the flight which will take less time as the props will already be half way through the standard RTF spin-up process.

Ignore the spikes in temperature;  the temperature readings are not from the FIFO, they are direct reads of the temperature register, and I’m not using the data ready interrupt to trigger these, so periodically, the temperature register is read at the same time as the IMU is updating it, leading to the spikes.