Zoë’s been out several times today; all pretty much identical: she took-off, climbed for a second as programmed, halted at hover but slowly accelerated upwards from the hover to an ever increasing vertical climb; throughout there was nigh on zero horizontal drift. Then I killed the flight before she went too high. And that’s despite the complementary filter I’ve added to try to extract slow gravity drift from the peaks of real acceleration. The complementary filter is just too crude a method – it lags too much for the frequency of filtering I need.
Ideally what I’m looking for is a way to get two accelerometer outputs from the MPU6050: one with a dlpf set to 0.1Hz to get real acceleration filtered out from (gravity + acceleration) and the second one (as now) running 45 or 90Hz to ensure nothing is missed. Realistically that means I need to develop my own dlpf at 0.1Hz with a high cut-off rate.
In the meantime, Zoë’s grounded until I can solve the sensor drift. And before anyone else comments about barometer / altimeter / ultrasonic range finder, yes, I know those will solve the problems easily but within restrictions I’m not willing to accept for the moment.
As a result, this seems like a good point to update the code on GitHub – the main change is the threading model.