diydrones/ardupilot — pull request #940 by Supergoldfish (2014-04-02 01:53:16+00:00)
Title: Sonar:  Added analog sonar support

Added sonar support using the AP_Rangfinder_analog class instead of the
Maxbotix class. This brings to same as arduplane and ardurover. This
class is much nicer because we can tweek sonar values through GCS
parameters. Downside is now sonar selection is not trivial, may need to
implement simple config on GCS side or add a wiki for default settings
of most common analog sonars.
-Added enabled(bool) setter function to AP_Rangefinder_analog in order
to dynamically enable and disable sonar with chan7 or chan 8 options
-Added check to sonar health if sonar_alt - baro_alt < 10 meters to
prevent fly aways if sonar failed, or is covered up. **Not tested, needs
testing
-Added sonar_alt and sonar voltage reports to mavlink GCS, now displays
in mission planner correctly.
-User should set max_distance in parameters to appx 60% of max for
reliability reasons, because built in 60% check had to be removed.
-Added voltage report to CLI Test Sonar
-added option in apm_config.h to enable sonar tilt correction if one so
chooses to use this feature.

*Tested on Pixhawk, sonar pin 15 maxbotix MB1240XL, scale factor 2.42
*I don't this will fit on APM anymore?