Skip to content

Airspeed Scale Handling

INFO

This section complements the existing Airspeed Validation documentation.

The airspeed scale is used by PX4 to convert the measured airspeed (indicated airspeed) to the calibrated airspeed. This scale can be set by ASPD_SCALE_n (where n is the sensor number), and logged in AirspeedWind.msg.

Note that the airspeed scale is different from the airspeed sensor offset calibration done on the ground at 0 m/s. The airspeed scale accounts for errors in the airspeed measurement during flight, such as those caused by sensor placement or installation effects.

This topic describes how to set an initial airspeed scale for a new fixed-wing vehicle during its first flight. Correct scale calibration ensures reliable airspeed data, accurate TAS calculation, robust PX4 airspeed validation, and consistent controller performance.

Airspeed in PX4

PX4 handles multiple types of airspeed:

  • IAS (Indicated Airspeed): The raw measurement from the airspeed sensor, directly influenced by sensor characteristics and installation effects (e.g., pitot-static errors).
  • CAS (Calibrated Airspeed): IAS corrected for sensor-specific and installation-related errors.
  • EAS (Equivalent Airspeed): Not explicitly handled by PX4 - Calibrated airspeed corrected for compressibility effects. While PX4 does not currently model EAS separately, this correction is negligible at low speeds and altitudes, so EAS is treated as equivalent to CAS for simplicity.
  • TAS (True Airspeed): CAS adjusted for atmospheric effects such as air pressure and temperature (i.e., altitude and atmospheric conditions).

The standard conversion chain used in PX4 is: IAS → CAS (= EAS) → TAS.

CAS Scale Estimation

PX4 estimates the IAS to CAS scale (referred to as the CAS scale) during flight using GNSS ground speed and wind estimation. To compute the final TAS, standard environment conversions are applied (CAS → TAS).

Important

A GNSS is required for scale estimation.

PX4 uses a two-stage approach to robustly estimate the scale:

  1. Continuous EKF Estimation: A wind estimator constantly compares your measured airspeed against what it expects based on ground velocity (from GNSS) and estimated wind. If there's a consistent bias, it adjusts the scale estimate. The estimated scale is logged in the AirspeedWind.msg as the tas_scale_raw.
  2. Validation: To ensure robustness, PX4 collects airspeed and ground speed data across 12 different heading segments (every 30°). This averages out wind estimation errors. The validated scale is only updated when the new estimate demonstrably reduces the error between predicted and actual ground speeds across all headings. The validated scale is logged in the AirspeedWind.msg as the tas_scale_validated.

Understanding the Scale: Physical Intuition

The CAS scale is essentially a correction factor that accounts for systematic errors in your airspeed sensor installation.

  • A scale of 1.0 means your sensor reads perfectly (no correction needed)
  • A scale > 1.0 (e.g., 1.1) means your sensor under-reads by 10%, so measured airspeed (IAS) must be multiplied by 1.1
  • A scale < 1.0 (e.g., 0.9) means your sensor over-reads by ~11%, so measured airspeed (IAS) must be multiplied by 0.9

What Affects the Airspeed Scale

The primary factor influencing the airspeed scale is sensor placement.

Biased readings can be reflected in the scale estimate for pitot tubes installed:

  • In regions experiencing disturbed flow (commonly near blunt aircraft noses)
  • Near propellers
  • Under aerodynamic surfaces
  • At an angle with respect to the airflow

Symptoms of Incorrect Scale

Symptoms of an incorrectly scaled airspeed measurement include:

  • Stalling or overspeeding
  • Persistent under- or overestimation of the TAS relative to wind-corrected groundspeed
  • False positives or missed detections in airspeed innovation checks
  • Degraded tracking of the rate controllers

During the first flight of a new fixed-wing vehicle, allocate time for the CAS scale to converge to a reasonable initial estimate. Follow these steps:

  1. Set an Initial Scale

    Use a conservative starting point: set the CAS scale (ASPD_SCALE_n) slightly under 1.0 (for example 0.95). This biases the system toward over-speed rather than under-speed, reducing stall risk.

  2. Perform a Flight

    After takeoff, place the vehicle in loiter for about 15 minutes to allow the scale estimation to converge.

  3. Check Scale Convergence

    After the flight, review the estimated scale in logs. Verify that:

    • tas_scale_validated in AirspeedWind.msg converged during flight.
    • true_airspeed_m_s (TAS) in AirspeedValidated.msg is consistent with groundspeed corrected for wind.
  4. Update the Airframe Configuration

    If using an airframe configuration file: update ASPD_SCALE_nwith the estimated CAS scale for future flights. For similar vehicles with similarly mounted sensors, this value is typically a reliable starting point.

INFO

If you are not able to perform the steps outlined above ...

For a quick manual CAS scale estimate, compare groundspeed minus windspeed (from the VehicleLocalPosition and Wind messages, respectively) to indicated airspeed values (in the Airspeed message). The ratio of indicated airspeed to groundspeed minus windspeed can provide a reasonable starting estimate for ASPD_SCALE_n.