MAVLINKHUD

Overview

The ARSPD parameter group configures the hardware interface and signal processing for Airspeed Sensors (Pitot Tubes). ArduPilot supports multiple redundant airspeed sensors (ARSPD, ARSPD2, etc.).

Accurate airspeed data is vital for:

  1. Energy Management: Efficient climbing and cruising (TECS).
  2. Stall Prevention: Flying at optimal angle of attack.
  3. Wind Estimation: Calculating wind speed and direction by comparing Airspeed vector vs. Ground Speed (GPS) vector.

Key Concepts

1. Sensor Selection (ARSPD_TYPE)

Tells the driver which sensor hardware is connected.

  • 1 (Analog): Older MPXV7002DP sensors connected to an ADC pin.
  • 2 (I2C - MS4525): The standard digital sensor for Pixhawk (MS4525DO).
  • 3 (I2C - MS5525): Higher resolution digital sensor.
  • 6 (I2C - SDP3x): Sensirion SDP3x (very high sensitivity, requires 0 calibration).
  • 8 (DroneCAN): UAVCAN/DroneCAN sensors.

2. Calibration (ARSPD_RATIO / ARSPD_AUTOCAL)

  • Ratio: Adjusts the scaling between pressure (Pa) and speed (m/s) to account for pitot tube placement errors (position error).
  • Autocal: If enabled, the autopilot automatically adjusts the Ratio during flight by comparing GPS ground speed and Airspeed during loiter turns.

3. Tube Order (ARSPD_TUBE_ORDR)

Digital differential pressure sensors are directional. If your airspeed reads negative when blowing into the pitot tube, you can flip this parameter instead of physically swapping the silicone tubes.

Parameter Breakdown

  • ARSPD_USE: Enable/Disable using this sensor for flight control.
  • ARSPD_TYPE: Driver type.
  • ARSPD_BUS: I2C bus number (0, 1, 2).
  • ARSPD_PIN: (Analog only) ADC Pin number.
  • ARSPD_RATIO: Calibration factor (Default ~2.0 for MS4525).
  • ARSPD_AUTOCAL: Enable in-flight learning.

Integration Guide

Pre-Flight Check

  1. Cover: Ensure pitot tube is uncovered.
  2. Calibrate: Perform "Preflight Calibration" in GCS to zero the pressure offset.
  3. Blow Test: Gently blow into the pitot tube. Speed should rise positive. If negative, toggle ARSPD_TUBE_ORDR.

Tuning

  1. Enable Autocal: Set ARSPD_AUTOCAL = 1.
  2. Fly: Loiter in circles for 5 minutes.
  3. Verify: Check if ARSPD_RATIO has converged to a stable value.
  4. Lock: Set ARSPD_AUTOCAL = 0 once tuned to prevent bad learning in turbulent conditions.

Developer Notes

  • Library: libraries/AP_Airspeed
  • Redundancy: The AP_Airspeed library manages sensor switching and health monitoring (stuck pressure detection).
  • Primary: ARSPD_PRIMARY selects which sensor instance (0, 1, 2) is fed to the EKF.

ARSPD2_AUTOCAL

Default 0
Range null

Automatic airspeed ratio calibration

Note: This parameter functions identically to ARSPD_AUTOCAL.

ARSPD2_BUS

Default 1
Range null

Airspeed I2C bus

Note: This parameter functions identically to ARSPD_BUS.

ARSPD2_DEVID

Default 0
Range null

Airspeed ID

Note: This parameter functions identically to ARSPD_DEVID.

ARSPD2_OFFSET

Default 0
Range null

Airspeed offset

Note: This parameter functions identically to ARSPD_OFFSET.

ARSPD2_PIN

Default 0
Range null

Airspeed pin

Note: This parameter functions identically to ARSPD_PIN.

ARSPD2_PSI_RANGE

Default PSI_RANGE_DEFAULT
Range null

The PSI range of the device

Note: This parameter functions identically to ARSPD_PSI_RANGE.

ARSPD2_RATIO

Default 2
Range null

Airspeed ratio

Note: This parameter functions identically to ARSPD_RATIO.

ARSPD2_SKIP_CAL

Default 0
Range null

Skip airspeed offset calibration on startup

Note: This parameter functions identically to ARSPD_SKIP_CAL.

ARSPD2_TUBE_ORDR

Default 2
Range null

Control pitot tube order

Note: This parameter functions identically to ARSPD_TUBE_ORDR.

ARSPD2_TYPE

Default 0
Range null

Airspeed type

Note: This parameter functions identically to ARSPD_TYPE.

