* 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>