# esp32_BNO08x: include/BNO08xGlobalTypes.hpp File Reference

Loading...
Searching...
No Matches
BNO08xGlobalTypes.hpp File Reference
`#include <math.h>`
`#include <inttypes.h>`
`#include <stdint.h>`
`#include <cstring>`
`#include <driver/gpio.h>`
`#include <driver/spi_common.h>`
`#include <driver/spi_master.h>`
`#include "sh2_SensorValue.h"`
Include dependency graph for BNO08xGlobalTypes.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes

struct | bno08x_config_t
| IMU configuration settings passed into constructor. More...
struct | bno08x_quat_t
| Struct to represent unit quaternion. More...
struct | bno08x_euler_angle_t
| Struct to represent euler angle (units in degrees or rads) More...
struct | bno08x_ang_vel_t
| Struct to represent angular velocity (units in rad/s) More...
struct | bno08x_magf_t
| Struct to represent magnetic field data (units in uTesla) More...
struct | bno08x_magf_bias_t
| Struct to represent magnetic field bias data (units in uTesla) More...
struct | bno08x_gyro_t
| Struct to represent gyro data (units in rad/s) More...
struct | bno08x_gyro_bias_t
| Struct to represent gyro bias data (units in rad/s) More...
struct | bno08x_activity_classifier_t
| Struct to represent activity classifier data. More...
struct | bno08x_tap_detector_t
| Struct to represent tap detector data (flag meaning: 0 = no tap, 1 = positive tap on axis, -1 = negative tap on axis) More...
struct | bno08x_shake_detector_t
| Struct to represent shake detector data (flag meaning: 0 = no shake 1 = shake detected) More...
struct | bno08x_accel_t
| Struct to represent acceleration data from acceleration, linear acceleration, and gravity reports. More...
struct | bno08x_step_counter_t
| Struct to represent step counter data from step counter reports. More...
struct | bno08x_raw_gyro_t
| Struct to represent raw mems gyro data from raw gyro reports (units in ADC counts). More...
struct | bno08x_raw_accel_t
| Struct to represent raw mems accelerometer data from raw accelerometer reports (units in ADC counts). More...
struct | bno08x_raw_magf_t
| Struct to represent raw mems magnetometer data from raw magnetometer reports (units in ADC counts). More...
struct | bno08x_stability_classifier_t
| Struct to represent stability classifier data from stability classifier reports. More...
struct | bno08x_sample_counts_t
| Struct to represent sample counts, returned from BNO08xRpt::get_sample_counts() More...
struct | bno08x_meta_data_t
| Struct to represent sensor/report meta data, returned from BNO08xRpt::get_meta_data() More...

## Macros

#define | TAP_DETECTED_X_AXIS(tap) ((tap) & (1U << 0U) ? 1 : 0)
#define | TAP_DETECTED_X_AXIS_POSITIVE(tap) ((tap) & (1U << 1U) ? 1 : 0)
#define | TAP_DETECTED_Y_AXIS(tap) ((tap) & (1U << 2U) ? 1 : 0)
#define | TAP_DETECTED_Y_AXIS_POSITIVE(tap) ((tap) & (1U << 3U) ? 1 : 0)
#define | TAP_DETECTED_Z_AXIS(tap) ((tap) & (1U << 4U) ? 1 : 0)
#define | TAP_DETECTED_Z_AXIS_POSITIVE(tap) ((tap) & (1U << 5U) ? 1 : 0)
#define | TAP_DETECTED_DOUBLE(tap) ((tap) & (1U << 6U) ? 1 : 0)
#define | SHAKE_DETECTED_X(tap) ((tap) & (1U << 0U) ? 1 : 0)
#define | SHAKE_DETECTED_Y(tap) ((tap) & (1U << 1U) ? 1 : 0)
#define | SHAKE_DETECTED_Z(tap) ((tap) & (1U << 2U) ? 1 : 0)

## Typedefs

typedef struct bno08x_config_t | bno08x_config_t
| IMU configuration settings passed into constructor.
typedef bno08x_config_t | imu_config_t
using | IMUAccuracy = BNO08xAccuracy
typedef struct bno08x_quat_t | bno08x_quat_t
| Struct to represent unit quaternion.
typedef struct bno08x_euler_angle_t | bno08x_euler_angle_t
| Struct to represent euler angle (units in degrees or rads)
typedef struct bno08x_ang_vel_t | bno08x_ang_vel_t
| Struct to represent angular velocity (units in rad/s)
typedef struct bno08x_magf_t | bno08x_magf_t
| Struct to represent magnetic field data (units in uTesla)
typedef struct bno08x_magf_bias_t | bno08x_magf_bias_t
| Struct to represent magnetic field bias data (units in uTesla)
typedef struct bno08x_gyro_t | bno08x_gyro_t
| Struct to represent gyro data (units in rad/s)
typedef struct bno08x_gyro_bias_t | bno08x_gyro_bias_t
| Struct to represent gyro bias data (units in rad/s)
typedef struct bno08x_activity_classifier_t | bno08x_activity_classifier_t
| Struct to represent activity classifier data.
typedef struct bno08x_tap_detector_t | bno08x_tap_detector_t
| Struct to represent tap detector data (flag meaning: 0 = no tap, 1 = positive tap on axis, -1 = negative tap on axis)
typedef struct bno08x_shake_detector_t | bno08x_shake_detector_t
| Struct to represent shake detector data (flag meaning: 0 = no shake 1 = shake detected)
typedef struct bno08x_accel_t | bno08x_accel_t
| Struct to represent acceleration data from acceleration, linear acceleration, and gravity reports.
typedef struct bno08x_step_counter_t | bno08x_step_counter_t
| Struct to represent step counter data from step counter reports.
typedef struct bno08x_raw_gyro_t | bno08x_raw_gyro_t
| Struct to represent raw mems gyro data from raw gyro reports (units in ADC counts).
typedef struct bno08x_raw_accel_t | bno08x_raw_accel_t
| Struct to represent raw mems accelerometer data from raw accelerometer reports (units in ADC counts).
typedef struct bno08x_raw_magf_t | bno08x_raw_magf_t
| Struct to represent raw mems magnetometer data from raw magnetometer reports (units in ADC counts).
typedef struct bno08x_stability_classifier_t | bno08x_stability_classifier_t
| Struct to represent stability classifier data from stability classifier reports.
typedef struct bno08x_sample_counts_t | bno08x_sample_counts_t
| Struct to represent sample counts, returned from BNO08xRpt::get_sample_counts()
typedef struct bno08x_meta_data_t | bno08x_meta_data_t
| Struct to represent sensor/report meta data, returned from BNO08xRpt::get_meta_data()

## Enumerations

enum class | BNO08xCalSel { accelerometer = SH2_CAL_ACCEL , gyro = SH2_CAL_GYRO , magnetometer = SH2_CAL_MAG , planar_accelerometer = SH2_CAL_PLANAR , all = (SH2_CAL_ACCEL | SH2_CAL_GYRO | SH2_CAL_MAG | SH2_CAL_PLANAR) }
enum class | BNO08xResetReason { UNDEFINED , POR , INT_RST , WTD , EXT_RST , OTHER }
| Reason for previous IMU reset (returned by get_reset_reason()) More...
enum class | BNO08xAccuracy { UNRELIABLE , LOW , MED , HIGH , UNDEFINED }
| Sensor accuracy returned from input reports, corresponds to status bits (see ref. manual 6.5.1) More...
enum class | BNO08xActivityEnable { UNKNOWN = (1U << 0U) , IN_VEHICLE = (1U << 1U) , ON_BICYCLE = (1U << 2U) , ON_FOOT = (1U << 3U) , STILL = (1U << 4U) , TILTING = (1U << 5U) , WALKING = (1U << 6U) , RUNNING = (1U << 7U) , ON_STAIRS = (1U << 8U) , ALL = 0x1FU }
| BNO08xActivity Classifier enable bits passed to enable_activity_classifier() More...
enum class | BNO08xActivity { UNKNOWN = 0 , IN_VEHICLE = 1 , ON_BICYCLE = 2 , ON_FOOT = 3 , STILL = 4 , TILTING = 5 , WALKING = 6 , RUNNING = 7 , ON_STAIRS = 8 , UNDEFINED = 9 }
| BNO08xActivity states returned from BNO08x::activity_classifier.get() More...
enum class | BNO08xStability { UNKNOWN = 0 , ON_TABLE = 1 , STATIONARY = 2 , STABLE = 3 , MOTION = 4 , RESERVED = 5 , UNDEFINED = 6 }
| BNO08xStability states returned from BNO08x::stability_classifier.get() More...

