MAVLINKHUD

Overview

The AVD parameter group configures the ADSB Collision Avoidance system. This library uses data from the ADS-B Receiver (ADSB group) to detect manned aircraft on a collision course and automatically take evasive action.

Note: Do not confuse this with AVOID, which handles obstacle avoidance (walls/trees) using Lidar/cameras.

Key Concepts

1. Failsafe vs. Warning

  • Warning (W_ params): When an intruder is detected within the "Warning" radius/time, the GCS triggers an alert ("Traffic!").
  • Failsafe (F_ params): When an intruder breaches the critical "Failsafe" radius/time, the vehicle takes autonomous action.

2. Actions (AVD_F_ACTION)

What to do when a collision is imminent?

  • 0: Disable.
  • 1: Report Only.
  • 2: Climb or Descend (Plane only).
  • 3: RTL.
  • 4: Hover.
  • 5: Loiter.

Parameter Breakdown

  • AVD_ENABLE: Master switch.
  • AVD_W_DIST_XY: Horizontal distance threshold for Warning.
  • AVD_F_DIST_XY: Horizontal distance threshold for Failsafe action.
  • AVD_F_TIME: Time to impact (seconds) threshold for Failsafe.

Integration Guide

  1. Enable: Set AVD_ENABLE = 1.
  2. Define Zones: Set your Warning zone (e.g., 2000m) and Failsafe zone (e.g., 1000m).
  3. Select Action: For Copter, RTL or Loiter is common. For Plane, Climb/Descend tries to change altitude to clear the traffic.

Developer Notes

  • Library: libraries/AP_Avoidance
  • Prefix: AVD_

AVD_ENABLE

Default 0
Range 0 1

Enable Avoidance using ADSB (AVD_ENABLE)

Description

Global master switch for the ADS-B based collision avoidance system.

Tuning & Behavior

  • Default Value: 0 (Disabled)
  • Values: 0:Disabled, 1:Enabled
  • Requires a functional ADS-B receiver (see ADSB_TYPE).

AVD_F_ACTION

Default 1
Range 0 6

Collision Avoidance Behavior (AVD_F_ACTION)

Description

Defines the automatic maneuver the aircraft will perform when it determines that a collision is likely within the F_TIME horizon.

Tuning & Behavior

  • Default Value: 1 (Report)
  • Values: 0:None, 1:Report, 2:Climb Or Descend, 3:Move Horizontally, 4:Move Perpendicularly in 3D, 5:RTL, 6:Hover

AVD_F_ALT_MIN

m
Default 0

ADS-B avoidance minimum altitude (AVD_F_ALT_MIN)

Description

Safety floor for ADS-B avoidance. Avoidance maneuvers are disabled below this altitude to prevent collisions with ground structures or during landing.

Tuning & Behavior

  • Default Value: 0 m (Disabled)
  • Recommended to be set above the local tree line or building height.

AVD_F_DIST_XY

m
Default 300
Range 1 2000

Distance Fail XY (AVD_F_DIST_XY)

Description

Horizontal separation threshold for the "Fail" threat level.

Tuning & Behavior

  • Default Value: 300 m (Plane), 100 m (Copter)
  • Range: 1 to 2000 m

AVD_F_DIST_Z

m
Default 100
Range 1 500

Distance Fail Z (AVD_F_DIST_Z)

Description

Vertical separation threshold for the "Fail" threat level.

Tuning & Behavior

  • Default Value: 100 m
  • Range: 1 to 500 m

AVD_F_RCVRY

Default 2
Range 0 3

Recovery behaviour after a fail event (AVD_F_RCVRY)

Description

Specifies the flight mode or action the aircraft transitions to once a previously detected collision threat has been cleared.

Tuning & Behavior

  • Default Value: 2 (RTL) for Copter, 3 (Resume/Loiter) for Plane
  • Values: 0:Remain in AVOID_ADSB, 1:Resume previous flight mode, 2:RTL, 3:Resume if AUTO else Loiter

AVD_F_TIME

s
Default 30
Range 1 120

Time Horizon Fail (AVD_F_TIME)

Description

The look-ahead time for the "Fail" threat level. If a collision is predicted to occur within this many seconds, the AVD_F_ACTION will be triggered.

Tuning & Behavior

  • Default Value: 30 s
  • A larger value provides more time to react but may lead to more false alarms.

AVD_OBS_MAX

Default 20
Range 1 50

Maximum number of obstacles to track (AVD_OBS_MAX)

Description

Limits the memory and CPU resources spent on tracking distant ADS-B vehicles.

Tuning & Behavior

  • Default Value: 20
  • Range: 1 to 50

AVD_W_ACTION

Default 1
Range 0 1

Collision Avoidance Behavior - Warn (AVD_W_ACTION)

Description

Defines the action taken when a potential collision is detected within the W_TIME horizon.

Tuning & Behavior

  • Default Value: 1 (Report)
  • Values: 0:None, 1:Report
  • Usually set to "Report" to provide situational awareness without taking automatic flight control actions.

AVD_W_DIST_XY

m
Default 1000
Range 1 5000

Distance Warn XY (AVD_W_DIST_XY)

Description

Horizontal separation threshold for the "Warn" threat level.

Tuning & Behavior

  • Default Value: 1000 m (Plane), 300 m (Copter)
  • Range: 1 to 5000 m

AVD_W_DIST_Z

m
Default 300
Range 1 1000

Distance Warn Z (AVD_W_DIST_Z)

Description

Vertical separation threshold for the "Warn" threat level.

Tuning & Behavior

  • Default Value: 300 m
  • Range: 1 to 1000 m

AVD_W_TIME

s
Default 30
Range 1 120

Time Horizon Warn (AVD_W_TIME)

Description

The look-ahead time for the "Warn" threat level. This provides an earlier notification than the "Fail" level.

Tuning & Behavior

  • Default Value: 30 s
  • Range: 1 to 120 s