Managed to reconfigure it so the camera mounts the right way. That got it an inch higher & eliminated the need to rotate the video. Requiring any kind of processing just to preview the video was a disaster.
Optimized the UARTs so the feedback now goes at 1960Hz instead of 1830Hz. The trick was not doing anything else until the packet was transmitted. More speed came from setting the IMU sample rate divider to 0. It doesn't cause aliasing. It just reads the sample with lower latency. This might have reduced the bobbing slightly.
Another attempt to handle the UART transmitter using interrupts failed. It didn't matter since context switching would count as doing something else while the packet was transmitted. Tried delaying the feedback commands by 1 packet so the next IMU reading could be read before the previous readout's feedback calculations were done. While it would have increased the rate, it would have added latency. The increased latency was a failure.
Finally, extended the motor mixing to allow it to be used for selfies & near the ground. This took a bit of geometry.
Discovered the P & D feedback terms in their only working configuration don't fight each other. D actually adds to P, so fighting terms aren't the reason it undershoots. Tried maximizing P & D with no obvious improvement. Did confirm it slightly undershoots the feedback, leading to bobbing when running.
Tried replacing the traditional IMU blending algorithm, which
...Continue Reading