diydrones/ardupilot — pull request #1686 by priseborough (2014-12-14 04:25:11+00:00)
Title: Enable use of the PX4Flow sensor sonar when no external range finder is present

These patches enable use of the PX4Flow sensors in-built sonar when a separate range finder is not present. Sonar readings have been limited to a valid range of between 0.3 and 2.5 metres based on observed false readings outside this band during flight testing.

This is best used in conjunction with the following PX4Flow firmware that applies a three sample mode filter to the sonar readings.

https://github.com/priseborough/px4flow/tree/kltmodefilter

An executable can be found here:

https://drive.google.com/file/d/0B6YbG6fDf0m4QUxjUjliZlZKSWc/view?usp=sharing

The PX4Flow sonar unit performance over absorbing surfaces such as grass can be very poor which causes the copters height to jump up and down, so this is a stop gap solution to enable users with PX4Flow sensors, but no laser range finder, to get some experience using the new optical flow functionality.