I think I’m going to have to admit defeat, and accept that true autonomous flight without horizontal drift is just not possible. With 0g offset calibration, it’s close, but that needs doing prior to every flight due to subtle sensor changes between flights; I can hardly take a calibration platform everywhere I take the girls to fly, can I?
This is all due to accelerometer readings being integrated to produce velocities. Any tiny error in accelerometer readings due to minor offset calibration errors results in a permanent velocity error. And even with calibration reducing the error to say 0.015% (10 bytes in 65536 bytes of sample data), the acceleration error is still 0.012ms-2, which over the course of a 10s flight gives a 60cm drift. And the sensor offsets between flights drift more than 10 due to temperature, impacts etc. And the speed of that drift increases linearly over time.
The reason it works (I believe) for off-the-shelf quads is they are only using angles not velocities as their outer PIDs. Angles aren’t integrated long term due to the complementary filter, and so errors do not accumulate. The down side is that the quad will have no resistance to drift caused by external factors like the wind which was one of my primary goals.
The only solution would be a positioning system, like GPS, but with a resolution of at least 10cm – i.e. 100 time finer than GPS – either an external tracking system which follows the quad’s position or an internal tracking system which the quad can determine it’s own position as with Kitty.
Kitty is a crude implementation of some of the very high resolution tracking systems which used video motion processing; video frames are not simple a sequence of photos – each is an just an incremental change to the first frame – essential identifying similar areas in sequential frames, and only saving these increments – i.e. motion tracking between frames. The Rasperry Pi camera can capture this information, and produce an external low (compared to the video resolution) version of this image recognition motion detection like these commercial video frame motion tracking; perhaps that’s what’s next after kitty?