## Variables

static const constexpr uint8_t | TOTAL_RPT_COUNT = 38
| Amount of possible reports returned from BNO08x.

## Detailed Description

Author
  Myles Parfeniuk

## Macro Definition Documentation

## SHAKE_DETECTED_X

#define SHAKE_DETECTED_X | ( |  | tap | ) | ((tap) & (1U << 0U) ? 1 : 0)

## SHAKE_DETECTED_Y

#define SHAKE_DETECTED_Y | ( |  | tap | ) | ((tap) & (1U << 1U) ? 1 : 0)

## SHAKE_DETECTED_Z

#define SHAKE_DETECTED_Z | ( |  | tap | ) | ((tap) & (1U << 2U) ? 1 : 0)

## TAP_DETECTED_DOUBLE

#define TAP_DETECTED_DOUBLE | ( |  | tap | ) | ((tap) & (1U << 6U) ? 1 : 0)

## TAP_DETECTED_X_AXIS

#define TAP_DETECTED_X_AXIS | ( |  | tap | ) | ((tap) & (1U << 0U) ? 1 : 0)

## TAP_DETECTED_X_AXIS_POSITIVE

#define TAP_DETECTED_X_AXIS_POSITIVE | ( |  | tap | ) | ((tap) & (1U << 1U) ? 1 : 0)

## TAP_DETECTED_Y_AXIS

#define TAP_DETECTED_Y_AXIS | ( |  | tap | ) | ((tap) & (1U << 2U) ? 1 : 0)

## TAP_DETECTED_Y_AXIS_POSITIVE

#define TAP_DETECTED_Y_AXIS_POSITIVE | ( |  | tap | ) | ((tap) & (1U << 3U) ? 1 : 0)

## TAP_DETECTED_Z_AXIS

#define TAP_DETECTED_Z_AXIS | ( |  | tap | ) | ((tap) & (1U << 4U) ? 1 : 0)

## TAP_DETECTED_Z_AXIS_POSITIVE

#define TAP_DETECTED_Z_AXIS_POSITIVE | ( |  | tap | ) | ((tap) & (1U << 5U) ? 1 : 0)

## Typedef Documentation

## bno08x_accel_t

typedef struct bno08x_accel_t bno08x_accel_t

Struct to represent acceleration data from acceleration, linear acceleration, and gravity reports.

## bno08x_activity_classifier_t

typedef struct bno08x_activity_classifier_t bno08x_activity_classifier_t

Struct to represent activity classifier data.

## bno08x_ang_vel_t

typedef struct bno08x_ang_vel_t bno08x_ang_vel_t

Struct to represent angular velocity (units in rad/s)

## bno08x_config_t

typedef struct bno08x_config_t bno08x_config_t

IMU configuration settings passed into constructor.

## bno08x_euler_angle_t

typedef struct bno08x_euler_angle_t bno08x_euler_angle_t

Struct to represent euler angle (units in degrees or rads)

## bno08x_gyro_bias_t

typedef struct bno08x_gyro_bias_t bno08x_gyro_bias_t

Struct to represent gyro bias data (units in rad/s)

## bno08x_gyro_t

typedef struct bno08x_gyro_t bno08x_gyro_t

Struct to represent gyro data (units in rad/s)

## bno08x_magf_bias_t

typedef struct bno08x_magf_bias_t bno08x_magf_bias_t

Struct to represent magnetic field bias data (units in uTesla)

## bno08x_magf_t

typedef struct bno08x_magf_t bno08x_magf_t

Struct to represent magnetic field data (units in uTesla)

## bno08x_meta_data_t

