Quadcopter stabilization algorithm

I think I understand. I'm experimenting. My first thought was to focus on the Ameter, even though the calculated velocity will slowly drift after 10 seconds. Because of the time between 1ft changes in position, the velocity will always be rounded greatly until you go very fast, which is not the goal when you're stabilizing a Quad. So I thought, when do you know the speed exactly? When you're going 0, and you have many 0's in a row. When that happens you can reset the velocity calculated by the Ameter to 0. But how do you get it to go 0 speed in the first place? First you have to measure the speed with the Ameter. Which doesn't help because of drift. It's a loop with no solution.

Try again. I'm going to sample the pressure every 1 sec which gives me absolute speed. The last 100-200ms of Accel will not be captured by the last data point so I will use that to adjust the speed. To give me more resolution I will spread out each 1ft move into 2x 0.5 ft changes. This will work great when the speed is in that range. I will always reset the speed to 0,0.5,or 1 ft/sec when it's moving slow, adjust by the last 100ms. When it's moving 0 for 3 in a row, I will assume I am stable and not likely to move again for a bit, or get data from the pressure sensor. Then I will be forced to keep summing the Ameter to get speed, until the pressure sensor gives me another tick. I know all this is hard to understand. Don't even bother until I tell you how well it works! I'll be back soon.