ARSPD2_USE

Default 0
Range null

Airspeed use

Note: This parameter functions identically to ARSPD_USE.

ARSPD3_AUTOCAL

Default 0
Range null

Automatic airspeed ratio calibration

Note: This parameter functions identically to ARSPD_AUTOCAL.

ARSPD3_BUS

Default 1
Range null

Airspeed I2C bus

Note: This parameter functions identically to ARSPD_BUS.

ARSPD3_DEVID

Default 0
Range null

Airspeed ID

Note: This parameter functions identically to ARSPD_DEVID.

ARSPD3_OFFSET

Default 0
Range null

Airspeed offset

Note: This parameter functions identically to ARSPD_OFFSET.

ARSPD3_PIN

Default 0
Range null

Airspeed pin

Note: This parameter functions identically to ARSPD_PIN.

ARSPD3_PSI_RANGE

Default PSI_RANGE_DEFAULT
Range null

The PSI range of the device

Note: This parameter functions identically to ARSPD_PSI_RANGE.

ARSPD3_RATIO

Default 2
Range null

Airspeed ratio

Note: This parameter functions identically to ARSPD_RATIO.

ARSPD3_SKIP_CAL

Default 0
Range null

Skip airspeed offset calibration on startup

Note: This parameter functions identically to ARSPD_SKIP_CAL.

ARSPD3_TUBE_ORDR

Default 2
Range null

Control pitot tube order

Note: This parameter functions identically to ARSPD_TUBE_ORDR.

ARSPD3_TYPE

Default 0
Range null

Airspeed type

Note: This parameter functions identically to ARSPD_TYPE.

ARSPD3_USE

Default 0
Range null

Airspeed use

Note: This parameter functions identically to ARSPD_USE.

ARSPD4_AUTOCAL

Default 0
Range null

Automatic airspeed ratio calibration

Note: This parameter functions identically to ARSPD_AUTOCAL.

ARSPD4_BUS

Default 1
Range null

Airspeed I2C bus

Note: This parameter functions identically to ARSPD_BUS.

ARSPD4_DEVID

Default 0
Range null

Airspeed ID

Note: This parameter functions identically to ARSPD_DEVID.

ARSPD4_OFFSET

Default 0
Range null

Airspeed offset

Note: This parameter functions identically to ARSPD_OFFSET.

ARSPD4_PIN

Default 0
Range null

Airspeed pin

Note: This parameter functions identically to ARSPD_PIN.

ARSPD4_PSI_RANGE

Default PSI_RANGE_DEFAULT
Range null

The PSI range of the device

Note: This parameter functions identically to ARSPD_PSI_RANGE.

ARSPD4_RATIO

Default 2
Range null

Airspeed ratio

Note: This parameter functions identically to ARSPD_RATIO.

ARSPD4_SKIP_CAL

Default 0
Range null

Skip airspeed offset calibration on startup

Note: This parameter functions identically to ARSPD_SKIP_CAL.

ARSPD4_TUBE_ORDR

Default 2
Range null

Control pitot tube order

Note: This parameter functions identically to ARSPD_TUBE_ORDR.

ARSPD4_TYPE

Default 0
Range null

Airspeed type

Note: This parameter functions identically to ARSPD_TYPE.

ARSPD4_USE

Default 0
Range null

Airspeed use

Note: This parameter functions identically to ARSPD_USE.

ARSPD5_AUTOCAL

Default 0
Range null

Automatic airspeed ratio calibration

Note: This parameter functions identically to ARSPD_AUTOCAL.

ARSPD5_BUS

Default 1
Range null

Airspeed I2C bus

Note: This parameter functions identically to ARSPD_BUS.

ARSPD5_DEVID

Default 0
Range null

Airspeed ID

Note: This parameter functions identically to ARSPD_DEVID.

ARSPD5_OFFSET

Default 0
Range null

Airspeed offset

Note: This parameter functions identically to ARSPD_OFFSET.

ARSPD5_PIN

Default 0
Range null

Airspeed pin

Note: This parameter functions identically to ARSPD_PIN.

ARSPD5_PSI_RANGE

Default PSI_RANGE_DEFAULT
Range null

The PSI range of the device

Note: This parameter functions identically to ARSPD_PSI_RANGE.

ARSPD5_RATIO

Default 2
Range null

Airspeed ratio

Note: This parameter functions identically to ARSPD_RATIO.

ARSPD5_SKIP_CAL

Default 0
Range null

Skip airspeed offset calibration on startup

Note: This parameter functions identically to ARSPD_SKIP_CAL.

ARSPD5_TUBE_ORDR

