Files
PX4-Autopilot/msg/Airspeed.msg
T
Mahima Yoga f16f99d4b5 feat(sensors): support multiple airspeed sensors (#28832)
* feat(lib/sensor_calibration): add differential pressure calibration

Airspeed sensors had a single global zero offset, so a second or third
sensor could not be calibrated.

Link the calibration to the sensor's device ID, following the existing
barometer and magnetometer pattern, so the offsets stay bound to physical
sensors rather than to uORB instance order.

Signed-off-by: mahima-yoga <mahima@auterion.com>

* feat(sensors): support multiple airspeed sensors

The airspeed selector has always been able to validate and fail over
between three airspeed sensors, but nothing ever produced more than one.

Give each differential pressure sensor its own VehicleAirspeed item,
which owns its calibration, validator and airspeed publication, following the
VehicleIMU pattern.

Airspeed carries the device ID of the sensor it came from, so consumers
can tell the instances apart. The calibration routine now calibrates every
connected sensor.

Signed-off-by: mahima-yoga <mahima@auterion.com>

* refactor(sensors)!: replace SENS_DPRES_OFF with per-sensor calibration

SENS_DPRES_OFF applied one zero offset to whichever airspeed sensor
happened to come first, which cannot work once there is more than one
sensor. It is superseded by CAL_DPRESx_OFF.

BREAKING CHANGE: SENS_DPRES_OFF is removed. Ground stations that read it
to decide whether airspeed has been calibrated must check CAL_DPRES0_ID
instead, matching how CAL_MAG0_ID, CAL_GYRO0_ID and CAL_ACC0_ID are
already used.

Signed-off-by: mahima-yoga <mahima@auterion.com>

* feat(logger): log all airspeed and differential pressure instances

The airspeed selector supports up to three airspeed sensors, but the
logger only recorded one airspeed instance and two differential pressure
instances.

Signed-off-by: mahima-yoga <mahima@auterion.com>

* fix(commander): stop airspeed calibration consuming a new slot each time

Signed-off-by: mahima-yoga <mahima@auterion.com>

* fix(sensors): give the analogue airspeed sensor a device ID

Signed-off-by: mahima-yoga <mahima@auterion.com>

* fix(boards): keep the airspeed conversion in ITCM

Signed-off-by: mahima-yoga <mahima@auterion.com>

* refactor(sensors): initialise airspeed instances outside the main loop

Signed-off-by: mahima-yoga <mahima@auterion.com>

* chore(sensors): correct the copyright year on the new CMakeLists

Signed-off-by: mahima-yoga <mahima@auterion.com>

* refactor(airspeed_selector): share the airspeed sensor count constant

Signed-off-by: mahima-yoga <mahima@auterion.com>

* docs(sensor_calibration): explain the unusable calibration slot guard

Signed-off-by: mahima-yoga <mahima@auterion.com>

* fix(sensors): keep SENS_DPRES_OFF as a mirror of the first sensor

Signed-off-by: mahima-yoga <mahima@auterion.com>

---------

Signed-off-by: mahima-yoga <mahima@auterion.com>
2026-10-12 10:51:22 +02:00

12 lines
733 B
Plaintext

# Airspeed data from sensors
#
# This is published by airspeed sensor drivers, CAN airspeed sensors, simulators.
# It is subscribed by the airspeed selector module, which validates the data from multiple sensors and passes on a single estimation to the EKF, controllers and telemetry providers.
uint64 timestamp # [us] Time since system start
uint64 timestamp_sample # [us] Timestamp of the raw data
uint32 device_id # [-] Unique device ID of the sensor this measurement came from, 0 if unknown
float32 indicated_airspeed_m_s # [m/s] Indicated airspeed
float32 true_airspeed_m_s # [m/s] True airspeed
float32 confidence # [@range 0,1] Confidence value for this sensor