ERDI LRF Specs

Home › Guide › ArduPilot

Using a laser rangefinder with ArduPilot: the parameters that actually matter

Most integration failures are not the sensor. They are orientation, min/max limits, scaling, or expecting a rangefinder to replace an altitude source it cannot replace. This is the short list we would check on any ArduPilot build.

1. Get the sensor described correctly first

ParameterWhat it doesWhere people go wrong
RNGFND1_TYPEDriver for the attached device Picking a driver that matches the protocol but not the frame format — the module answers, the parser reads garbage. If your module speaks a generic serial protocol, the serial/UART driver plus a correct SERIALx_PROTOCOL setting is usually the honest choice.
RNGFND1_ORIENTWhich way the beam points 25 = down, 0 = forward, and so on. Wrong orientation does not fail loudly: the EKF simply receives distances that contradict the rest of the solution and gets rejected, or worse, accepted when they happen to fit.
RNGFND1_MIN_CM / RNGFND1_MAX_CMThe window the autopilot will trust Leaving MAX_CM wider than the module can actually reach means the EKF occasionally accepts a bad return at long range. Set it to what the module really does on your target, not to the datasheet headline.
RNGFND1_GNDCLEARHeight of the sensor above the ground when landed Used to sanity-check zero. Wrong value produces a constant altitude offset that looks like EKF drift.
RNGFND1_SCALINGMultiplier applied to the raw distance Only needed for analog sensors in most builds. Leaving it non-1 on a digital module turns a correct measurement into a wrong one.

2. Can a rangefinder be the only altitude source?

Mechanically yes — EK3_SRC1_POSZ = 2 selects the rangefinder as the position-Z source. Whether it is a good idea is a different question, and it depends on the terrain:

3. The parameter people mix up with it

EK3_RNG_USE_HGT is not a source selector. It is a switch height expressed as a percentage of the rangefinder's maximum range: it tells the EKF to start using the rangefinder for height once the vehicle is below that fraction, while another source remains the primary altitude reference — typically during landing. Set it to −1 and the rangefinder is not used that way at all.

Practical summary: EK3_SRC1_POSZ = 2 makes the rangefinder the altitude source (flat-ground use). EK3_RNG_USE_HGT only governs the "blend it in near the ground" behaviour when something else is primary. They are not alternatives to each other.

4. What the module brings to this

A 905 nm module in the 10–100 m class is the usual choice for landing assistance and low-altitude hold: small, light, 20–200 Hz, centimetre-class resolution. A 1535 nm module is the wrong tool here — you are paying for kilometres of reach you will never use, and the 0.5–10 Hz update rate is worse for a control loop.

If the same airframe also needs terrain or target ranging at hundreds of metres, use two sensors with two driver instances (RNGFND1_* for the downward short-range unit, RNGFND2_* for the long-range one) rather than compromising one.

5. If it does not work, check in this order

  1. Raw distance visible at all? Check wiring, baud, SERIALx_PROTOCOL, and that the module is not in a triggered-only mode.
  2. Raw distance plausible when pointed at a wall at a known distance? If not, it is scaling, units or the wrong driver.
  3. Sign/orientation correct? Point it at the ceiling: the number should change the way the autopilot expects.
  4. Does the EKF accept it? Watch for range-finder innovations being rejected — that is usually MIN/MAX too wide, orientation wrong, or the measurement contradicting a bad barometer offset.
  5. Only then look at the module's own accuracy and update rate.
Tell us the airframe and the height band Landing assist, low-altitude hold, or terrain following — each wants a different module, and we will say which one we would put on the bench. Email tommy@erdimail.com Filter by range and mass

Parameter names follow ArduPilot's Copter documentation; behaviour described is the documented intent, not a substitute for testing your build. ArduPilot is a separate open-source project; we are not affiliated with it.