MAVLINKHUD

Overview

The LEAD parameter group (specifically LEAD_RLL and LEAD_PTCH) configures the legacy Lead Filter.

Key Concepts

1. GPS Lag Compensation

Before the invention of high-frequency GPS (10Hz+) and modern EKF (Kalman Filters), ArduPilot used a "Lead Filter" to project the vehicle's position forward in time. This compensated for the inherent 1-second lag found in old NMEA GPS receivers.

Developer Notes

  • Status: Legacy. These parameters have essentially no effect when using modern EKF2 or EKF3 estimators, as the EKF handles sensor delay compensation internally with much higher precision.

LEAD_PTCH: Mount Pitch stabilization lead time

Description

Servo mount pitch angle output leads the vehicle angle by this amount of time based on current pitch rate. Increase until the servo is responsive but does not overshoot.

Values

  • Range: 0.0 to 0.2
  • Units: s
  • Increment: 0.005
  • Default: 0.0f

Description

This parameter is a feed-forward term for the camera mount's stabilization. It helps compensate for servo lag.

  • How it works: It uses the vehicle's current pitch rate (degrees per second) to predict where the pitch angle will be in LEAD_PTCH seconds and drives the servo to that future position immediately.
  • Tuning:
    • Too Low: The camera mount reacts too slowly to vehicle pitch changes (video looks shaky/laggy).
    • Too High: The camera mount over-corrects or jitters (overshoot).

Source Code

ardupilot/libraries/AP_Mount/AP_Mount_Params.cpp

LEAD_RLL: Mount Roll stabilization lead time

Description

Servo mount roll angle output leads the vehicle angle by this amount of time based on current roll rate. Increase until the servo is responsive but does not overshoot.

Values

  • Range: 0.0 to 0.2
  • Units: s
  • Increment: 0.005
  • Default: 0.0f

Description

This parameter is a feed-forward term for the camera mount's roll stabilization. It helps compensate for servo lag during rolling maneuvers.

  • How it works: It uses the vehicle's current roll rate (degrees per second) to predict where the roll angle will be in LEAD_RLL seconds and drives the servo to that future position immediately.
  • Tuning:
    • Too Low: The camera mount reacts too slowly to vehicle roll changes.
    • Too High: The camera mount over-corrects or jitters.

Source Code

ardupilot/libraries/AP_Mount/AP_Mount_Params.cpp