✅ Rangefinder directly overrides barometer when in
range
✅ Prevents powered crash into ground (Scenario
2)
⚠️ Cannot prevent early flare causing long landing (Scenario
1)
✅ 6m rangefinder is sufficient for safety
When rangefinder in range (≤6m):
landing_height = rangefinder_altitude (NOT barometer!)
When rangefinder NOT in range (>6m):
landing_height = barometer_altitude (can be wrong!)
| Scenario | Baro Error | Result | Danger Level |
|---|---|---|---|
| Baro reads LOW (-20m) | Thinks underground | ⚠️ Flares early → LONG landing | Low (needs long runway) |
| Baro reads HIGH (+20m) | Thinks too high | ❌ Continues powered descent | HIGH (crash risk) |
LAND_FLARE_ALT or
rangefinder < flare altTECS_LAND_SINK
rate# Enable rangefinder for landing
RNGFND_LANDING = 1 # or 3 for both up/down
# Flare triggers (conservative for 6m sensor)
LAND_FLARE_ALT = 10 # meters (must be < sensor range!)
LAND_FLARE_SEC = 2.0 # seconds
# Landing behavior
TECS_LAND_SINK = 0.25 # final descent rate (m/s)
TECS_LAND_THR = 30 # approach throttle (%)
LAND_SLOPE_RCALC = 2.0 # allow slope adjustment
# Safety
LAND_DISARMDELAY = 20 # auto-disarm delay (seconds)Pre-approach WP: 400-600m from touchdown, 40-60m altitude
Final approach WP: 200-300m from touchdown, 20-30m altitude
NAV_LAND: 0m altitude (touchdown point)
WP1: Pre-approach (500m, 50m alt)
WP2: Final approach (250m, 25m alt) ← Last WP before landing
WP3: NAV_LAND (0m, 0m alt) ← Touchdown point
| Problem | Likely Cause | Solution |
|---|---|---|
| Lands 200m long | Baro reads LOW / Early flare | Long runway or pre-calibrate baro |
| Hard landing / crash | Baro reads HIGH / Late flare | Rangefinder should prevent! Check
RNGFND_LANDING |
| Overshoots waypoints | Too fast / tight spacing | Space waypoints wider |
| Flares too late | LAND_FLARE_ALT too low |
Increase to 10-15m |
| Flares too early | LAND_FLARE_ALT too high |
Decrease to 5-8m (but riskier!) |
For long missions (200km+) where baro drift exceeds rangefinder range:
1. Descend on approach until rangefinder triggers
2. Note rangefinder altitude (e.g., 6m)
3. Pull up to safe altitude
4. Recalibrate barometer: baro_offset = -20m (or whatever error detected)
5. Execute actual landing with corrected baroThis ensures barometer matches reality within rangefinder range.
✅ DO: - Use shallow glide slopes (3-6°) - Set
LAND_FLARE_ALT within rangefinder range (< 6m sensor →
use 3-5m) - Plan for long runways (300-500m minimum) - Test landing at
home field first - Enable RNGFND_LANDING
❌ DON’T: - Land without rangefinder on long
missions - Use steep glide slopes (>10°) - Set
LAND_FLARE_ALT > rangefinder range - Arm in hot vehicle
after cold transport (baro drift!) - Skip testing with telemetry
monitoring
Key files in ArduPilot source: - ArduPlane/altitude.cpp
- Rangefinder correction logic -
libraries/AP_Landing/AP_Landing_Slope.cpp - Flare trigger
logic - ArduPlane/commands_logic.cpp - Landing
verification
Formula:
landing_height = baro_altitude - (baro_altitude - rangefinder_altitude)
Your 6m rangefinder provides excellent crash prevention for the dangerous scenario (baro reads high). The limitation is it cannot prevent early flare when baro reads low, resulting in long landings. Solution: use long runways or pre-landing calibration scripts.
Bottom line: The rangefinder is asymmetric protection - great at preventing crashes, limited at preventing overshoots.