Commit Graph
5 Commits
Author SHA1 Message Date
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
Hamish WilleeandPX4BuildBot 8eb1c6063e Fix up uorb message spacing to add whitespace (#25421)
* Fix up uorb message spacing for already updated messages

* Apply suggestions from code review

---------

Co-authored-by: PX4BuildBot <bot@pixhawk.org>
2025-08-14 19:39:52 +10:00
8b2c0b4250 msg/Airspeed.msg update description to reflect standard
* [Docs] msg/Airspeed.msg - to standard

* Apply suggestions from code review

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>

* Update msg/Airspeed.msg

---------

Co-authored-by: PX4BuildBot <bot@pixhawk.org>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2025-07-23 13:02:31 +02:00
Marco Hauswirth d2cbe10243 Clean up temperature msg fields (#24272)
* remove temp field from airspeed.msg, adjust temp selection

* temp-sensor hirarchy: airspeed, ext. baro, default value

* directly use diff-press or baro temp in true-airspeed  calc

* improve clarity

* add enum for temperature source in VehicleAirData.msg
2025-02-18 13:23:10 +01:00
Daniel Agar cea185268e msg ROS2 compatibility, microdds_client improvements (timesync, reduced code size, added topics, etc), fastrtps purge
- update all msgs to be directly compatible with ROS2
 - microdds_client improvements
   - timesync
   - reduced code size
   - add to most default builds if we can afford it
   - lots of other little changes
 - purge fastrtps (I tried to save this multiple times, but kept hitting roadblocks)
2022-10-19 19:36:47 -04:00