Additionally, Terrain Following is supported in autonomous modes using a terrain height data base stored on the autopilot’s SD card and/or obtained real-time from the Ground Control Station.
This page describes the Surface Following setup . For autonomous modes using downloaded data for Terrain Following please see the terrain following for autonomous modes wiki page.
Setup and Configuration¶
- Connect a downward facing lidar or sonar to the vehicle
- If necessary adjust the RNGFND_GAIN parameter to increase or decrease the response to changes in reported altitude from the range finder
- An auxiliary switch (Copter 4.0 and later), or Auxiliary Function Switches (3.6 and earlier), can be configured to turn on/off use of the rangefinder.
How does it work?¶
- When the rangefinder can “see” the ground, the pilot’s throttle stick adjusts the target altitude above the ground (i.e. the attitude corrected distance from the range finder)
- When the vehicle climbs out of the rangefinder’s range the pilot’s stick returns to directly controlling the vehicle’s target climb rate (i.e. EKF estimated climb rate based on barometer and accelerometer). When the vehicle comes back within the range of the ground, the target altitude above the terrain is reset to the current altitude above terrain. For more information, see Understanding Altitude in ArduPilot.