Skip to content

Conversation

hamishwillee
Copy link
Contributor

This updates the uORB SensorBaro and DifferentialPressure topics to latest docs standard.

There are open issues that need developers input.

Comment on lines +8 to +11
uint32 device_id # [-] Unique device ID for the sensor that does not change between power cycles
float32 differential_pressure_pa # [Pa] Differential pressure reading in Pascals (may be negative)
float32 temperature # [degC] [@invalid NaN if unknown] Temperature
uint32 error_count # [-] Number of errors detected by driver
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, I made these grouped (no inter-line whitespace. It makes it more readable like this, and they share they quality that they carry the raw data.

Note, new unit here is "Pa" for pascals.

uint32 error_count # Number of errors detected by driver
uint32 device_id # [-] Unique device ID for the sensor that does not change between power cycles
float32 differential_pressure_pa # [Pa] Differential pressure reading in Pascals (may be negative)
float32 temperature # [degC] [@invalid NaN if unknown] Temperature
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is marked as NaN if unknown.

  1. is it possible for it to be unknown?
  2. Do the values default to zero on construction? I ask because this is used in SCALED_PRESSURE but might not be populated. That means we need them to be zero on construction to match what MAVLink expects.

uint64 timestamp_sample
# Differential-pressure sensor
#
# ?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do we want to say about this?

Comment on lines +2 to +3
#
# ? This is used in the `SCALED_PRESSURE_n` MAVLink messages (values must be zero-filled).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do we want to say about this? Normally we talk about setters and getters. So something like

Suggested change
#
# ? This is used in the `SCALED_PRESSURE_n` MAVLink messages (values must be zero-filled).
#
# This is populated by barometer drivers. It is used by the EKF2 estimator and published externally via the `SCALED_PRESSURE` (and intances) MAVLink messages,
# Note that values must be zero filled on creation.

Comment on lines 5 to 11
uint64 timestamp # [us] Time since system start
uint64 timestamp_sample # [us] Timestamp of the raw data

float32 pressure # static pressure measurement in Pascals

float32 temperature # temperature in degrees Celsius

uint32 error_count
uint32 device_id # [-] Unique device ID for the sensor that does not change between power cycles
float32 pressure # [Pa] Static pressure measurement
float32 temperature # [degC] Temperature.
uint32 error_count # [-] Number of errors detected by driver.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the same questions from other message.

Mavlink uses fields from this and DifferentialPressure in the Scaled_Pressure message. However if there is a baro but no airspeed sensor, or visa versa the values picked out of the non-existing object need to be zero,.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants