I am setting up a quadcopter with sonar and flow in LPE.
I am using the latest version with snapdragon flight controller.
My flow is set up by my own with 30Hz with sonar of up to 5 meters.
My problem is that when my copter is at under 2 meters, it is hovering perfectly.
However, at about 3 or higher, it started to oscillate more and more.
Then I take a look at the code of flow in LPE.
I wonder if why they used it to correct velocity, since it magnifies the error after divided by dt, such a small time interval.
I remembered that it used to use accumulated position to correct x and y.
In that logic, my copter could hover in a higher altitude.
so Why not use position or use both position and velocity to correct the states.
Or any other reason for my oscillation?