typedef struct bno08x_meta_data_t bno08x_meta_data_t

Struct to represent sensor/report meta data, returned from BNO08xRpt::get_meta_data()

## bno08x_quat_t

typedef struct bno08x_quat_t bno08x_quat_t

Struct to represent unit quaternion.

## bno08x_raw_accel_t

typedef struct bno08x_raw_accel_t bno08x_raw_accel_t

Struct to represent raw mems accelerometer data from raw accelerometer reports (units in ADC counts).

## bno08x_raw_gyro_t

typedef struct bno08x_raw_gyro_t bno08x_raw_gyro_t

Struct to represent raw mems gyro data from raw gyro reports (units in ADC counts).

## bno08x_raw_magf_t

typedef struct bno08x_raw_magf_t bno08x_raw_magf_t

Struct to represent raw mems magnetometer data from raw magnetometer reports (units in ADC counts).

## bno08x_sample_counts_t

typedef struct bno08x_sample_counts_t bno08x_sample_counts_t

Struct to represent sample counts, returned from BNO08xRpt::get_sample_counts()

## bno08x_shake_detector_t

typedef struct bno08x_shake_detector_t bno08x_shake_detector_t

Struct to represent shake detector data (flag meaning: 0 = no shake 1 = shake detected)

## bno08x_stability_classifier_t

typedef struct bno08x_stability_classifier_t bno08x_stability_classifier_t

Struct to represent stability classifier data from stability classifier reports.

## bno08x_step_counter_t

typedef struct bno08x_step_counter_t bno08x_step_counter_t

Struct to represent step counter data from step counter reports.

## bno08x_tap_detector_t

typedef struct bno08x_tap_detector_t bno08x_tap_detector_t

Struct to represent tap detector data (flag meaning: 0 = no tap, 1 = positive tap on axis, -1 = negative tap on axis)

## imu_config_t

typedef bno08x_config_t imu_config_t

## IMUAccuracy

using IMUAccuracy = BNO08xAccuracy

## Enumeration Type Documentation

## BNO08xAccuracy

enum class BNO08xAccuracy

strong

Sensor accuracy returned from input reports, corresponds to status bits (see ref. manual 6.5.1)

Enumerator
UNRELIABLE |
LOW |
MED |
HIGH |
UNDEFINED |

## BNO08xActivity

enum class BNO08xActivity

strong

BNO08xActivity states returned from BNO08x::activity_classifier.get()

Enumerator
UNKNOWN |
IN_VEHICLE |
ON_BICYCLE |
ON_FOOT |
STILL |
TILTING |
WALKING |
RUNNING |
ON_STAIRS |
UNDEFINED |

## BNO08xActivityEnable

enum class BNO08xActivityEnable

strong

BNO08xActivity Classifier enable bits passed to enable_activity_classifier()

Enumerator
UNKNOWN |
IN_VEHICLE |
ON_BICYCLE |
ON_FOOT |
STILL |
TILTING |
WALKING |
RUNNING |
ON_STAIRS |
ALL |

## BNO08xCalSel

enum class BNO08xCalSel

strong

Enumerator
accelerometer |
gyro |
magnetometer |
planar_accelerometer |
all |

## BNO08xResetReason

enum class BNO08xResetReason

strong

Reason for previous IMU reset (returned by get_reset_reason())

Enumerator
UNDEFINED | Undefined reset reason, this should never occur and is an error.
POR | Previous reset was due to power on reset.
INT_RST | Previous reset was due to internal reset.
WTD | Previous reset was due to watchdog timer.
EXT_RST | Previous reset was due to external reset.
OTHER | Previous reset was due to power other reason.

## BNO08xStability

enum class BNO08xStability

strong

BNO08xStability states returned from BNO08x::stability_classifier.get()

Enumerator
UNKNOWN |
ON_TABLE |
STATIONARY |
STABLE |
MOTION |
RESERVED |
UNDEFINED |

## Variable Documentation

## TOTAL_RPT_COUNT

const constexpr uint8_t TOTAL_RPT_COUNT = 38

staticconstexpr

Amount of possible reports returned from BNO08x.