PX4/Flow — pull request #5 by bn999 (2013-08-20 22:31:08+00:00)
Title: Kalman based filters require the noise around zero not be truncated

When using the optical flow output of the sensor module as observations of state in any sort of Kalman filter, the discontinuity caused by this condition tends to cause state divergence as the output measurements approach or hover around zero setting up estimated state oscillations.

This change is a quick fix for the problem and has been tested and shown to resolve the issue in my use case. Although this may not be the ideal solution, it is intended to open discussion so that a final fix can be formulated.

The first question is:

Is there any justification for the raw pixel output to be forced to zero if a seemingly ad hoc histogram peak level is not detected when the user has requested the FLOW_HIST_FILTER be turned off?