MAVLINKHUD

Airspeed Sensors (Pitot)

Executive Summary

For fixed-wing aircraft, Airspeed is life. While GPS gives "Ground Speed", only a Pitot Tube measures "Airspeed" (the speed of air over the wings). ArduPilot uses this to manage energy (TECS) and prevent stalls.

Architecture (The Engineer's View)

1. The Physics (ARSPD_RATIO)

A Pitot tube measures Differential Pressure (Dynamic Pressure).

  • Formula: Pressure = 0.5 * Density * Velocity^2.
  • ArduPilot: Airspeed = sqrt(Pressure) * ARSPD_RATIO.
  • Calibration: The ARSPD_RATIO accounts for tube length, sensor sensitivity, and air density. If this is wrong, the airspeed reading is wrong.

2. Auto Calibration (ARSPD_AUTOCAL)

ArduPilot can learn the ARSPD_RATIO in flight.

  • Logic: It uses a 3-state Kalman Filter (Wind North, Wind East, Ratio).
  • Maneuver: By flying in a circle, the ground speed changes (Headwind vs Tailwind), but the True Airspeed should stay relatively constant.
  • Solver: The filter adjusts the RATIO until the calculated Wind Vector is consistent throughout the turn.
  • Code Path: Airspeed_Calibration::update().

3. Failure Detection (The Clog Check)

A clogged pitot tube is dangerous.

  • Scenario: Tube blocked -> Airspeed = 0 -> Autopilot thinks "Stall!" -> Pitches down -> Crashes.
  • Detection: The EKF monitors the consistency between GPS Speed and Airspeed.
    • If GroundSpeed > 5 but Airspeed < 2, the sensor is flagged "Unhealthy".
    • Action: The plane switches to "Synthetic Airspeed" (Dead Reckoning using GroundSpeed - EstimatedWind).

Key Parameters

Parameter Default Description
ARSPD_USE 1 1=Use for flight control. 0=Log only.
ARSPD_AUTOCAL 0 0=Disabled, 1=Enable In-Flight Learning.
ARSPD_RATIO 2.0 Calibration factor. Typical range 1.5 - 3.0.

Source Code Reference

Practical Guide: The Loiter Calibration

Never trust the default ARSPD_RATIO. Calibrate it on the first flight.

Step 1: Configuration

  • Set ARSPD_AUTOCAL = 1.
  • Take off in FBWA or Manual.

Step 2: The Maneuver

  1. Climb to a safe altitude.
  2. Switch to Loiter mode.
  3. Let the plane fly 5-6 complete circles.
    • Why? This exposes the plane to the wind from all angles. The EKF compares Ground Speed (GPS) vs Airspeed (Pitot) to solve for Wind Speed and Sensor Error.
  4. Watch the GCS messages. You might see "Airspeed Calibration: Ratio 2.1".

Step 3: Save and Disable

  1. Land.
  2. Set ARSPD_AUTOCAL = 0.
  3. Check ARSPD_RATIO: If it is between 1.5 and 3.0, it's good. If it's 6.0, check for leaks in your tubing.