37#define M_PI 3.14159265358979323846f
356 MagnetometerData() :
magnetic_field{0, 0, 0},
raw{0, 0, 0},
temperature{0},
heading{0},
heading_degrees{0},
overflow{false},
skip_data{false} {}
SensorType
Enumeration of sensor types.
@ MULTI_AXIS
Multi-axis sensor.
@ HUMIDITY
Humidity sensor.
@ GYROSCOPE
Gyroscope sensor.
@ PRESSURE
Pressure sensor.
@ UNKNOWN
Unknown sensor type.
@ ACCELEROMETER
Accelerometer sensor.
@ TEMPERATURE
Temperature sensor.
@ MAGNETOMETER
Magnetometer sensor.
OperationMode
Enumeration of sensor operation modes.
@ LPF_2
2 Hz low-pass filter
@ LPF_4
4 Hz low-pass filter
@ LPF_16
16 Hz low-pass filter
@ LPF_8
8 Hz low-pass filter
@ LPF_1
1 Hz low-pass filter
SensorRemap
Enumeration representing different remapping options for the sensor's orientation.
@ BOTTOM_LAYER_BOTTOM_RIGHT_CORNER
@ BOTTOM_LAYER_TOP_RIGHT_CORNER
@ TOP_LAYER_BOTTOM_LEFT_CORNER
@ BOTTOM_LAYER_TOP_LEFT_CORNER
@ BOTTOM_LAYER_BOTTOM_LEFT_CORNER
@ TOP_LAYER_BOTTOM_RIGHT_CORNER
GyroFullScaleRange
Enumeration of gyroscope full-scale range settings.
@ FS_4000_DPS
±4000 °/s (if supported)
AccelFullScaleRange
Enumeration of accelerometer full-scale range settings.
InterruptPinMap
Enumeration of interrupt pin mapping options.
@ DISABLE
Disable interrupt output.
TapEvent
Generic tap event type.
MagFullScaleRange
Enumeration defining full-scale range settings for the sensor.
MagDownSampleRatio
Enumeration defining down-sample ratios for the sensor.
@ DSR_8
8x down-sample ratio
@ DSR_2
2x down-sample ratio
@ DSR_4
4x down-sample ratio
@ DSR_1
1x down-sample ratio
MagOverSampleRatio
Enumeration defining over-sample ratios for the sensor.
@ OSR_8
8x over-sample ratio
@ OSR_4
4x over-sample ratio
@ OSR_2
2x over-sample ratio
@ OSR_1
1x over-sample ratio
Structure representing accelerometer data.
SensorVector mps2
Acceleration in meters per second squared (m/s²)
float temperature
Temperature in degrees Celsius (if available)
RawVector raw
Raw sensor values in LSB (least significant bits)
Structure representing gyroscope data.
float temperature
Temperature in °C (if available)
SensorVector dps
Angular velocity in degrees per second (°/s)
RawVector raw
Raw sensor values in LSB.
Structure representing magnetometer data.
float heading_degrees
heading angle (degrees)
float heading
heading angle (radians)
bool skip_data
skip data flag
SensorVector magnetic_field
magnetic field strength (Gauss)
float temperature
temperature (°C)
bool overflow
data overflow flag
Structure representing a raw 3D vector with 16-bit integer components.
int16_t x
X-axis raw value.
int16_t y
Y-axis raw value.
int16_t z
Z-axis raw value.
Structure representing sensor configuration parameters.
SensorConfig(SensorType type, float range, float sample_rate, uint32_t latency, OperationMode mode)
uint32_t latency
Reporting latency in milliseconds.
float sample_rate
Sample rate in Hz.
float range
Measurement range.
SensorType type
Type of the sensor.
OperationMode mode
Operation mode.
Structure containing sensor identification information.
uint8_t version
Hardware/firmware version.
uint8_t i2c_address
Default I2C address.
uint32_t uid
Unique identifier.
SensorType type
Sensor type.
const char * manufacturer
Manufacturer name.
const char * model
Model name/identifier.
Structure representing a 3D vector with floating-point components.