MAVLINKHUD

Overview

The HGT parameter group (specifically HGT_OVR or FLOW_HGT_OVR) configures the manual height reference for Optical Flow sensors.

Key Concepts

1. Flow Height Requirement

Optical flow sensors cannot determine absolute speed without knowing the distance to the ground.

  • Normal: The system uses a Rangefinder (Lidar) to get live height data.
  • Override (HGT_OVR): If no rangefinder is present, you can enter a static height (in meters) into this parameter.
  • Warning: If you use an override, the Flow speed calculation will only be accurate when you are flying at exactly that height. If you fly higher, the drone will think it's moving slower than it actually is, potentially causing instability.

Parameter Breakdown

  • HGT_OVR: Static height for flow calculation (meters).
    • 0: Use Rangefinder data (Default).

Developer Notes

  • Library: libraries/AP_OpticalFlow.
  • Usage: Only intended for bench testing or very specific research environments where a fixed altitude is maintained via other means.

HGT_OVR: Height override of sensor above ground

Description

This is used in rover vehicles where the sensor is a fixed height above the ground.

Values

  • Range: 0 to 2
  • Units: m
  • Increment: 0.01
  • Default: 0.0f

Description

For Rovers using an Optical Flow sensor, this parameter tells the autopilot exactly how high the sensor is mounted above the ground.

  • Why it matters: Optical flow sensors measure how fast the texture of the ground moves across their view (angular velocity). To convert this into actual vehicle speed (linear velocity), the autopilot must know the distance to the ground.
  • Calculation: $Velocity = FlowRate \times Height$.
  • Rover vs. Copter: Copters use a rangefinder (Lidar/Sonar) because their height changes. Rovers stay on the ground, so a fixed value can be used instead of a rangefinder.

Source Code

ardupilot/libraries/AP_OpticalFlow/AP_OpticalFlow.cpp