Default 2
Range null

Control pitot tube order

Note: This parameter functions identically to ARSPD_TUBE_ORDR.

ARSPD5_TYPE

Default 0
Range null

Airspeed type

Note: This parameter functions identically to ARSPD_TYPE.

ARSPD5_USE

Default 0
Range null

Airspeed use

Note: This parameter functions identically to ARSPD_USE.

ARSPD6_AUTOCAL

Default 0
Range null

Automatic airspeed ratio calibration

Note: This parameter functions identically to ARSPD_AUTOCAL.

ARSPD6_BUS

Default 1
Range null

Airspeed I2C bus

Note: This parameter functions identically to ARSPD_BUS.

ARSPD6_DEVID

Default 0
Range null

Airspeed ID

Note: This parameter functions identically to ARSPD_DEVID.

ARSPD6_OFFSET

Default 0
Range null

Airspeed offset

Note: This parameter functions identically to ARSPD_OFFSET.

ARSPD6_PIN

Default 0
Range null

Airspeed pin

Note: This parameter functions identically to ARSPD_PIN.

ARSPD6_PSI_RANGE

Default PSI_RANGE_DEFAULT
Range null

The PSI range of the device

Note: This parameter functions identically to ARSPD_PSI_RANGE.

ARSPD6_RATIO

Default 2
Range null

Airspeed ratio

Note: This parameter functions identically to ARSPD_RATIO.

ARSPD6_SKIP_CAL

Default 0
Range null

Skip airspeed offset calibration on startup

Note: This parameter functions identically to ARSPD_SKIP_CAL.

ARSPD6_TUBE_ORDR

Default 2
Range null

Control pitot tube order

Note: This parameter functions identically to ARSPD_TUBE_ORDR.

ARSPD6_TYPE

Default 0
Range null

Airspeed type

Note: This parameter functions identically to ARSPD_TYPE.

ARSPD6_USE

Default 0
Range null

Airspeed use

Note: This parameter functions identically to ARSPD_USE.

ARSPD_AUTOCAL

Default 0
Range 0 1

Automatic airspeed ratio calibration (ARSPD_AUTOCAL)

Description

A feature that dynamically tunes the ARSPD_RATIO during flight by comparing groundspeed and estimated wind to measured airspeed.

Tuning & Behavior

  • Default Value: 0 (Disabled)
  • Should be disabled once the ratio has converged to a stable value.

ARSPD_BUS

Default 1
Range 0 3

Airspeed I2C bus (ARSPD_BUS)

Description

Selects the I2C physical bus on which the digital airspeed sensor is located.

Tuning & Behavior

  • Default Value: 1
  • May not match the labels on the flight controller board.

ARSPD_DEVID

Default 0

Airspeed ID (ARSPD_DEVID)

Description

Automatically detected sensor hardware ID.

Tuning & Behavior

  • Default Value: 0
  • ReadOnly: True

ARSPD_ENABLE

Default 0
Range 0 1

Airspeed Enable (ARSPD_ENABLE)

Description

Global master switch to enable the airspeed sensor library.

Tuning & Behavior

  • Default Value: 0 (Disabled)
  • Values: 0:Disable, 1:Enable
  • Requires reboot to take effect.

ARSPD_OFFSET

Default 0

Airspeed offset (ARSPD_OFFSET)

Description

Stored calibration value for the pressure sensor's zero-point.

Tuning & Behavior

  • Default Value: 0
  • Usually set automatically during the "Preflight Calibration" process with the pitot tube covered.

ARSPD_OFF_PCNT

%
Default 0
Range 0.0 10.0

Maximum offset cal speed error (ARSPD_OFF_PCNT)

Description

Safety threshold to detect if an airspeed calibration was performed incorrectly (e.g., pitot tube not covered).

Tuning & Behavior

  • Default Value: 0 (Disabled)
  • Range: 0.0 to 10.0 %

ARSPD_OPTIONS

Default 11

Airspeed options (ARSPD_OPTIONS)

Description

Advanced configuration bitmask for airspeed sensor health monitoring and EKF consistency checks.

Tuning & Behavior

  • Default Value: 11 (SpeedMismatchDisable | AllowSpeedMismatchRecovery | UseEkf3Consistency)
  • Bitmask:
    • 0: SpeedMismatchDisable (Mark unhealthy on large groundspeed mismatch)
    • 1: AllowSpeedMismatchRecovery (Mark healthy if mismatch resolves)
    • 2: DisableVoltageCorrection
    • 3: UseEkf3Consistency (Require airspeed to match EKF estimated wind)
    • 4: Report cal offset to GCS

