M5Unit-IMU 0.0.2 git rev:e5b00aa
Loading...
Searching...
No Matches
m5::unit::bmm350::Data Struct Reference

One measurement (12 bytes burst from REG_MAG_X_XLSB, register 0x31): 9 bytes magnetometer (X,Y,Z, 24bit little-endian each) followed by 3 bytes temperature (24bit little-endian) More...

#include <unit_bmm350_data.hpp>

Public Member Functions

Raw ADC values (24bit signed, sign-extended)
int32_t x_raw () const
 Raw magnetometer X.
 
int32_t y_raw () const
 Raw magnetometer Y.
 
int32_t z_raw () const
 Raw magnetometer Z.
 
int32_t temp_raw24 () const
 Raw temperature ADC (24bit, sign-extended)
 
int16_t temp_adc () const
 Raw temperature ADC normalized to 16bit (temp_raw24() >> 8)
 
Compensated values (primary conversion + OTP compensation applied, uT)
float x_ut () const
 Compensated magnetometer X (uT)
 
float y_ut () const
 Compensated magnetometer Y (uT)
 
float z_ut () const
 Compensated magnetometer Z (uT)
 

Public Attributes

std::array< uint8_t, 12 > raw {}
 [0..2] X, [3..5] Y, [6..8] Z, [9..11] temperature
 
otp_compensation_t comp {}
 OTP compensation coefficients used by x_ut()/y_ut()/z_ut()
 

Detailed Description

One measurement (12 bytes burst from REG_MAG_X_XLSB, register 0x31): 9 bytes magnetometer (X,Y,Z, 24bit little-endian each) followed by 3 bytes temperature (24bit little-endian)