esp32_BNO08x 1.4 C++ BNO08x IMU driver component for esp-idf.

BNO08xGlobalTypes.hpp
Go to the documentation of this file.
1
6#pragma once
7
8// macros for bno08x_tap_detector_t
9#define TAP_DETECTED_X_AXIS(tap) ((tap) & (1U << 0U) ? 1 : 0)
10#define TAP_DETECTED_X_AXIS_POSITIVE(tap) ((tap) & (1U << 1U) ? 1 : 0)
11#define TAP_DETECTED_Y_AXIS(tap) ((tap) & (1U << 2U) ? 1 : 0)
12#define TAP_DETECTED_Y_AXIS_POSITIVE(tap) ((tap) & (1U << 3U) ? 1 : 0)
13#define TAP_DETECTED_Z_AXIS(tap) ((tap) & (1U << 4U) ? 1 : 0)
14#define TAP_DETECTED_Z_AXIS_POSITIVE(tap) ((tap) & (1U << 5U) ? 1 : 0)
15#define TAP_DETECTED_DOUBLE(tap) ((tap) & (1U << 6U) ? 1 : 0)
16
17// macros for bno08x_shake_detector_t
18#define SHAKE_DETECTED_X(tap) ((tap) & (1U << 0U) ? 1 : 0)
19#define SHAKE_DETECTED_Y(tap) ((tap) & (1U << 1U) ? 1 : 0)
20#define SHAKE_DETECTED_Z(tap) ((tap) & (1U << 2U) ? 1 : 0)
21
22// standard library includes
23#include <math.h>
24#include <inttypes.h>
25#include <stdint.h>
26#include <cstring>
27
28// esp-idf includes
29#include <driver/gpio.h>
30#include <driver/spi_common.h>
31#include <driver/spi_master.h>
32
33// third-party includes
34#include "sh2_SensorValue.h"
35
37 typedef struct bno08x_config_t
38{
39 spi_host_device_t spi_peripheral;
40 gpio_num_t io_mosi;
41 gpio_num_t io_miso;
42 gpio_num_t io_sclk;
43 gpio_num_t io_cs;
44 gpio_num_t io_int;
45 gpio_num_t io_rst;
46 uint32_t sclk_speed;
47 bool install_isr_service;
48
52 bno08x_config_t(bool install_isr_service = true)
53 : spi_peripheral((spi_host_device_t) CONFIG_ESP32_BNO08x_SPI_HOST)
54 , io_mosi(static_cast<gpio_num_t>(CONFIG_ESP32_BNO08X_GPIO_DI)) // default: 23
55 , io_miso(static_cast<gpio_num_t>(CONFIG_ESP32_BNO08X_GPIO_SDA)) // default: 19
56 , io_sclk(static_cast<gpio_num_t>(CONFIG_ESP32_BNO08X_GPIO_SCL)) // default: 18
57 , io_cs(static_cast<gpio_num_t>(CONFIG_ESP32_BNO08X_GPIO_CS)) // default: 33
58 , io_int(static_cast<gpio_num_t>(CONFIG_ESP32_BNO08X_GPIO_HINT)) // default: 26
59 , io_rst(static_cast<gpio_num_t>(CONFIG_ESP32_BNO08X_GPIO_RST)) // default: 32
60 , sclk_speed(static_cast<uint32_t>(CONFIG_ESP32_BNO08X_SCL_SPEED_HZ)) // default: 2MHz
61 , install_isr_service(install_isr_service) // default: true
62
63 {
64 }
65
67 bno08x_config_t(spi_host_device_t spi_peripheral, gpio_num_t io_mosi, gpio_num_t io_miso, gpio_num_t io_sclk,
68 gpio_num_t io_cs, gpio_num_t io_int, gpio_num_t io_rst, uint32_t sclk_speed, bool install_isr_service = true)
69 : spi_peripheral(spi_peripheral)
70 , io_mosi(io_mosi)
71 , io_miso(io_miso)
72 , io_sclk(io_sclk)
73 , io_cs(io_cs)
74 , io_int(io_int)
75 , io_rst(io_rst)
76 , sclk_speed(sclk_speed)
77 , install_isr_service(install_isr_service)
78 {
79 }
80} bno08x_config_t;
81 typedef bno08x_config_t imu_config_t; // legacy version compatibility
82
83 enum class BNO08xCalSel : uint8_t
84{
85 accelerometer = SH2_CAL_ACCEL,
86 gyro = SH2_CAL_GYRO,
87 magnetometer = SH2_CAL_MAG,
88 planar_accelerometer = SH2_CAL_PLANAR,
89 all = (SH2_CAL_ACCEL | SH2_CAL_GYRO | SH2_CAL_MAG | SH2_CAL_PLANAR)
90};
91
93 enum class BNO08xResetReason : uint8_t
94{
95 UNDEFINED,
96 POR,
97 INT_RST,
98 WTD,
99 EXT_RST,
100 OTHER
101};
102
105 enum class BNO08xAccuracy : uint8_t
106{
107 UNRELIABLE,
108 LOW,
109 MED,
110 HIGH,
111 UNDEFINED
112};
113 using IMUAccuracy = BNO08xAccuracy; // legacy version compatibility
114
115 const constexpr char* BNO08xAccuracy_to_str(BNO08xAccuracy accuracy)
116{
117 switch (accuracy)
118 {
119 case BNO08xAccuracy::UNRELIABLE:
120 return "UNRELIABLE";
121 case BNO08xAccuracy::LOW:
122 return "LOW";
123 case BNO08xAccuracy::MED:
124 return "MED";
125 case BNO08xAccuracy::HIGH:
126 return "HIGH";
127 case BNO08xAccuracy::UNDEFINED:
128 return "UNDEFINED";
129 default:
130 return "UNDEFINED";
131 }
132}
133
136 enum class BNO08xActivityEnable : uint32_t
137{
138 UNKNOWN = (1U << 0U),
139 IN_VEHICLE = (1U << 1U),
140 ON_BICYCLE = (1U << 2U),
141 ON_FOOT = (1U << 3U),
142 STILL = (1U << 4U),
143 TILTING = (1U << 5U),
144 WALKING = (1U << 6U),
145 RUNNING = (1U << 7U),
146 ON_STAIRS = (1U << 8U),
147 ALL = (UNKNOWN | IN_VEHICLE | ON_BICYCLE | ON_FOOT | STILL | TILTING | WALKING | RUNNING | ON_STAIRS)
148};
149
151 enum class BNO08xActivity : uint8_t
152{
153 UNKNOWN = 0, // 0 = unknown
154 IN_VEHICLE = 1, // 1 = in vehicle
155 ON_BICYCLE = 2, // 2 = on bicycle
156 ON_FOOT = 3, // 3 = on foot
157 STILL = 4, // 4 = still
158 TILTING = 5, // 5 = tilting
159 WALKING = 6, // 6 = walking
160 RUNNING = 7, // 7 = running
161 ON_STAIRS = 8, // 8 = on stairs
162 UNDEFINED = 9 // used for unit tests
163};
164
170 const constexpr char* BNO08xActivity_to_str(BNO08xActivity activity)
171{
172 switch (activity)
173 {
174 case BNO08xActivity::UNKNOWN:
175 return "UNKNOWN";
176 case BNO08xActivity::IN_VEHICLE:
177 return "IN_VEHICLE";
178 case BNO08xActivity::ON_BICYCLE:
179 return "ON_BICYCLE";
180 case BNO08xActivity::ON_FOOT:
181 return "ON_FOOT";
182 case BNO08xActivity::STILL:
183 return "STILL";
184 case BNO08xActivity::TILTING:
185 return "TILTING";
186 case BNO08xActivity::WALKING:
187 return "WALKING";
188 case BNO08xActivity::RUNNING:
189 return "RUNNING";
190 case BNO08xActivity::ON_STAIRS:
191 return "ON_STAIRS";
192 case BNO08xActivity::UNDEFINED:
193 return "UNDEFINED";
194 default:
195 return "UNDEFINED";
196 }
197}
198
200 enum class BNO08xStability : uint8_t
201{
202 UNKNOWN = 0, // 0 = unknown
203 ON_TABLE = 1, // 1 = on table
204 STATIONARY = 2, // 2 = stationary
205 STABLE = 3, // 3 = stable
206 MOTION = 4, // 4 = in motion
207 RESERVED = 5, // 5 = reserved (not used)
208 UNDEFINED = 6 // used for unit tests
209};
210
216 const constexpr char* BNO08xStability_to_str(BNO08xStability stability)
217{
218 switch (stability)
219 {
220 case BNO08xStability::UNKNOWN:
221 return "UNKNOWN";
222 case BNO08xStability::ON_TABLE:
223 return "ON_TABLE";
224 case BNO08xStability::STATIONARY:
225 return "STATIONARY";
226 case BNO08xStability::STABLE:
227 return "STABLE";
228 case BNO08xStability::MOTION:
229 return "MOTION";
230 case BNO08xStability::RESERVED:
231 return "RESERVED";
232 case BNO08xStability::UNDEFINED:
233 return "UNDEFINED";
234 default:
235 return "UNDEFINED";
236 }
237}
238
239 enum class BNO08xFrsID : uint16_t
240{
241 STATIC_CALIBRATION_AGM = 0x7979,
242 NOMINAL_CALIBRATION = 0x4D4D,
243 STATIC_CALIBRATION_SRA = 0x8A8A,
244 NOMINAL_CALIBRATION_SRA = 0x4E4E,
245 DYNAMIC_CALIBRATION = 0x1F1F,
246 ME_POWER_MGMT = 0xD3E2,
247 SYSTEM_ORIENTATION = 0x2D3E,
248 ACCEL_ORIENTATION = 0x2D41,
249 SCREEN_ACCEL_ORIENTATION = 0x2D43,
250 GYROSCOPE_ORIENTATION = 0x2D46,
251 MAGNETOMETER_ORIENTATION = 0x2D4C,
252 ARVR_STABILIZATION_RV = 0x3E2D,
253 ARVR_STABILIZATION_GRV = 0x3E2E,
254 TAP_DETECT_CONFIG = 0xC269,
255 SIG_MOTION_DETECT_CONFIG = 0xC274,
256 SHAKE_DETECT_CONFIG = 0x7D7D,
257 MAX_FUSION_PERIOD = 0xD7D7,
258 SERIAL_NUMBER = 0x4B4B,
259 ES_PRESSURE_CAL = 0x39AF,
260 ES_TEMPERATURE_CAL = 0x4D20,
261 ES_HUMIDITY_CAL = 0x1AC9,
262 ES_AMBIENT_LIGHT_CAL = 0x39B1,
263 ES_PROXIMITY_CAL = 0x4DA2,
264 ALS_CAL = 0xD401,
265 PROXIMITY_SENSOR_CAL = 0xD402,
266 PICKUP_DETECTOR_CONFIG = 0x1B2A,
267 FLIP_DETECTOR_CONFIG = 0xFC94,
268 STABILITY_DETECTOR_CONFIG = 0xED85,
269 ACTIVITY_TRACKER_CONFIG = 0xED88,
270 SLEEP_DETECTOR_CONFIG = 0xED87,
271 TILT_DETECTOR_CONFIG = 0xED89,
272 POCKET_DETECTOR_CONFIG = 0xEF27,
273 CIRCLE_DETECTOR_CONFIG = 0xEE51,
274 USER_RECORD = 0x74B4,
275 ME_TIME_SOURCE_SELECT = 0xD403,
276 UART_FORMAT = 0xA1A1,
277 GYRO_INTEGRATED_RV_CONFIG = 0xA1A2,
278 META_RAW_ACCELEROMETER = 0xE301,
279 META_ACCELEROMETER = 0xE302,
280 META_LINEAR_ACCELERATION = 0xE303,
281 META_GRAVITY = 0xE304,
282 META_RAW_GYROSCOPE = 0xE305,
283 META_GYROSCOPE_CALIBRATED = 0xE306,
284 META_GYROSCOPE_UNCALIBRATED = 0xE307,
285 META_RAW_MAGNETOMETER = 0xE308,
286 META_MAGNETIC_FIELD_CALIBRATED = 0xE309,
287 META_MAGNETIC_FIELD_UNCALIBRATED = 0xE30A,
288 META_ROTATION_VECTOR = 0xE30B,
289 META_GAME_ROTATION_VECTOR = 0xE30C,
290 META_GEOMAGNETIC_ROTATION_VECTOR = 0xE30D,
291 META_PRESSURE = 0xE30E,
292 META_AMBIENT_LIGHT = 0xE30F,
293 META_HUMIDITY = 0xE310,
294 META_PROXIMITY = 0xE311,
295 META_TEMPERATURE = 0xE312,
296 META_TAP_DETECTOR = 0xE313,
297 META_STEP_DETECTOR = 0xE314,
298 META_STEP_COUNTER = 0xE315,
299 META_SIGNIFICANT_MOTION = 0xE316,
300 META_STABILITY_CLASSIFIER = 0xE317,
301 META_SHAKE_DETECTOR = 0xE318,
302 META_FLIP_DETECTOR = 0xE319,
303 META_PICKUP_DETECTOR = 0xE31A,
304 META_STABILITY_DETECTOR = 0xE31B,
305 META_PERSONAL_ACTIVITY_CLASSIFIER = 0xE31C,
306 META_SLEEP_DETECTOR = 0xE31D,
307 META_TILT_DETECTOR = 0xE31E,
308 META_POCKET_DETECTOR = 0xE31F,
309 META_CIRCLE_DETECTOR = 0xE320,
310 META_HEART_RATE_MONITOR = 0xE321,
311 META_ARVR_STABILIZED_RV = 0xE322,
312 META_ARVR_STABILIZED_GRV = 0xE323,
313 META_GYRO_INTEGRATED_RV = 0xE324
314};
315
316 const constexpr char* BNO08xFrsID_to_str(BNO08xFrsID id)
317{
318 switch (id)
319 {
320 case BNO08xFrsID::STATIC_CALIBRATION_AGM:
321 return "STATIC_CALIBRATION_AGM";
322 case BNO08xFrsID::NOMINAL_CALIBRATION:
323 return "NOMINAL_CALIBRATION";
324 case BNO08xFrsID::STATIC_CALIBRATION_SRA:
325 return "STATIC_CALIBRATION_SRA";
326 case BNO08xFrsID::NOMINAL_CALIBRATION_SRA:
327 return "NOMINAL_CALIBRATION_SRA";
328 case BNO08xFrsID::DYNAMIC_CALIBRATION:
329 return "DYNAMIC_CALIBRATION";
330 case BNO08xFrsID::ME_POWER_MGMT:
331 return "ME_POWER_MGMT";
332 case BNO08xFrsID::SYSTEM_ORIENTATION:
333 return "SYSTEM_ORIENTATION";
334 case BNO08xFrsID::ACCEL_ORIENTATION:
335 return "ACCEL_ORIENTATION";
336 case BNO08xFrsID::SCREEN_ACCEL_ORIENTATION:
337 return "SCREEN_ACCEL_ORIENTATION";
338 case BNO08xFrsID::GYROSCOPE_ORIENTATION:
339 return "GYROSCOPE_ORIENTATION";
340 case BNO08xFrsID::MAGNETOMETER_ORIENTATION:
341 return "MAGNETOMETER_ORIENTATION";
342 case BNO08xFrsID::ARVR_STABILIZATION_RV:
343 return "ARVR_STABILIZATION_RV";
344 case BNO08xFrsID::ARVR_STABILIZATION_GRV:
345 return "ARVR_STABILIZATION_GRV";
346 case BNO08xFrsID::TAP_DETECT_CONFIG:
347 return "TAP_DETECT_CONFIG";
348 case BNO08xFrsID::SIG_MOTION_DETECT_CONFIG:
349 return "SIG_MOTION_DETECT_CONFIG";
350 case BNO08xFrsID::SHAKE_DETECT_CONFIG:
351 return "SHAKE_DETECT_CONFIG";
352 case BNO08xFrsID::MAX_FUSION_PERIOD:
353 return "MAX_FUSION_PERIOD";
354 case BNO08xFrsID::SERIAL_NUMBER:
355 return "SERIAL_NUMBER";
356 case BNO08xFrsID::ES_PRESSURE_CAL:
357 return "ES_PRESSURE_CAL";
358 case BNO08xFrsID::ES_TEMPERATURE_CAL:
359 return "ES_TEMPERATURE_CAL";
360 case BNO08xFrsID::ES_HUMIDITY_CAL:
361 return "ES_HUMIDITY_CAL";
362 case BNO08xFrsID::ES_AMBIENT_LIGHT_CAL:
363 return "ES_AMBIENT_LIGHT_CAL";
364 case BNO08xFrsID::ES_PROXIMITY_CAL:
365 return "ES_PROXIMITY_CAL";
366 case BNO08xFrsID::ALS_CAL:
367 return "ALS_CAL";
368 case BNO08xFrsID::PROXIMITY_SENSOR_CAL:
369 return "PROXIMITY_SENSOR_CAL";
370 case BNO08xFrsID::PICKUP_DETECTOR_CONFIG:
371 return "PICKUP_DETECTOR_CONFIG";
372 case BNO08xFrsID::FLIP_DETECTOR_CONFIG:
373 return "FLIP_DETECTOR_CONFIG";
374 case BNO08xFrsID::STABILITY_DETECTOR_CONFIG:
375 return "STABILITY_DETECTOR_CONFIG";
376 case BNO08xFrsID::ACTIVITY_TRACKER_CONFIG:
377 return "ACTIVITY_TRACKER_CONFIG";
378 case BNO08xFrsID::SLEEP_DETECTOR_CONFIG:
379 return "SLEEP_DETECTOR_CONFIG";
380 case BNO08xFrsID::TILT_DETECTOR_CONFIG:
381 return "TILT_DETECTOR_CONFIG";
382 case BNO08xFrsID::POCKET_DETECTOR_CONFIG:
383 return "POCKET_DETECTOR_CONFIG";
384 case BNO08xFrsID::CIRCLE_DETECTOR_CONFIG:
385 return "CIRCLE_DETECTOR_CONFIG";
386 case BNO08xFrsID::USER_RECORD:
387 return "USER_RECORD";
388 case BNO08xFrsID::ME_TIME_SOURCE_SELECT:
389 return "ME_TIME_SOURCE_SELECT";
390 case BNO08xFrsID::UART_FORMAT:
391 return "UART_FORMAT";
392 case BNO08xFrsID::GYRO_INTEGRATED_RV_CONFIG:
393 return "GYRO_INTEGRATED_RV_CONFIG";
394 case BNO08xFrsID::META_RAW_ACCELEROMETER:
395 return "META_RAW_ACCELEROMETER";
396 case BNO08xFrsID::META_ACCELEROMETER:
397 return "META_ACCELEROMETER";
398 case BNO08xFrsID::META_LINEAR_ACCELERATION:
399 return "META_LINEAR_ACCELERATION";
400 case BNO08xFrsID::META_GRAVITY:
401 return "META_GRAVITY";
402 case BNO08xFrsID::META_RAW_GYROSCOPE:
403 return "META_RAW_GYROSCOPE";
404 case BNO08xFrsID::META_GYROSCOPE_CALIBRATED:
405 return "META_GYROSCOPE_CALIBRATED";
406 case BNO08xFrsID::META_GYROSCOPE_UNCALIBRATED:
407 return "META_GYROSCOPE_UNCALIBRATED";
408 case BNO08xFrsID::META_RAW_MAGNETOMETER:
409 return "META_RAW_MAGNETOMETER";
410 case BNO08xFrsID::META_MAGNETIC_FIELD_CALIBRATED:
411 return "META_MAGNETIC_FIELD_CALIBRATED";
412 case BNO08xFrsID::META_MAGNETIC_FIELD_UNCALIBRATED:
413 return "META_MAGNETIC_FIELD_UNCALIBRATED";
414 case BNO08xFrsID::META_ROTATION_VECTOR:
415 return "META_ROTATION_VECTOR";
416 case BNO08xFrsID::META_GAME_ROTATION_VECTOR:
417 return "META_GAME_ROTATION_VECTOR";
418 case BNO08xFrsID::META_GEOMAGNETIC_ROTATION_VECTOR:
419 return "META_GEOMAGNETIC_ROTATION_VECTOR";
420 case BNO08xFrsID::META_PRESSURE:
421 return "META_PRESSURE";
422 case BNO08xFrsID::META_AMBIENT_LIGHT:
423 return "META_AMBIENT_LIGHT";
424 case BNO08xFrsID::META_HUMIDITY:
425 return "META_HUMIDITY";
426 case BNO08xFrsID::META_PROXIMITY:
427 return "META_PROXIMITY";
428 case BNO08xFrsID::META_TEMPERATURE:
429 return "META_TEMPERATURE";
430 case BNO08xFrsID::META_TAP_DETECTOR:
431 return "META_TAP_DETECTOR";
432 case BNO08xFrsID::META_STEP_DETECTOR:
433 return "META_STEP_DETECTOR";
434 case BNO08xFrsID::META_STEP_COUNTER:
435 return "META_STEP_COUNTER";
436 case BNO08xFrsID::META_SIGNIFICANT_MOTION:
437 return "META_SIGNIFICANT_MOTION";
438 case BNO08xFrsID::META_STABILITY_CLASSIFIER:
439 return "META_STABILITY_CLASSIFIER";
440 case BNO08xFrsID::META_SHAKE_DETECTOR:
441 return "META_SHAKE_DETECTOR";
442 case BNO08xFrsID::META_FLIP_DETECTOR:
443 return "META_FLIP_DETECTOR";
444 case BNO08xFrsID::META_PICKUP_DETECTOR:
445 return "META_PICKUP_DETECTOR";
446 case BNO08xFrsID::META_STABILITY_DETECTOR:
447 return "META_STABILITY_DETECTOR";
448 case BNO08xFrsID::META_PERSONAL_ACTIVITY_CLASSIFIER:
449 return "META_PERSONAL_ACTIVITY_CLASSIFIER";
450 case BNO08xFrsID::META_SLEEP_DETECTOR:
451 return "META_SLEEP_DETECTOR";
452 case BNO08xFrsID::META_TILT_DETECTOR:
453 return "META_TILT_DETECTOR";
454 case BNO08xFrsID::META_POCKET_DETECTOR:
455 return "META_POCKET_DETECTOR";
456 case BNO08xFrsID::META_CIRCLE_DETECTOR:
457 return "META_CIRCLE_DETECTOR";
458 case BNO08xFrsID::META_HEART_RATE_MONITOR:
459 return "META_HEART_RATE_MONITOR";
460 case BNO08xFrsID::META_ARVR_STABILIZED_RV:
461 return "META_ARVR_STABILIZED_RV";
462 case BNO08xFrsID::META_ARVR_STABILIZED_GRV:
463 return "META_ARVR_STABILIZED_GRV";
464 case BNO08xFrsID::META_GYRO_INTEGRATED_RV:
465 return "META_GYRO_INTEGRATED_RV";
466 default:
467 return "UNKNOWN";
468 }
469}
470
472 typedef struct bno08x_quat_t
473{
474 float real;
475 float i;
476 float j;
477 float k;
478 float rad_accuracy;
479 BNO08xAccuracy accuracy;
480
481 bno08x_quat_t()
482 : real(0.0f)
483 , i(0.0f)
484 , j(0.0f)
485 , k(0.0f)
486 , rad_accuracy(0.0f)
487 , accuracy(BNO08xAccuracy::UNDEFINED)
488 {
489 }
490
491 // overloaded assignment operator to handle RV with rad accuracy
492 bno08x_quat_t& operator=(const sh2_RotationVectorWAcc_t& source)
493 {
494 this->real = source.real;
495 this->i = source.i;
496 this->j = source.j;
497 this->k = source.k;
498 this->rad_accuracy = source.accuracy;
499 return *this;
500 }
501
502 // overloaded assignment operator to handle RV with w/o rad accuracy
503 bno08x_quat_t& operator=(const sh2_RotationVector_t& source)
504 {
505 this->real = source.real;
506 this->i = source.i;
507 this->j = source.j;
508 this->k = source.k;
509 this->rad_accuracy = 0.0f;
510 return *this;
511 }
512
513 // overloaded assignment operator to handle IRV report
514 bno08x_quat_t& operator=(const sh2_GyroIntegratedRV_t& source)
515 {
516 this->real = source.real;
517 this->i = source.i;
518 this->j = source.j;
519 this->k = source.k;
520 this->rad_accuracy = 0.0f;
521 return *this;
522 }
523
524} bno08x_quat_t;
525
527 typedef struct bno08x_euler_angle_t
528{
529 float x;
530 float y;
531 float z;
532 float rad_accuracy;
533 BNO08xAccuracy accuracy;
534
535 bno08x_euler_angle_t()
536 : x(0.0f)
537 , y(0.0f)
538 , z(0.0f)
539 , rad_accuracy(0.0f)
540 , accuracy(BNO08xAccuracy::UNDEFINED)
541 {
542 }
543
544 // overloaded = operator for quat to euler conversion
545 bno08x_euler_angle_t& operator=(const bno08x_quat_t& source)
546 {
547 this->x = atan2(2.0f * (source.real * source.i + source.j * source.k),
548 1.0f - 2.0f * (source.i * source.i + source.j * source.j));
549 this->y = asin(2.0f * (source.real * source.j - source.k * source.i));
550 this->z = atan2(2.0f * (source.real * source.k + source.i * source.j),
551 1.0f - 2.0f * (source.j * source.j + source.k * source.k));
552 this->rad_accuracy = source.rad_accuracy;
553 this->accuracy = source.accuracy;
554 return *this;
555 }
556
557 // overloaded *= operator for rad2deg conversions
558 template <typename T>
559 bno08x_euler_angle_t& operator*=(T value)
560 {
561 x *= static_cast<float>(value);
562 y *= static_cast<float>(value);
563 z *= static_cast<float>(value);
564 rad_accuracy *= static_cast<float>(value);
565 return *this;
566 }
567
568} bno08x_euler_angle_t;
569
571 typedef struct bno08x_ang_vel_t
572{
573 float x;
574 float y;
575 float z;
576
577 bno08x_ang_vel_t()
578 : x(0.0f)
579 , y(0.0f)
580 , z(0.0f)
581 {
582 }
583
584 // overloaded *= operator for rad2deg conversions
585 template <typename T>
586 bno08x_ang_vel_t& operator*=(T value)
587 {
588 x *= static_cast<float>(value);
589 y *= static_cast<float>(value);
590 z *= static_cast<float>(value);
591 return *this;
592 }
593
594 // strip sh2_GyroIntegratedRV_t of velocity data for IRV reports
595 bno08x_ang_vel_t& operator=(const sh2_GyroIntegratedRV_t& source)
596 {
597 this->x = source.angVelX;
598 this->y = source.angVelY;
599 this->z = source.angVelZ;
600 return *this;
601 }
602} bno08x_ang_vel_t;
603
605 typedef struct bno08x_magf_t
606{
607 float x;
608 float y;
609 float z;
610 BNO08xAccuracy accuracy;
611
612 bno08x_magf_t()
613 : x(0.0f)
614 , y(0.0f)
615 , z(0.0f)
616 , accuracy(BNO08xAccuracy::UNDEFINED)
617 {
618 }
619
620 // overloaded = operator for sh2_MagneticField_t conversion
621 bno08x_magf_t& operator=(const sh2_MagneticField_t& source)
622 {
623 this->x = source.x;
624 this->y = source.y;
625 this->z = source.z;
626 return *this;
627 }
628
629 // overloaded = operator for sh2_MagneticFieldUncalibrated_t conversion
630 bno08x_magf_t& operator=(const sh2_MagneticFieldUncalibrated_t& source)
631 {
632 this->x = source.x;
633 this->y = source.y;
634 this->z = source.z;
635 return *this;
636 }
637
638} bno08x_magf_t;
639
641 typedef struct bno08x_magf_bias_t
642{
643 float x;
644 float y;
645 float z;
646
647 bno08x_magf_bias_t()
648 : x(0.0f)
649 , y(0.0f)
650 , z(0.0f)
651 {
652 }
653
654 // overloaded = operator for sh2_MagneticFieldUncalibrated_t conversion
655 bno08x_magf_bias_t& operator=(const sh2_MagneticFieldUncalibrated_t& source)
656 {
657 this->x = source.biasX;
658 this->y = source.biasY;
659 this->z = source.biasZ;
660 return *this;
661 }
662
663} bno08x_magf_bias_t;
664
666 typedef struct bno08x_gyro_t
667{
668 float x;
669 float y;
670 float z;
671 BNO08xAccuracy accuracy;
672
673 bno08x_gyro_t()
674 : x(0.0f)
675 , y(0.0f)
676 , z(0.0f)
677 , accuracy(BNO08xAccuracy::UNDEFINED)
678 {
679 }
680
681 // overloaded = operator for sh2_Gyroscope_t conversion
682 bno08x_gyro_t& operator=(const sh2_Gyroscope_t& source)
683 {
684 this->x = source.x;
685 this->y = source.y;
686 this->z = source.z;
687 return *this;
688 }
689
690 // overloaded = operator for sh2_GyroscopeUncalibrated conversion
691 bno08x_gyro_t& operator=(const sh2_GyroscopeUncalibrated& source)
692 {
693 this->x = source.x;
694 this->y = source.y;
695 this->z = source.z;
696 return *this;
697 }
698
699} bno08x_gyro_t;
700
702 typedef struct bno08x_gyro_bias_t
703{
704 float x;
705 float y;
706 float z;
707
708 bno08x_gyro_bias_t()
709 : x(0.0f)
710 , y(0.0f)
711 , z(0.0f)
712 {
713 }
714
715 // overloaded = operator for sh2_GyroscopeUncalibrated conversion
716 bno08x_gyro_bias_t& operator=(const sh2_GyroscopeUncalibrated& source)
717 {
718 this->x = source.biasX;
719 this->y = source.biasY;
720 this->z = source.biasZ;
721 return *this;
722 }
723
724} bno08x_gyro_bias_t;
725
727 typedef struct bno08x_activity_classifier_t
728{
729 uint8_t confidence[10];
730 BNO08xActivity mostLikelyState;
731 BNO08xAccuracy accuracy;
732 uint8_t page;
733 bool lastPage;
734
735 bno08x_activity_classifier_t()
736 : confidence({})
737 , mostLikelyState(BNO08xActivity::UNDEFINED)
738 , accuracy(BNO08xAccuracy::UNDEFINED)
739 , page(0U)
740 , lastPage(false)
741 {
742 }
743
744 // conversion from sh2_PersonalActivityClassifier_t
745 bno08x_activity_classifier_t& operator=(const sh2_PersonalActivityClassifier_t& source)
746 {
747 this->page = source.page;
748 this->lastPage = source.lastPage;
749 this->mostLikelyState = static_cast<BNO08xActivity>(source.mostLikelyState);
750
751 for (int i = 0; i < 10; ++i)
752 this->confidence[i] = source.confidence[i];
753
754 return *this;
755 }
756} bno08x_activity_classifier_t;
757
760 typedef struct bno08x_tap_detector_t
761{
762 int8_t x_flag;
763 int8_t y_flag;
764 int8_t z_flag;
765 bool double_tap;
766 BNO08xAccuracy accuracy;
767
768 bno08x_tap_detector_t()
769 : x_flag(0)
770 , y_flag(0)
771 , z_flag(0)
772 , double_tap(false)
773 , accuracy(BNO08xAccuracy::UNDEFINED)
774 {
775 }
776
777 // overloaded = operator for sh2_GyroscopeUncalibrated conversion
778 bno08x_tap_detector_t& operator=(const sh2_TapDetector_t& source)
779 {
780 if (TAP_DETECTED_X_AXIS(source.flags))
781 this->x_flag = -1;
782 else
783 this->x_flag = 0;
784
785 if (TAP_DETECTED_X_AXIS_POSITIVE(source.flags))
786 this->x_flag = 1;
787
788 if (TAP_DETECTED_Y_AXIS(source.flags))
789 this->y_flag = -1;
790 else
791 this->y_flag = 0;
792
793 if (TAP_DETECTED_Y_AXIS_POSITIVE(source.flags))
794 this->y_flag = 1;
795
796 if (TAP_DETECTED_Z_AXIS(source.flags))
797 this->z_flag = -1;
798 else
799 this->z_flag = 0;
800
801 if (TAP_DETECTED_Z_AXIS_POSITIVE(source.flags))
802 this->z_flag = 1;
803
804 if (TAP_DETECTED_DOUBLE(source.flags))
805 this->double_tap = true;
806 else
807 this->double_tap = false;
808
809 return *this;
810 }
811
812} bno08x_tap_detector_t;
813
815 typedef struct bno08x_shake_detector_t
816{
817 uint8_t x_flag;
818 uint8_t y_flag;
819 uint8_t z_flag;
820 BNO08xAccuracy accuracy;
821
822 bno08x_shake_detector_t()
823 : x_flag(0U)
824 , y_flag(0U)
825 , z_flag(0U)
826 , accuracy(BNO08xAccuracy::UNDEFINED)
827 {
828 }
829
830 // overloaded = operator for sh2_GyroscopeUncalibrated conversion
831 bno08x_shake_detector_t& operator=(const sh2_ShakeDetector_t& source)
832 {
833 if (SHAKE_DETECTED_X(source.shake))
834 this->x_flag = 1U;
835 else
836 this->x_flag = 0U;
837
838 if (SHAKE_DETECTED_Y(source.shake))
839 this->y_flag = 1U;
840 else
841 this->y_flag = 0U;
842
843 if (SHAKE_DETECTED_Z(source.shake))
844 this->z_flag = 1U;
845 else
846 this->z_flag = 0U;
847
848 return *this;
849 }
850
851} bno08x_shake_detector_t;
852
855 typedef struct bno08x_accel_t
856{
857 float x;
858 float y;
859 float z;
860 BNO08xAccuracy accuracy;
861
862 bno08x_accel_t()
863 : x(0.0f)
864 , y(0.0f)
865 , z(0.0f)
866 , accuracy(BNO08xAccuracy::UNDEFINED)
867 {
868 }
869
870 // conversion from sh2_Accelerometer_t
871 bno08x_accel_t& operator=(const sh2_Accelerometer_t& source)
872 {
873 this->x = source.x;
874 this->y = source.y;
875 this->z = source.z;
876 return *this;
877 }
878} bno08x_accel_t;
879
881 typedef struct bno08x_step_counter_t
882{
883 uint32_t latency;
884 uint16_t steps;
885 BNO08xAccuracy accuracy;
886
887 bno08x_step_counter_t()
888 : latency(0UL)
889 , steps(0U)
890 , accuracy(BNO08xAccuracy::UNDEFINED)
891 {
892 }
893
894 // conversion from sh2_StepCounter_t
895 bno08x_step_counter_t& operator=(const sh2_StepCounter_t& source)
896 {
897 this->latency = source.latency;
898 this->steps = source.steps;
899 return *this;
900 }
901} bno08x_step_counter_t;
902
904 typedef struct bno08x_raw_gyro_t
905{
906 uint32_t timestamp_us;
907 int16_t x;
908 int16_t y;
909 int16_t z;
910 int16_t temperature;
911 BNO08xAccuracy accuracy;
912
913 bno08x_raw_gyro_t()
914 : timestamp_us(0UL)
915 , x(0U)
916 , y(0U)
917 , z(0U)
918 , temperature(0U)
919 , accuracy(BNO08xAccuracy::UNDEFINED)
920 {
921 }
922
923 // conversion from sh2_RawGyroscope_t
924 bno08x_raw_gyro_t& operator=(const sh2_RawGyroscope_t& source)
925 {
926 this->x = source.x;
927 this->y = source.y;
928 this->z = source.z;
929 this->temperature = source.temperature;
930 this->timestamp_us = source.timestamp;
931 return *this;
932 }
933} bno08x_raw_gyro_t;
934
937 typedef struct bno08x_raw_accel_t
938{
939 uint32_t timestamp_us;
940 int16_t x;
941 int16_t y;
942 int16_t z;
943 BNO08xAccuracy accuracy;
944
945 bno08x_raw_accel_t()
946 : timestamp_us(0UL)
947 , x(0U)
948 , y(0U)
949 , z(0U)
950 , accuracy(BNO08xAccuracy::UNDEFINED)
951 {
952 }
953
954 // conversion from sh2_RawAccelerometer_t
955 bno08x_raw_accel_t& operator=(const sh2_RawAccelerometer_t& source)
956 {
957 this->x = source.x;
958 this->y = source.y;
959 this->z = source.z;
960 this->timestamp_us = source.timestamp;
961 return *this;
962 }
963} bno08x_raw_accel_t;
964
967 typedef struct bno08x_raw_magf_t
968{
969 uint32_t timestamp_us;
970 int16_t x;
971 int16_t y;
972 int16_t z;
973 BNO08xAccuracy accuracy;
974
975 bno08x_raw_magf_t()
976 : timestamp_us(0UL)
977 , x(0U)
978 , y(0U)
979 , z(0U)
980 , accuracy(BNO08xAccuracy::UNDEFINED)
981 {
982 }
983
984 // conversion from sh2_RawMagnetometer_t
985 bno08x_raw_magf_t& operator=(const sh2_RawMagnetometer_t& source)
986 {
987 this->x = source.x;
988 this->y = source.y;
989 this->z = source.z;
990 this->timestamp_us = source.timestamp;
991 return *this;
992 }
993} bno08x_raw_magf_t;
994
996 typedef struct bno08x_stability_classifier_t
997{
998 BNO08xStability stability;
999 BNO08xAccuracy accuracy;
1000
1001 bno08x_stability_classifier_t()
1002 : stability(BNO08xStability::UNDEFINED)
1003 , accuracy(BNO08xAccuracy::UNDEFINED)
1004 {
1005 }
1006
1007 // conversion from sh2_StabilityClassifier_t
1008 bno08x_stability_classifier_t& operator=(const sh2_StabilityClassifier_t& source)
1009 {
1010 this->stability = static_cast<BNO08xStability>(source.classification);
1011 return *this;
1012 }
1013
1014} bno08x_stability_classifier_t;
1015
1017 typedef struct bno08x_sample_counts_t
1018{
1019 uint32_t offered;
1020 uint32_t on;
1021 uint32_t accepted;
1022 uint32_t
1023 attempted;
1024
1025 bno08x_sample_counts_t()
1026 : offered(0UL)
1027 , on(0UL)
1028 , accepted(0UL)
1029 , attempted(0UL)
1030 {
1031 }
1032
1033 // conversion from sh2_PersonalActivityClassifier_t
1034 bno08x_sample_counts_t& operator=(const sh2_Counts_t& source)
1035 {
1036 this->offered = source.offered;
1037 this->on = source.on;
1038 this->accepted = source.accepted;
1039 this->attempted = source.attempted;
1040
1041 return *this;
1042 }
1043} bno08x_sample_counts_t;
1044
1046 typedef struct bno08x_meta_data_t
1047{
1048 char vendor_ID[48];
1049 uint8_t sensor_specific[48];
1050 uint32_t vendor_id_len;
1051 uint32_t sensor_specific_len;
1052 uint32_t range;
1053 uint32_t resolution;
1054 uint32_t min_period_us;
1055 uint32_t max_period_us;
1056 uint32_t fifo_reserved;
1057 uint32_t fifo_max;
1058 uint32_t batch_buffer_bytes;
1059 uint16_t revision;
1060 uint16_t power_mA;
1061 uint16_t q_point_1;
1062 uint16_t q_point_2;
1063 uint16_t q_point_3;
1064 uint8_t me_version;
1065 uint8_t mh_version;
1066 uint8_t sh_version;
1067
1068
1069 // Default constructor
1070 bno08x_meta_data_t()
1071 : vendor_ID({})
1072 , sensor_specific({})
1073 , vendor_id_len(0)
1074 , sensor_specific_len(0)
1075 , range(0)
1076 , resolution(0)
1077 , min_period_us(0)
1078 , max_period_us(0)
1079 , fifo_reserved(0)
1080 , fifo_max(0)
1081 , batch_buffer_bytes(0)
1082 , revision(0)
1083 , power_mA(0)
1084 , q_point_1(0)
1085 , q_point_2(0)
1086 , q_point_3(0)
1087 , me_version(0)
1088 , mh_version(0)
1089 , sh_version(0)
1090 {
1091 memset(vendor_ID, 0, sizeof(vendor_ID));
1092 memset(sensor_specific, 0, sizeof(sensor_specific));
1093 }
1094
1095 // Conversion constructor from sh2_SensorMetadata_t
1096 bno08x_meta_data_t(const sh2_SensorMetadata_t& src)
1097 {
1098 me_version = src.meVersion;
1099 mh_version = src.mhVersion;
1100 sh_version = src.shVersion;
1101 range = src.range;
1102 resolution = src.resolution;
1103 revision = src.revision;
1104 power_mA = src.power_mA;
1105 min_period_us = src.minPeriod_uS;
1106 max_period_us = src.maxPeriod_uS;
1107 fifo_reserved = src.fifoReserved;
1108 fifo_max = src.fifoMax;
1109 batch_buffer_bytes = src.batchBufferBytes;
1110 q_point_1 = src.qPoint1;
1111 q_point_2 = src.qPoint2;
1112 q_point_3 = src.qPoint3;
1113 vendor_id_len = src.vendorIdLen;
1114 sensor_specific_len = src.sensorSpecificLen;
1115 memcpy(vendor_ID, src.vendorId, vendor_id_len);
1116 memcpy(sensor_specific, src.sensorSpecific, sensor_specific_len);
1117 }
1118} bno08x_meta_data_t;
1119
1120 static const constexpr uint8_t TOTAL_RPT_COUNT = 38;
SHAKE_DETECTED_Y
#define SHAKE_DETECTED_Y(tap)
Definition: BNO08xGlobalTypes.hpp:19
BNO08xActivity_to_str
const constexpr char * BNO08xActivity_to_str(BNO08xActivity activity)
Converts a BNO08xActivity enum to string.
Definition: BNO08xGlobalTypes.hpp:170
bno08x_accel_t
struct bno08x_accel_t bno08x_accel_t
Struct to represent acceleration data from acceleration, linear acceleration, and gravity reports.
bno08x_quat_t
struct bno08x_quat_t bno08x_quat_t
Struct to represent unit quaternion.
bno08x_meta_data_t
struct bno08x_meta_data_t bno08x_meta_data_t
Struct to represent sensor/report meta data, returned from BNO08xRpt::get_meta_data()
BNO08xStability
BNO08xStability
BNO08xStability states returned from BNO08x::stability_classifier.get()
Definition: BNO08xGlobalTypes.hpp:201
BNO08xStability::UNDEFINED
@ UNDEFINED
BNO08xStability::STABLE
@ STABLE
BNO08xStability::STATIONARY
@ STATIONARY
BNO08xStability::UNKNOWN
@ UNKNOWN
BNO08xStability::ON_TABLE
@ ON_TABLE
BNO08xStability::RESERVED
@ RESERVED
BNO08xStability::MOTION
@ MOTION
BNO08xCalSel
BNO08xCalSel
Definition: BNO08xGlobalTypes.hpp:84
BNO08xCalSel::accelerometer
@ accelerometer
BNO08xCalSel::magnetometer
@ magnetometer
BNO08xCalSel::gyro
@ gyro
BNO08xCalSel::all
@ all
BNO08xCalSel::planar_accelerometer
@ planar_accelerometer
bno08x_ang_vel_t
struct bno08x_ang_vel_t bno08x_ang_vel_t
Struct to represent angular velocity (units in rad/s)
TAP_DETECTED_Y_AXIS_POSITIVE
#define TAP_DETECTED_Y_AXIS_POSITIVE(tap)
Definition: BNO08xGlobalTypes.hpp:12
bno08x_magf_bias_t
struct bno08x_magf_bias_t bno08x_magf_bias_t
Struct to represent magnetic field bias data (units in uTesla)
bno08x_raw_gyro_t
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_magf_t
struct bno08x_magf_t bno08x_magf_t
Struct to represent magnetic field data (units in uTesla)
BNO08xActivity
BNO08xActivity
BNO08xActivity states returned from BNO08x::activity_classifier.get()
Definition: BNO08xGlobalTypes.hpp:152
BNO08xActivity::UNDEFINED
@ UNDEFINED
BNO08xActivity::RUNNING
@ RUNNING
BNO08xActivity::WALKING
@ WALKING
BNO08xActivity::UNKNOWN
@ UNKNOWN
BNO08xActivity::TILTING
@ TILTING
BNO08xActivity::ON_FOOT
@ ON_FOOT
BNO08xActivity::STILL
@ STILL
BNO08xActivity::ON_BICYCLE
@ ON_BICYCLE
BNO08xActivity::IN_VEHICLE
@ IN_VEHICLE
BNO08xActivity::ON_STAIRS
@ ON_STAIRS
bno08x_config_t
struct bno08x_config_t bno08x_config_t
IMU configuration settings passed into constructor.
BNO08xActivityEnable
BNO08xActivityEnable
BNO08xActivity Classifier enable bits passed to enable_activity_classifier() See ref manual 6....
Definition: BNO08xGlobalTypes.hpp:137
BNO08xActivityEnable::RUNNING
@ RUNNING
BNO08xActivityEnable::ALL
@ ALL
BNO08xActivityEnable::WALKING
@ WALKING
BNO08xActivityEnable::UNKNOWN
@ UNKNOWN
BNO08xActivityEnable::TILTING
@ TILTING
BNO08xActivityEnable::ON_FOOT
@ ON_FOOT
BNO08xActivityEnable::STILL
@ STILL
BNO08xActivityEnable::ON_BICYCLE
@ ON_BICYCLE
BNO08xActivityEnable::IN_VEHICLE
@ IN_VEHICLE
BNO08xActivityEnable::ON_STAIRS
@ ON_STAIRS
bno08x_raw_magf_t
struct bno08x_raw_magf_t bno08x_raw_magf_t
Struct to represent raw mems magnetometer data from raw magnetometer reports (units in ADC counts).
BNO08xAccuracy
BNO08xAccuracy
Sensor accuracy returned from input reports, corresponds to status bits (see ref. manual 6....
Definition: BNO08xGlobalTypes.hpp:106
BNO08xAccuracy::UNDEFINED
@ UNDEFINED
BNO08xAccuracy::MED
@ MED
BNO08xAccuracy::LOW
@ LOW
BNO08xAccuracy::UNRELIABLE
@ UNRELIABLE
BNO08xAccuracy::HIGH
@ HIGH
TAP_DETECTED_Z_AXIS_POSITIVE
#define TAP_DETECTED_Z_AXIS_POSITIVE(tap)
Definition: BNO08xGlobalTypes.hpp:14
bno08x_activity_classifier_t
struct bno08x_activity_classifier_t bno08x_activity_classifier_t
Struct to represent activity classifier data.
BNO08xFrsID_to_str
const constexpr char * BNO08xFrsID_to_str(BNO08xFrsID id)
Definition: BNO08xGlobalTypes.hpp:316
bno08x_gyro_bias_t
struct bno08x_gyro_bias_t bno08x_gyro_bias_t
Struct to represent gyro bias data (units in rad/s)
bno08x_shake_detector_t
struct bno08x_shake_detector_t bno08x_shake_detector_t
Struct to represent shake detector data (flag meaning: 0 = no shake 1 = shake detected)
TAP_DETECTED_X_AXIS_POSITIVE
#define TAP_DETECTED_X_AXIS_POSITIVE(tap)
Definition: BNO08xGlobalTypes.hpp:10
BNO08xFrsID
BNO08xFrsID
Definition: BNO08xGlobalTypes.hpp:240
BNO08xFrsID::META_GAME_ROTATION_VECTOR
@ META_GAME_ROTATION_VECTOR
BNO08xFrsID::CIRCLE_DETECTOR_CONFIG
@ CIRCLE_DETECTOR_CONFIG
BNO08xFrsID::ES_PROXIMITY_CAL
@ ES_PROXIMITY_CAL
BNO08xFrsID::ES_AMBIENT_LIGHT_CAL
@ ES_AMBIENT_LIGHT_CAL
BNO08xFrsID::META_RAW_GYROSCOPE
@ META_RAW_GYROSCOPE
BNO08xFrsID::SYSTEM_ORIENTATION
@ SYSTEM_ORIENTATION
BNO08xFrsID::SLEEP_DETECTOR_CONFIG
@ SLEEP_DETECTOR_CONFIG
BNO08xFrsID::META_GYROSCOPE_CALIBRATED
@ META_GYROSCOPE_CALIBRATED
BNO08xFrsID::SCREEN_ACCEL_ORIENTATION
@ SCREEN_ACCEL_ORIENTATION
BNO08xFrsID::ARVR_STABILIZATION_GRV
@ ARVR_STABILIZATION_GRV
BNO08xFrsID::META_ARVR_STABILIZED_GRV
@ META_ARVR_STABILIZED_GRV
BNO08xFrsID::META_AMBIENT_LIGHT
@ META_AMBIENT_LIGHT
BNO08xFrsID::ES_HUMIDITY_CAL
@ ES_HUMIDITY_CAL
BNO08xFrsID::MAX_FUSION_PERIOD
@ MAX_FUSION_PERIOD
BNO08xFrsID::META_RAW_ACCELEROMETER
@ META_RAW_ACCELEROMETER
BNO08xFrsID::META_LINEAR_ACCELERATION
@ META_LINEAR_ACCELERATION
BNO08xFrsID::META_MAGNETIC_FIELD_UNCALIBRATED
@ META_MAGNETIC_FIELD_UNCALIBRATED
BNO08xFrsID::ME_POWER_MGMT
@ ME_POWER_MGMT
BNO08xFrsID::META_HEART_RATE_MONITOR
@ META_HEART_RATE_MONITOR
BNO08xFrsID::META_ACCELEROMETER
@ META_ACCELEROMETER
BNO08xFrsID::META_PICKUP_DETECTOR
@ META_PICKUP_DETECTOR
BNO08xFrsID::META_ROTATION_VECTOR
@ META_ROTATION_VECTOR
BNO08xFrsID::META_PROXIMITY
@ META_PROXIMITY
BNO08xFrsID::ACCEL_ORIENTATION
@ ACCEL_ORIENTATION
BNO08xFrsID::USER_RECORD
@ USER_RECORD
BNO08xFrsID::META_ARVR_STABILIZED_RV
@ META_ARVR_STABILIZED_RV
BNO08xFrsID::ME_TIME_SOURCE_SELECT
@ ME_TIME_SOURCE_SELECT
BNO08xFrsID::TILT_DETECTOR_CONFIG
@ TILT_DETECTOR_CONFIG
BNO08xFrsID::META_TILT_DETECTOR
@ META_TILT_DETECTOR
BNO08xFrsID::META_PERSONAL_ACTIVITY_CLASSIFIER
@ META_PERSONAL_ACTIVITY_CLASSIFIER
BNO08xFrsID::META_STABILITY_CLASSIFIER
@ META_STABILITY_CLASSIFIER
BNO08xFrsID::META_SLEEP_DETECTOR
@ META_SLEEP_DETECTOR
BNO08xFrsID::META_SIGNIFICANT_MOTION
@ META_SIGNIFICANT_MOTION
BNO08xFrsID::MAGNETOMETER_ORIENTATION
@ MAGNETOMETER_ORIENTATION
BNO08xFrsID::META_GEOMAGNETIC_ROTATION_VECTOR
@ META_GEOMAGNETIC_ROTATION_VECTOR
BNO08xFrsID::SHAKE_DETECT_CONFIG
@ SHAKE_DETECT_CONFIG
BNO08xFrsID::META_POCKET_DETECTOR
@ META_POCKET_DETECTOR
BNO08xFrsID::UART_FORMAT
@ UART_FORMAT
BNO08xFrsID::META_GYRO_INTEGRATED_RV
@ META_GYRO_INTEGRATED_RV
BNO08xFrsID::TAP_DETECT_CONFIG
@ TAP_DETECT_CONFIG
BNO08xFrsID::NOMINAL_CALIBRATION_SRA
@ NOMINAL_CALIBRATION_SRA
BNO08xFrsID::ES_PRESSURE_CAL
@ ES_PRESSURE_CAL
BNO08xFrsID::NOMINAL_CALIBRATION
@ NOMINAL_CALIBRATION
BNO08xFrsID::META_SHAKE_DETECTOR
@ META_SHAKE_DETECTOR
BNO08xFrsID::META_GYROSCOPE_UNCALIBRATED
@ META_GYROSCOPE_UNCALIBRATED
BNO08xFrsID::POCKET_DETECTOR_CONFIG
@ POCKET_DETECTOR_CONFIG
BNO08xFrsID::META_HUMIDITY
@ META_HUMIDITY
BNO08xFrsID::FLIP_DETECTOR_CONFIG
@ FLIP_DETECTOR_CONFIG
BNO08xFrsID::ACTIVITY_TRACKER_CONFIG
@ ACTIVITY_TRACKER_CONFIG
BNO08xFrsID::META_TAP_DETECTOR
@ META_TAP_DETECTOR
BNO08xFrsID::GYROSCOPE_ORIENTATION
@ GYROSCOPE_ORIENTATION
BNO08xFrsID::META_TEMPERATURE
@ META_TEMPERATURE
BNO08xFrsID::SERIAL_NUMBER
@ SERIAL_NUMBER
BNO08xFrsID::PROXIMITY_SENSOR_CAL
@ PROXIMITY_SENSOR_CAL
BNO08xFrsID::META_CIRCLE_DETECTOR
@ META_CIRCLE_DETECTOR
BNO08xFrsID::META_MAGNETIC_FIELD_CALIBRATED
@ META_MAGNETIC_FIELD_CALIBRATED
BNO08xFrsID::DYNAMIC_CALIBRATION
@ DYNAMIC_CALIBRATION
BNO08xFrsID::PICKUP_DETECTOR_CONFIG
@ PICKUP_DETECTOR_CONFIG
BNO08xFrsID::GYRO_INTEGRATED_RV_CONFIG
@ GYRO_INTEGRATED_RV_CONFIG
BNO08xFrsID::META_GRAVITY
@ META_GRAVITY
BNO08xFrsID::STABILITY_DETECTOR_CONFIG
@ STABILITY_DETECTOR_CONFIG
BNO08xFrsID::ARVR_STABILIZATION_RV
@ ARVR_STABILIZATION_RV
BNO08xFrsID::META_STABILITY_DETECTOR
@ META_STABILITY_DETECTOR
BNO08xFrsID::META_RAW_MAGNETOMETER
@ META_RAW_MAGNETOMETER
BNO08xFrsID::ALS_CAL
@ ALS_CAL
BNO08xFrsID::ES_TEMPERATURE_CAL
@ ES_TEMPERATURE_CAL
BNO08xFrsID::STATIC_CALIBRATION_SRA
@ STATIC_CALIBRATION_SRA
BNO08xFrsID::SIG_MOTION_DETECT_CONFIG
@ SIG_MOTION_DETECT_CONFIG
BNO08xFrsID::STATIC_CALIBRATION_AGM
@ STATIC_CALIBRATION_AGM
BNO08xFrsID::META_FLIP_DETECTOR
@ META_FLIP_DETECTOR
BNO08xFrsID::META_STEP_DETECTOR
@ META_STEP_DETECTOR
BNO08xFrsID::META_STEP_COUNTER
@ META_STEP_COUNTER
BNO08xFrsID::META_PRESSURE
@ META_PRESSURE
bno08x_euler_angle_t
struct bno08x_euler_angle_t bno08x_euler_angle_t
Struct to represent euler angle (units in degrees or rads)
TAP_DETECTED_DOUBLE
#define TAP_DETECTED_DOUBLE(tap)
Definition: BNO08xGlobalTypes.hpp:15
SHAKE_DETECTED_Z
#define SHAKE_DETECTED_Z(tap)
Definition: BNO08xGlobalTypes.hpp:20
bno08x_stability_classifier_t
struct bno08x_stability_classifier_t bno08x_stability_classifier_t
Struct to represent stability classifier data from stability classifier reports.
TAP_DETECTED_Z_AXIS
#define TAP_DETECTED_Z_AXIS(tap)
Definition: BNO08xGlobalTypes.hpp:13
imu_config_t
bno08x_config_t imu_config_t
Definition: BNO08xGlobalTypes.hpp:81
BNO08xAccuracy_to_str
const constexpr char * BNO08xAccuracy_to_str(BNO08xAccuracy accuracy)
Definition: BNO08xGlobalTypes.hpp:115
bno08x_gyro_t
struct bno08x_gyro_t bno08x_gyro_t
Struct to represent gyro data (units in rad/s)
BNO08xStability_to_str
const constexpr char * BNO08xStability_to_str(BNO08xStability stability)
Converts a BNO08xStability enum to string.
Definition: BNO08xGlobalTypes.hpp:216
bno08x_raw_accel_t
struct bno08x_raw_accel_t bno08x_raw_accel_t
Struct to represent raw mems accelerometer data from raw accelerometer reports (units in ADC counts).
TAP_DETECTED_X_AXIS
#define TAP_DETECTED_X_AXIS(tap)
Definition: BNO08xGlobalTypes.hpp:9
TAP_DETECTED_Y_AXIS
#define TAP_DETECTED_Y_AXIS(tap)
Definition: BNO08xGlobalTypes.hpp:11
bno08x_step_counter_t
struct bno08x_step_counter_t bno08x_step_counter_t
Struct to represent step counter data from step counter reports.
bno08x_tap_detector_t
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,...
SHAKE_DETECTED_X
#define SHAKE_DETECTED_X(tap)
Definition: BNO08xGlobalTypes.hpp:18
bno08x_sample_counts_t
struct bno08x_sample_counts_t bno08x_sample_counts_t
Struct to represent sample counts, returned from BNO08xRpt::get_sample_counts()
BNO08xResetReason
BNO08xResetReason
Reason for previous IMU reset (returned by get_reset_reason())
Definition: BNO08xGlobalTypes.hpp:94
BNO08xResetReason::OTHER
@ OTHER
Previous reset was due to power other reason.
BNO08xResetReason::UNDEFINED
@ UNDEFINED
Undefined reset reason, this should never occur and is an error.
BNO08xResetReason::WTD
@ WTD
Previous reset was due to watchdog timer.
BNO08xResetReason::POR
@ POR
Previous reset was due to power on reset.
BNO08xResetReason::EXT_RST
@ EXT_RST
Previous reset was due to external reset.
BNO08xResetReason::INT_RST
@ INT_RST
Previous reset was due to internal reset.
bno08x_accel_t
Struct to represent acceleration data from acceleration, linear acceleration, and gravity reports.
Definition: BNO08xGlobalTypes.hpp:856
bno08x_accel_t::z
float z
Definition: BNO08xGlobalTypes.hpp:859
bno08x_accel_t::bno08x_accel_t
bno08x_accel_t()
Definition: BNO08xGlobalTypes.hpp:862
bno08x_accel_t::operator=
bno08x_accel_t & operator=(const sh2_Accelerometer_t &source)
Definition: BNO08xGlobalTypes.hpp:871
bno08x_accel_t::y
float y
Definition: BNO08xGlobalTypes.hpp:858
bno08x_accel_t::accuracy
BNO08xAccuracy accuracy
Definition: BNO08xGlobalTypes.hpp:860
bno08x_accel_t::x
float x
Definition: BNO08xGlobalTypes.hpp:857
bno08x_activity_classifier_t
Struct to represent activity classifier data.
Definition: BNO08xGlobalTypes.hpp:728
bno08x_activity_classifier_t::mostLikelyState
BNO08xActivity mostLikelyState
Definition: BNO08xGlobalTypes.hpp:730
bno08x_activity_classifier_t::bno08x_activity_classifier_t
bno08x_activity_classifier_t()
Definition: BNO08xGlobalTypes.hpp:735
bno08x_activity_classifier_t::accuracy
BNO08xAccuracy accuracy
Definition: BNO08xGlobalTypes.hpp:731
bno08x_activity_classifier_t::confidence
uint8_t confidence[10]
Definition: BNO08xGlobalTypes.hpp:729
bno08x_activity_classifier_t::lastPage
bool lastPage
Definition: BNO08xGlobalTypes.hpp:733
bno08x_activity_classifier_t::page
uint8_t page
Definition: BNO08xGlobalTypes.hpp:732
bno08x_activity_classifier_t::operator=
bno08x_activity_classifier_t & operator=(const sh2_PersonalActivityClassifier_t &source)
Definition: BNO08xGlobalTypes.hpp:745
bno08x_ang_vel_t
Struct to represent angular velocity (units in rad/s)
Definition: BNO08xGlobalTypes.hpp:572
bno08x_ang_vel_t::bno08x_ang_vel_t
bno08x_ang_vel_t()
Definition: BNO08xGlobalTypes.hpp:577
bno08x_ang_vel_t::z
float z
Definition: BNO08xGlobalTypes.hpp:575
bno08x_ang_vel_t::x
float x
Definition: BNO08xGlobalTypes.hpp:573
bno08x_ang_vel_t::operator*=
bno08x_ang_vel_t & operator*=(T value)
Definition: BNO08xGlobalTypes.hpp:586
bno08x_ang_vel_t::y
float y
Definition: BNO08xGlobalTypes.hpp:574
bno08x_ang_vel_t::operator=
bno08x_ang_vel_t & operator=(const sh2_GyroIntegratedRV_t &source)
Definition: BNO08xGlobalTypes.hpp:595
bno08x_config_t
IMU configuration settings passed into constructor.
Definition: BNO08xGlobalTypes.hpp:38
bno08x_config_t::spi_peripheral
spi_host_device_t spi_peripheral
SPI peripheral to be used.
Definition: BNO08xGlobalTypes.hpp:39
bno08x_config_t::install_isr_service
bool install_isr_service
Indicates whether the ISR service for the HINT should be installed at IMU initialization,...
Definition: BNO08xGlobalTypes.hpp:47
bno08x_config_t::sclk_speed
uint32_t sclk_speed
Reset pin (connects to BNO08x RST pin)
Definition: BNO08xGlobalTypes.hpp:46
bno08x_config_t::io_int
gpio_num_t io_int
Chip select pin (connects to BNO08x CS pin)
Definition: BNO08xGlobalTypes.hpp:44
bno08x_config_t::io_rst
gpio_num_t io_rst
Host interrupt pin (connects to BNO08x INT pin)
Definition: BNO08xGlobalTypes.hpp:45
bno08x_config_t::io_sclk
gpio_num_t io_sclk
SCLK pin (connects to BNO08x SCL pin)
Definition: BNO08xGlobalTypes.hpp:42
bno08x_config_t::bno08x_config_t
bno08x_config_t(bool install_isr_service=true)
Default IMU configuration settings constructor. To modify default GPIO pins, run "idf....
Definition: BNO08xGlobalTypes.hpp:52
bno08x_config_t::io_mosi
gpio_num_t io_mosi
MOSI GPIO pin (connects to BNO08x DI pin)
Definition: BNO08xGlobalTypes.hpp:40
bno08x_config_t::io_miso
gpio_num_t io_miso
MISO GPIO pin (connects to BNO08x SDA pin)
Definition: BNO08xGlobalTypes.hpp:41
bno08x_config_t::io_cs
gpio_num_t io_cs
Definition: BNO08xGlobalTypes.hpp:43
bno08x_config_t::bno08x_config_t
bno08x_config_t(spi_host_device_t spi_peripheral, gpio_num_t io_mosi, gpio_num_t io_miso, gpio_num_t io_sclk, gpio_num_t io_cs, gpio_num_t io_int, gpio_num_t io_rst, uint32_t sclk_speed, bool install_isr_service=true)
Overloaded IMU configuration settings constructor for custom pin settings.
Definition: BNO08xGlobalTypes.hpp:67
bno08x_euler_angle_t
Struct to represent euler angle (units in degrees or rads)
Definition: BNO08xGlobalTypes.hpp:528
bno08x_euler_angle_t::operator*=
bno08x_euler_angle_t & operator*=(T value)
Definition: BNO08xGlobalTypes.hpp:559
bno08x_euler_angle_t::y
float y
Definition: BNO08xGlobalTypes.hpp:530
bno08x_euler_angle_t::bno08x_euler_angle_t
bno08x_euler_angle_t()
Definition: BNO08xGlobalTypes.hpp:535
bno08x_euler_angle_t::accuracy
BNO08xAccuracy accuracy
Definition: BNO08xGlobalTypes.hpp:533
bno08x_euler_angle_t::z
float z
Definition: BNO08xGlobalTypes.hpp:531
bno08x_euler_angle_t::x
float x
Definition: BNO08xGlobalTypes.hpp:529
bno08x_euler_angle_t::rad_accuracy
float rad_accuracy
Definition: BNO08xGlobalTypes.hpp:532
bno08x_euler_angle_t::operator=
bno08x_euler_angle_t & operator=(const bno08x_quat_t &source)
Definition: BNO08xGlobalTypes.hpp:545
bno08x_gyro_bias_t
Struct to represent gyro bias data (units in rad/s)
Definition: BNO08xGlobalTypes.hpp:703
bno08x_gyro_bias_t::bno08x_gyro_bias_t
bno08x_gyro_bias_t()
Definition: BNO08xGlobalTypes.hpp:708
bno08x_gyro_bias_t::y
float y
Definition: BNO08xGlobalTypes.hpp:705
bno08x_gyro_bias_t::x
float x
Definition: BNO08xGlobalTypes.hpp:704
bno08x_gyro_bias_t::operator=
bno08x_gyro_bias_t & operator=(const sh2_GyroscopeUncalibrated &source)
Definition: BNO08xGlobalTypes.hpp:716
bno08x_gyro_bias_t::z
float z
Definition: BNO08xGlobalTypes.hpp:706
bno08x_gyro_t
Struct to represent gyro data (units in rad/s)
Definition: BNO08xGlobalTypes.hpp:667
bno08x_gyro_t::operator=
bno08x_gyro_t & operator=(const sh2_Gyroscope_t &source)
Definition: BNO08xGlobalTypes.hpp:682
bno08x_gyro_t::x
float x
Definition: BNO08xGlobalTypes.hpp:668
bno08x_gyro_t::operator=
bno08x_gyro_t & operator=(const sh2_GyroscopeUncalibrated &source)
Definition: BNO08xGlobalTypes.hpp:691
bno08x_gyro_t::accuracy
BNO08xAccuracy accuracy
Definition: BNO08xGlobalTypes.hpp:671
bno08x_gyro_t::bno08x_gyro_t
bno08x_gyro_t()
Definition: BNO08xGlobalTypes.hpp:673
bno08x_gyro_t::y
float y
Definition: BNO08xGlobalTypes.hpp:669
bno08x_gyro_t::z
float z
Definition: BNO08xGlobalTypes.hpp:670
bno08x_magf_bias_t
Struct to represent magnetic field bias data (units in uTesla)
Definition: BNO08xGlobalTypes.hpp:642
bno08x_magf_bias_t::y
float y
Definition: BNO08xGlobalTypes.hpp:644
bno08x_magf_bias_t::z
float z
Definition: BNO08xGlobalTypes.hpp:645
bno08x_magf_bias_t::bno08x_magf_bias_t
bno08x_magf_bias_t()
Definition: BNO08xGlobalTypes.hpp:647
bno08x_magf_bias_t::x
float x
Definition: BNO08xGlobalTypes.hpp:643
bno08x_magf_bias_t::operator=
bno08x_magf_bias_t & operator=(const sh2_MagneticFieldUncalibrated_t &source)
Definition: BNO08xGlobalTypes.hpp:655
bno08x_magf_t
Struct to represent magnetic field data (units in uTesla)
Definition: BNO08xGlobalTypes.hpp:606
bno08x_magf_t::y
float y
Definition: BNO08xGlobalTypes.hpp:608
bno08x_magf_t::z
float z
Definition: BNO08xGlobalTypes.hpp:609
bno08x_magf_t::operator=
bno08x_magf_t & operator=(const sh2_MagneticFieldUncalibrated_t &source)
Definition: BNO08xGlobalTypes.hpp:630
bno08x_magf_t::accuracy
BNO08xAccuracy accuracy
Definition: BNO08xGlobalTypes.hpp:610
bno08x_magf_t::x
float x
Definition: BNO08xGlobalTypes.hpp:607
bno08x_magf_t::bno08x_magf_t
bno08x_magf_t()
Definition: BNO08xGlobalTypes.hpp:612
bno08x_magf_t::operator=
bno08x_magf_t & operator=(const sh2_MagneticField_t &source)
Definition: BNO08xGlobalTypes.hpp:621
bno08x_meta_data_t
Struct to represent sensor/report meta data, returned from BNO08xRpt::get_meta_data()
Definition: BNO08xGlobalTypes.hpp:1047
bno08x_meta_data_t::q_point_2
uint16_t q_point_2
q point for accuracy or bias fields
Definition: BNO08xGlobalTypes.hpp:1062
bno08x_meta_data_t::vendor_id_len
uint32_t vendor_id_len
[bytes]
Definition: BNO08xGlobalTypes.hpp:1050
bno08x_meta_data_t::q_point_1
uint16_t q_point_1
q point for sensor values
Definition: BNO08xGlobalTypes.hpp:1061
bno08x_meta_data_t::q_point_3
uint16_t q_point_3
q point for sensor data change sensitivity
Definition: BNO08xGlobalTypes.hpp:1063
bno08x_meta_data_t::revision
uint16_t revision
Metadata record format revision.
Definition: BNO08xGlobalTypes.hpp:1059
bno08x_meta_data_t::fifo_reserved
uint32_t fifo_reserved
(Unused)
Definition: BNO08xGlobalTypes.hpp:1056
bno08x_meta_data_t::bno08x_meta_data_t
bno08x_meta_data_t()
Definition: BNO08xGlobalTypes.hpp:1070
bno08x_meta_data_t::max_period_us
uint32_t max_period_us
[uS] max period to use with enable_report
Definition: BNO08xGlobalTypes.hpp:1055
bno08x_meta_data_t::sensor_specific
uint8_t sensor_specific[48]
See SH-2 Reference Manual.
Definition: BNO08xGlobalTypes.hpp:1049
bno08x_meta_data_t::vendor_ID
char vendor_ID[48]
Vendor name and part number.
Definition: BNO08xGlobalTypes.hpp:1048
bno08x_meta_data_t::min_period_us
uint32_t min_period_us
[uS] min period to use with enable_report
Definition: BNO08xGlobalTypes.hpp:1054
bno08x_meta_data_t::bno08x_meta_data_t
bno08x_meta_data_t(const sh2_SensorMetadata_t &src)
Definition: BNO08xGlobalTypes.hpp:1096
bno08x_meta_data_t::mh_version
uint8_t mh_version
Motion Hub Version.
Definition: BNO08xGlobalTypes.hpp:1065
bno08x_meta_data_t::range
uint32_t range
Same units as sensor reports.
Definition: BNO08xGlobalTypes.hpp:1052
bno08x_meta_data_t::me_version
uint8_t me_version
Motion Engine Version.
Definition: BNO08xGlobalTypes.hpp:1064
bno08x_meta_data_t::sh_version
uint8_t sh_version
SensorHub Version.
Definition: BNO08xGlobalTypes.hpp:1066
bno08x_meta_data_t::resolution
uint32_t resolution
Same units as sensor reports.
Definition: BNO08xGlobalTypes.hpp:1053
bno08x_meta_data_t::fifo_max
uint32_t fifo_max
(Unused)
Definition: BNO08xGlobalTypes.hpp:1057
bno08x_meta_data_t::sensor_specific_len
uint32_t sensor_specific_len
[bytes]
Definition: BNO08xGlobalTypes.hpp:1051
bno08x_meta_data_t::power_mA
uint16_t power_mA
[mA] Fixed point 16Q10 format
Definition: BNO08xGlobalTypes.hpp:1060
bno08x_meta_data_t::batch_buffer_bytes
uint32_t batch_buffer_bytes
(Unused)
Definition: BNO08xGlobalTypes.hpp:1058
bno08x_quat_t
Struct to represent unit quaternion.
Definition: BNO08xGlobalTypes.hpp:473
bno08x_quat_t::operator=
bno08x_quat_t & operator=(const sh2_RotationVectorWAcc_t &source)
Definition: BNO08xGlobalTypes.hpp:492
bno08x_quat_t::operator=
bno08x_quat_t & operator=(const sh2_RotationVector_t &source)
Definition: BNO08xGlobalTypes.hpp:503
bno08x_quat_t::rad_accuracy
float rad_accuracy
Definition: BNO08xGlobalTypes.hpp:478
bno08x_quat_t::j
float j
Definition: BNO08xGlobalTypes.hpp:476
bno08x_quat_t::real
float real
Definition: BNO08xGlobalTypes.hpp:474
bno08x_quat_t::i
float i
Definition: BNO08xGlobalTypes.hpp:475
bno08x_quat_t::k
float k
Definition: BNO08xGlobalTypes.hpp:477
bno08x_quat_t::operator=
bno08x_quat_t & operator=(const sh2_GyroIntegratedRV_t &source)
Definition: BNO08xGlobalTypes.hpp:514
bno08x_quat_t::bno08x_quat_t
bno08x_quat_t()
Definition: BNO08xGlobalTypes.hpp:481
bno08x_quat_t::accuracy
BNO08xAccuracy accuracy
Definition: BNO08xGlobalTypes.hpp:479
bno08x_raw_accel_t
Struct to represent raw mems accelerometer data from raw accelerometer reports (units in ADC counts).
Definition: BNO08xGlobalTypes.hpp:938
bno08x_raw_accel_t::z
int16_t z
Definition: BNO08xGlobalTypes.hpp:942
bno08x_raw_accel_t::timestamp_us
uint32_t timestamp_us
Definition: BNO08xGlobalTypes.hpp:939
bno08x_raw_accel_t::operator=
bno08x_raw_accel_t & operator=(const sh2_RawAccelerometer_t &source)
Definition: BNO08xGlobalTypes.hpp:955
bno08x_raw_accel_t::y
int16_t y
Definition: BNO08xGlobalTypes.hpp:941
bno08x_raw_accel_t::accuracy
BNO08xAccuracy accuracy
Definition: BNO08xGlobalTypes.hpp:943
bno08x_raw_accel_t::x
int16_t x
Definition: BNO08xGlobalTypes.hpp:940
bno08x_raw_accel_t::bno08x_raw_accel_t
bno08x_raw_accel_t()
Definition: BNO08xGlobalTypes.hpp:945
bno08x_raw_gyro_t
Struct to represent raw mems gyro data from raw gyro reports (units in ADC counts).
Definition: BNO08xGlobalTypes.hpp:905
bno08x_raw_gyro_t::bno08x_raw_gyro_t
bno08x_raw_gyro_t()
Definition: BNO08xGlobalTypes.hpp:913
bno08x_raw_gyro_t::operator=
bno08x_raw_gyro_t & operator=(const sh2_RawGyroscope_t &source)
Definition: BNO08xGlobalTypes.hpp:924
bno08x_raw_gyro_t::x
int16_t x
Definition: BNO08xGlobalTypes.hpp:907
bno08x_raw_gyro_t::timestamp_us
uint32_t timestamp_us
Definition: BNO08xGlobalTypes.hpp:906
bno08x_raw_gyro_t::accuracy
BNO08xAccuracy accuracy
Definition: BNO08xGlobalTypes.hpp:911
bno08x_raw_gyro_t::temperature
int16_t temperature
Definition: BNO08xGlobalTypes.hpp:910
bno08x_raw_gyro_t::y
int16_t y
Definition: BNO08xGlobalTypes.hpp:908
bno08x_raw_gyro_t::z
int16_t z
Definition: BNO08xGlobalTypes.hpp:909
bno08x_raw_magf_t
Struct to represent raw mems magnetometer data from raw magnetometer reports (units in ADC counts).
Definition: BNO08xGlobalTypes.hpp:968
bno08x_raw_magf_t::z
int16_t z
Definition: BNO08xGlobalTypes.hpp:972
bno08x_raw_magf_t::x
int16_t x
Definition: BNO08xGlobalTypes.hpp:970
bno08x_raw_magf_t::timestamp_us
uint32_t timestamp_us
Definition: BNO08xGlobalTypes.hpp:969
bno08x_raw_magf_t::bno08x_raw_magf_t
bno08x_raw_magf_t()
Definition: BNO08xGlobalTypes.hpp:975
bno08x_raw_magf_t::y
int16_t y
Definition: BNO08xGlobalTypes.hpp:971
bno08x_raw_magf_t::operator=
bno08x_raw_magf_t & operator=(const sh2_RawMagnetometer_t &source)
Definition: BNO08xGlobalTypes.hpp:985
bno08x_raw_magf_t::accuracy
BNO08xAccuracy accuracy
Definition: BNO08xGlobalTypes.hpp:973
bno08x_sample_counts_t
Struct to represent sample counts, returned from BNO08xRpt::get_sample_counts()
Definition: BNO08xGlobalTypes.hpp:1018
bno08x_sample_counts_t::on
uint32_t on
Number of "offered" samples while this sensor was requested by host.
Definition: BNO08xGlobalTypes.hpp:1020
bno08x_sample_counts_t::accepted
uint32_t accepted
Number of "on" samples that passed decimation filter.
Definition: BNO08xGlobalTypes.hpp:1021
bno08x_sample_counts_t::attempted
uint32_t attempted
Number of "accepted" samples that passed threshold requirements and had transmission to the host atte...
Definition: BNO08xGlobalTypes.hpp:1023
bno08x_sample_counts_t::offered
uint32_t offered
Number of samples produced by underlying data source.
Definition: BNO08xGlobalTypes.hpp:1019
bno08x_sample_counts_t::bno08x_sample_counts_t
bno08x_sample_counts_t()
Definition: BNO08xGlobalTypes.hpp:1025
bno08x_sample_counts_t::operator=
bno08x_sample_counts_t & operator=(const sh2_Counts_t &source)
Definition: BNO08xGlobalTypes.hpp:1034
bno08x_shake_detector_t
Struct to represent shake detector data (flag meaning: 0 = no shake 1 = shake detected)
Definition: BNO08xGlobalTypes.hpp:816
bno08x_shake_detector_t::x_flag
uint8_t x_flag
Definition: BNO08xGlobalTypes.hpp:817
bno08x_shake_detector_t::bno08x_shake_detector_t
bno08x_shake_detector_t()
Definition: BNO08xGlobalTypes.hpp:822
bno08x_shake_detector_t::z_flag
uint8_t z_flag
Definition: BNO08xGlobalTypes.hpp:819
bno08x_shake_detector_t::operator=
bno08x_shake_detector_t & operator=(const sh2_ShakeDetector_t &source)
Definition: BNO08xGlobalTypes.hpp:831
bno08x_shake_detector_t::y_flag
uint8_t y_flag
Definition: BNO08xGlobalTypes.hpp:818
bno08x_shake_detector_t::accuracy
BNO08xAccuracy accuracy
Definition: BNO08xGlobalTypes.hpp:820
bno08x_stability_classifier_t
Struct to represent stability classifier data from stability classifier reports.
Definition: BNO08xGlobalTypes.hpp:997
bno08x_stability_classifier_t::bno08x_stability_classifier_t
bno08x_stability_classifier_t()
Definition: BNO08xGlobalTypes.hpp:1001
bno08x_stability_classifier_t::stability
BNO08xStability stability
Definition: BNO08xGlobalTypes.hpp:998
bno08x_stability_classifier_t::accuracy
BNO08xAccuracy accuracy
Definition: BNO08xGlobalTypes.hpp:999
bno08x_stability_classifier_t::operator=
bno08x_stability_classifier_t & operator=(const sh2_StabilityClassifier_t &source)
Definition: BNO08xGlobalTypes.hpp:1008
bno08x_step_counter_t
Struct to represent step counter data from step counter reports.
Definition: BNO08xGlobalTypes.hpp:882
bno08x_step_counter_t::bno08x_step_counter_t
bno08x_step_counter_t()
Definition: BNO08xGlobalTypes.hpp:887
bno08x_step_counter_t::steps
uint16_t steps
Definition: BNO08xGlobalTypes.hpp:884
bno08x_step_counter_t::accuracy
BNO08xAccuracy accuracy
Definition: BNO08xGlobalTypes.hpp:885
bno08x_step_counter_t::latency
uint32_t latency
Definition: BNO08xGlobalTypes.hpp:883
bno08x_step_counter_t::operator=
bno08x_step_counter_t & operator=(const sh2_StepCounter_t &source)
Definition: BNO08xGlobalTypes.hpp:895
bno08x_tap_detector_t
Struct to represent tap detector data (flag meaning: 0 = no tap, 1 = positive tap on axis,...
Definition: BNO08xGlobalTypes.hpp:761
bno08x_tap_detector_t::x_flag
int8_t x_flag
Definition: BNO08xGlobalTypes.hpp:762
bno08x_tap_detector_t::operator=
bno08x_tap_detector_t & operator=(const sh2_TapDetector_t &source)
Definition: BNO08xGlobalTypes.hpp:778
bno08x_tap_detector_t::z_flag
int8_t z_flag
Definition: BNO08xGlobalTypes.hpp:764
bno08x_tap_detector_t::bno08x_tap_detector_t
bno08x_tap_detector_t()
Definition: BNO08xGlobalTypes.hpp:768
bno08x_tap_detector_t::accuracy
BNO08xAccuracy accuracy
Definition: BNO08xGlobalTypes.hpp:766
bno08x_tap_detector_t::y_flag
int8_t y_flag
Definition: BNO08xGlobalTypes.hpp:763
bno08x_tap_detector_t::double_tap
bool double_tap
Definition: BNO08xGlobalTypes.hpp:765