ARSPD_PIN

Default 0

Airspeed pin (ARSPD_PIN)

Description

Specifies the analog input pin used for analog airspeed sensors.

Tuning & Behavior

  • Default Value: 0
  • Common Values: 2:Pixhawk/Pixracer, 13:Pixhawk2_PM2, 14:CubeOrange
  • Only relevant if ARSPD_TYPE is set to 2 (Analog).

ARSPD_PRIMARY

Default 0
Range 0 1

Primary airspeed sensor (ARSPD_PRIMARY)

Description

Selects the primary sensor for flight control in dual-airspeed configurations.

Tuning & Behavior

  • Default Value: 0 (First Sensor)
  • Values: 0:FirstSensor, 1:2ndSensor

ARSPD_PSI_RANGE

PSI
Default 1.0

PSI range of the device (ARSPD_PSI_RANGE)

Description

The pressure range of the airspeed sensor hardware.

Tuning & Behavior

  • Default Value: 1.0 PSI
  • Do not change this unless required by the specific sensor datasheet (e.g., DLVR sensors).

ARSPD_RATIO

Default 2.0
Range 1.5 3.0

Airspeed ratio (ARSPD_RATIO)

Description

Scaling factor used to convert measured differential pressure into airspeed. It accounts for pitot tube design and placement.

Tuning & Behavior

  • Default Value: 2.0
  • Range: 1.5 to 3.0
  • Can be automatically tuned using ARSPD_AUTOCAL.

ARSPD_SKIP_CAL

Default 0
Range 0 1

Skip airspeed offset calibration on startup (ARSPD_SKIP_CAL)

Description

Saves time during boot by skipping the zero-airspeed pressure calibration.

Tuning & Behavior

  • Default Value: 0 (Always calibrate)
  • Only recommended if your sensor has very low drift and you cannot easily cover the pitot tube during boot.
  • Requires a prior successful manual calibration.

ARSPD_TUBE_ORDR

Default 2
Range 0 2

Control pitot tube order (ARSPD_TUBE_ORDR)

Description

Defines which pressure port (stagnation vs static) is connected to which sensor input.

Tuning & Behavior

  • Default Value: 2 (Auto Detect)
  • Values: 0:Normal, 1:Swapped, 2:Auto Detect
  • Set to 0 or 1 if the sensor consistently reports negative airspeed on the ground.

ARSPD_TYPE

Default 0

Airspeed type (ARSPD_TYPE)

Description

Enables and selects the hardware type for the primary airspeed sensor.

Tuning & Behavior

  • Default Value: 0 (None)
  • Common Values: 1:I2C-MS4525D0, 2:Analog, 3:I2C-MS5525, 6:I2C-SDP3X, 8:DroneCAN, 100:SITL
  • Requires reboot to initialize the driver.

ARSPD_USE

Default 0
Range 0 2

Airspeed use (ARSPD_USE)

Description

Determines if the measured airspeed is used by the flight controller for autonomous speed and altitude management (TECS).

Tuning & Behavior

  • Default Value: 0 (DoNotUse - Logging only)
  • Values: 0:DoNotUse, 1:Use, 2:UseWhenZeroThrottle
  • Set to 1 only after verifying the sensor is healthy and properly calibrated.

ARSPD_WIND_GATE

Default 5.0
Range 0.0 10.0

Re-enable Consistency Check Gate Size (ARSPD_WIND_GATE)

Description

Sensitivity of the logic that re-enables a previously failed airspeed sensor once its readings return to a statistically consistent range.

Tuning & Behavior

  • Default Value: 5.0
  • Range: 0.0 to 10.0
  • Higher values make re-enabling easier but carry higher risk of using bad data.

ARSPD_WIND_MAX

m/s
Default 0
Range 0 127

Maximum airspeed and ground speed difference (ARSPD_WIND_MAX)

Description

Sanity check threshold comparing reported airspeed to groundspeed. If the difference is physically impossible (given known wind limits), the sensor is flagged as failed.

Tuning & Behavior

  • Default Value: 0 (Disabled)
  • Range: 0 to 127 m/s
  • Works in conjunction with ARSPD_OPTIONS bit 0.

ARSPD_WIND_WARN

m/s
Default 0
Range 0 127

Airspeed and GPS speed difference warning (ARSPD_WIND_WARN)

Description

Threshold for issuing a non-fatal warning about suspected airspeed sensor inaccuracies compared to GPS groundspeed.

Tuning & Behavior

  • Default Value: 0 (Disabled)
  • Range: 0 to 127 m/s