Just done yet another Phoebe rebuild – new motors, new props, replacement legs – none of which are truly necessary but I thought I’d treat her. As a result, a fresh gravity calibration was necessary. The results came out ±1% compared to the previous reading as per usual, but that got me thinking.
The MPU6050 has a temperature sensor, and the specifications show variance of accelerometer and gyro output against temperature. The gyro is calibrated prior to every flight as part of the start-up sequence so not a problem, but I calibrate gravity at home in my 20°C office before taking her out to play in the 10°C park – I wonder how much difference that makes? According to the spec, there’s a ±35mg (milli-g’s) in the X and Y axes offsets, and a ±60mg in the Z axis offsets over a 0°C to 70°C temperature range. Given that my calibration values can easily vary by ±10mg, it’s certainly worth some further investigation.
The forecast for today lay between 5°C first thing in the morning, rising to 12°C mid-afternoon ambient. There’s also the factor of the MPU6050 self-generated heat. So Phoebe spent the day initially in the cold garage, and then moved onto a horizontal sun-bed basking in the spring sunshine in the back-garden under her own green-house cover, and periodically, I’d recalibrate gravity and check her temperature.
Here’s what I found:
Temperature ranges from about 7°C in the garage to 40°C in the greenhouse. And as you can see from the plots, there is non-trivial variation. Given how critical accelerometer readings are for both angle and drift calculations, it only makes sense to update the code to use the trend line equations (courtesy of Excel) instead of the fixed in-office calibration numbers. I’ll give it a go and see if there’s any obvious effect.