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_RATIOaccounts 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
RATIOuntil 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 > 5butAirspeed < 2, the sensor is flagged "Unhealthy". - Action: The plane switches to "Synthetic Airspeed" (Dead Reckoning using GroundSpeed - EstimatedWind).
- If
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
- Calibration Logic:
Airspeed_Calibration::update()
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
- Climb to a safe altitude.
- Switch to Loiter mode.
- 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.
- Watch the GCS messages. You might see "Airspeed Calibration: Ratio 2.1".
Step 3: Save and Disable
- Land.
- Set
ARSPD_AUTOCAL = 0. - 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.