mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-15 03:30:35 +08:00
7e0d04e446
The partial derivative of the flow observation with respect to the terrain and height states involve calculating the derivative of 1/x, which is -1/x^2. This function is even, making the estimate diverge in case x (the height above ground) is negative. The solution is to take the derivative of 1/|x|, which is -x/|x|^3 and is an odd function; preserving the sign of x. Note that for positive values of x, the expression reduces to -1/x^2