MAVLINKHUD

Overview

The FHLD parameter group configures the behavior of the FlowHold flight mode. This mode uses an Optical Flow sensor and a Rangefinder (Lidar) to hold the vehicle's position without the need for GPS.

It is ideal for indoor flight or flying in "canyons" where GPS is unreliable. FlowHold is different from standard Loiter because it doesn't require a global coordinate lock; it simply tries to keep the ground textures underneath it stationary.

Key Concepts

1. Velocity Control (FHLD_XY_P)

This defines how aggressively the vehicle tries to correct horizontal drift.

  • FHLD_XY_P: Proportional gain. Increase for a "locked-in" feel. Decrease if the vehicle oscillates.

2. Quality Threshold (FHLD_QUAL_MIN)

Optical flow sensors require good lighting and distinct ground texture.

  • FHLD_QUAL_MIN: The minimum "confidence" score from the sensor (0-255). If quality drops below this, the vehicle will revert to Manual (AltHold) control.

3. Braking (FHLD_BRAKE_RATE)

Limits how fast the vehicle slows down when the pilot releases the sticks.

Parameter Breakdown

  • FHLD_XY_P / I: Horizontal position PID gains.
  • FHLD_FILT_HZ: Cutoff frequency for the flow data filter (Hz).
  • FHLD_FLOW_MAX: Maximum expected angular flow rate.

Integration Guide

  1. Hardware: Mount an Optical Flow sensor (e.g., HereFlow) and a Rangefinder.
  2. Calibrate: Ensure the flow sensor is calibrated correctly (rotation and scaling).
  3. Tuning: Start with default gains. If the vehicle drifts in FlowHold, increase FHLD_XY_P.

Developer Notes

  • Library: ArduCopter/mode_flowhold.cpp.
  • Difference: Unlike EKF-based Loiter (which can also use Flow), FlowHold is a simpler, stand-alone mode that works even if the EKF is not fully aligned.

FHLD_BRAKE_RATE

deg/s
Default 8
Range 1 30

FlowHold Braking rate (FHLD_BRAKE_RATE)

Description

Defines the intensity of the automatic braking maneuver in FlowHold mode. Higher values result in a more aggressive stop.

FHLD_FILT_HZ

Hz
Default 5
Range 1 100

FlowHold Filter Frequency (FHLD_FILT_HZ)

Description

Smooths the noisy raw data from the optical flow sensor before it is used by the position controller.

FHLD_FLOW_MAX

Default 0.6
Range 0.1 2.5

FlowHold Flow Rate Max (FHLD_FLOW_MAX)

Description

A safety limit on the optical flow input. This prevents the controller from reacting too aggressively to high flow rates, which can occur when flying very close to the ground.

FHLD_QUAL_MIN

Default 10
Range 0 255

FlowHold Flow quality minimum (FHLD_QUAL_MIN)

Description

Threshold for the optical flow sensor's quality metric. If the sensor reports a quality below this value (due to poor lighting or low texture), the vehicle will fallback to AltHold behavior.

FHLD_XY_FILT_HZ

Hz
Default 5
Range 0 100

FlowHold filter frequency (FHLD_XY_FILT_HZ)

Description

Smoothing filter for the input to the FlowHold PI controller.

FHLD_XY_I

Default 0.1
Range 0.02 1.00

FlowHold I gain (FHLD_XY_I)

Description

Corrects for long-term steady-state drift in FlowHold mode, such as that caused by wind or slight sensor bias.

FHLD_XY_IMAX

cdeg
Default 1000
Range 0 4500

FlowHold Integrator Max (FHLD_XY_IMAX)

Description

Limits the maximum authority of the I-term to prevent "wind-up" and excessive tilt.

FHLD_XY_P

Default 0.2
Range 0.1 6.0

FlowHold P gain (FHLD_XY_P)

Description

Determines the immediate corrective response to position drift in FlowHold mode.