SparkFun Optical Tracking Odometry Sensor  v1.0.2-11-gb69b326
Library for the SparkFun Optical Tracking Odometry Sensor
Loading...
Searching...
No Matches
sfDevOTOS.h
Go to the documentation of this file.
1
24#pragma once
25
26#include <math.h>
27#include <stdint.h>
28
29// include the sparkfun toolkit headers
30#include <sfTk/sfToolkit.h>
31
32// Bus interfaces
33#include <sfTk/sfTkII2C.h>
34
39typedef struct
40{
42 float x;
43
45 float y;
46
48 float h;
50
53typedef enum
54{
57
61
64typedef enum
65{
68
72
75typedef union {
76 struct
77 {
79 uint8_t minor : 4;
80
82 uint8_t major : 4;
83 };
84
86 uint8_t value;
88
91typedef union {
92 struct
93 {
96 uint8_t enLut : 1;
97
99 uint8_t enAcc : 1;
100
103 uint8_t enRot : 1;
104
107 uint8_t enVar : 1;
108
110 uint8_t reserved : 4;
111 };
112
114 uint8_t value;
116
119typedef union {
120 struct
121 {
123 uint8_t start : 1;
124
126 uint8_t inProgress : 1;
127
129 uint8_t pass : 1;
130
132 uint8_t fail : 1;
133
135 uint8_t reserved : 4;
136 };
137
139 uint8_t value;
141
144typedef union {
145 struct
146 {
149 uint8_t warnTiltAngle : 1;
150
154
156 uint8_t reserved : 4;
157
159 uint8_t errorPaa : 1;
160
162 uint8_t errorLsm : 1;
163 };
164
166 uint8_t value;
168
174{
175 public:
177 sfDevOTOS();
178
182 sfTkError_t begin(sfTkII2C *commBus = nullptr);
183
186 sfTkError_t isConnected();
187
192 sfTkError_t getVersionInfo(sfe_otos_version_t &hwVersion, sfe_otos_version_t &fwVersion);
193
196 sfTkError_t selfTest();
197
205 sfTkError_t calibrateImu(uint8_t numSamples = 255, bool waitUntilDone = true);
206
211 sfTkError_t getImuCalibrationProgress(uint8_t &numSamples);
212
216
220
224
228
232 sfTkError_t getLinearScalar(float &scalar);
233
238 sfTkError_t setLinearScalar(float scalar);
239
243 sfTkError_t getAngularScalar(float &scalar);
244
249 sfTkError_t setAngularScalar(float scalar);
250
254 sfTkError_t resetTracking();
255
260
266
271 sfTkError_t getStatus(sfe_otos_status_t &status);
272
276 sfTkError_t getOffset(sfe_otos_pose2d_t &pose);
277
283 sfTkError_t setOffset(sfe_otos_pose2d_t &pose);
284
288 sfTkError_t getPosition(sfe_otos_pose2d_t &pose);
289
296 sfTkError_t setPosition(sfe_otos_pose2d_t &pose);
297
301 sfTkError_t getVelocity(sfe_otos_pose2d_t &pose);
302
306 sfTkError_t getAcceleration(sfe_otos_pose2d_t &pose);
307
314 sfTkError_t getPositionStdDev(sfe_otos_pose2d_t &pose);
315
322 sfTkError_t getVelocityStdDev(sfe_otos_pose2d_t &pose);
323
330 sfTkError_t getAccelerationStdDev(sfe_otos_pose2d_t &pose);
331
339
347
358 sfe_otos_pose2d_t &posStdDev, sfe_otos_pose2d_t &velStdDev,
359 sfe_otos_pose2d_t &accStdDev);
360
362 static constexpr uint8_t kDefaultAddress = 0x17;
363
365 static constexpr float kMinScalar = 0.872f;
366
368 static constexpr float kMaxScalar = 1.127f;
369
370 protected:
371 // Virtual function that must be implemented by the derived class to delay
372 // for a given number of milliseconds
373 virtual void delayMs(uint32_t ms) = 0;
374
375 // Function to read raw pose registers and convert to specified units
376 sfTkError_t readPoseRegs(uint8_t reg, sfe_otos_pose2d_t &pose, float rawToXY, float rawToH);
377
378 // Function to write raw pose registers and convert from specified units
379 sfTkError_t writePoseRegs(uint8_t reg, sfe_otos_pose2d_t &pose, float xyToRaw, float hToRaw);
380
381 // Function to convert raw pose registers to a pose structure
382 void regsToPose(uint8_t *rawData, sfe_otos_pose2d_t &pose, float rawToXY, float rawToH);
383
384 // Function to convert a pose structure to raw pose registers
385 void poseToRegs(uint8_t *rawData, sfe_otos_pose2d_t &pose, float xyToRaw, float hToRaw);
386
387 // I2C bus to use for communication
388 sfTkII2C *_commBus;
389
390 // Units to be used by the public pose functions. Everything uses meters and
391 // radians internally, so this just determines what conversion factor is
392 // applied to the public functions
395
396 // Conversion factors from meters and radians to the current linear and
397 // angular units
400
401 // OTOS register map
402 static constexpr uint8_t kRegProductId = 0x00;
403 static constexpr uint8_t kRegHwVersion = 0x01;
404 static constexpr uint8_t kRegFwVersion = 0x02;
405 static constexpr uint8_t kRegScalarLinear = 0x04;
406 static constexpr uint8_t kRegScalarAngular = 0x05;
407 static constexpr uint8_t kRegImuCalib = 0x06;
408 static constexpr uint8_t kRegReset = 0x07;
409 static constexpr uint8_t kRegSignalProcess = 0x0E;
410 static constexpr uint8_t kRegSelfTest = 0x0F;
411 static constexpr uint8_t kRegOffXL = 0x10;
412 static constexpr uint8_t kRegOffXH = 0x11;
413 static constexpr uint8_t kRegOffYL = 0x12;
414 static constexpr uint8_t kRegOffYH = 0x13;
415 static constexpr uint8_t kRegOffHL = 0x14;
416 static constexpr uint8_t kRegOffHH = 0x15;
417 static constexpr uint8_t kRegStatus = 0x1F;
418 static constexpr uint8_t kRegPosXL = 0x20;
419 static constexpr uint8_t kRegPosXH = 0x21;
420 static constexpr uint8_t kRegPosYL = 0x22;
421 static constexpr uint8_t kRegPosYH = 0x23;
422 static constexpr uint8_t kRegPosHL = 0x24;
423 static constexpr uint8_t kRegPosHH = 0x25;
424 static constexpr uint8_t kRegVelXL = 0x26;
425 static constexpr uint8_t kRegVelXH = 0x27;
426 static constexpr uint8_t kRegVelYL = 0x28;
427 static constexpr uint8_t kRegVelYH = 0x29;
428 static constexpr uint8_t kRegVelHL = 0x2A;
429 static constexpr uint8_t kRegVelHH = 0x2B;
430 static constexpr uint8_t kRegAccXL = 0x2C;
431 static constexpr uint8_t kRegAccXH = 0x2D;
432 static constexpr uint8_t kRegAccYL = 0x2E;
433 static constexpr uint8_t kRegAccYH = 0x2F;
434 static constexpr uint8_t kRegAccHL = 0x30;
435 static constexpr uint8_t kRegAccHH = 0x31;
436 static constexpr uint8_t kRegPosStdXL = 0x32;
437 static constexpr uint8_t kRegPosStdXH = 0x33;
438 static constexpr uint8_t kRegPosStdYL = 0x34;
439 static constexpr uint8_t kRegPosStdYH = 0x35;
440 static constexpr uint8_t kRegPosStdHL = 0x36;
441 static constexpr uint8_t kRegPosStdHH = 0x37;
442 static constexpr uint8_t kRegVelStdXL = 0x38;
443 static constexpr uint8_t kRegVelStdXH = 0x39;
444 static constexpr uint8_t kRegVelStdYL = 0x3A;
445 static constexpr uint8_t kRegVelStdYH = 0x3B;
446 static constexpr uint8_t kRegVelStdHL = 0x3C;
447 static constexpr uint8_t kRegVelStdHH = 0x3D;
448 static constexpr uint8_t kRegAccStdXL = 0x3E;
449 static constexpr uint8_t kRegAccStdXH = 0x3F;
450 static constexpr uint8_t kRegAccStdYL = 0x40;
451 static constexpr uint8_t kRegAccStdYH = 0x41;
452 static constexpr uint8_t kRegAccStdHL = 0x42;
453 static constexpr uint8_t kRegAccStdHH = 0x43;
454
455 // Product ID register value
456 static constexpr uint8_t kProductId = 0x5F;
457
458 // Conversion factors
459 static constexpr float kMeterToInch = 39.37f;
460 static constexpr float kInchToMeter = 1.0f / kMeterToInch;
461 static constexpr float kRadianToDegree = 180.0f / M_PI;
462 static constexpr float kDegreeToRadian = M_PI / 180.0f;
463
464 // Conversion factor for the linear position registers. 16-bit signed
465 // registers with a max value of 10 meters (394 inches) gives a resolution
466 // of about 0.0003 mps (0.012 ips)
467 static constexpr float kMeterToInt16 = 32768.0f / 10.0f;
468 static constexpr float kInt16ToMeter = 1.0f / kMeterToInt16;
469
470 // Conversion factor for the linear velocity registers. 16-bit signed
471 // registers with a max value of 5 mps (197 ips) gives a resolution of about
472 // 0.00015 mps (0.006 ips)
473 static constexpr float kMpsToInt16 = 32768.0f / 5.0f;
474 static constexpr float kInt16ToMps = 1.0f / kMpsToInt16;
475
476 // Conversion factor for the linear acceleration registers. 16-bit signed
477 // registers with a max value of 157 mps^2 (16 g) gives a resolution of
478 // about 0.0048 mps^2 (0.49 mg)
479 static constexpr float kMpssToInt16 = 32768.0f / (16.0f * 9.80665f);
480 static constexpr float kInt16ToMpss = 1.0f / kMpssToInt16;
481
482 // Conversion factor for the angular position registers. 16-bit signed
483 // registers with a max value of pi radians (180 degrees) gives a resolution
484 // of about 0.00096 radians (0.0055 degrees)
485 static constexpr float kRadToInt16 = 32768.0f / M_PI;
486 static constexpr float kInt16ToRad = 1.0f / kRadToInt16;
487
488 // Conversion factor for the angular velocity registers. 16-bit signed
489 // registers with a max value of 34.9 rps (2000 dps) gives a resolution of
490 // about 0.0011 rps (0.061 degrees per second)
491 static constexpr float kRpsToInt16 = 32768.0f / (2000.0f * kDegreeToRadian);
492 static constexpr float kInt16ToRps = 1.0f / kRpsToInt16;
493
494 // Conversion factor for the angular acceleration registers. 16-bit signed
495 // registers with a max value of 3141 rps^2 (180000 dps^2) gives a
496 // resolution of about 0.096 rps^2 (5.5 dps^2)
497 static constexpr float kRpssToInt16 = 32768.0f / (M_PI * 1000.0f);
498 static constexpr float kInt16ToRpss = 1.0f / kRpssToInt16;
499};
Class for the SparkFun Qwiic Optical Tracking Odometry Sensor (OTOS). Includes methods to communicate...
Definition: sfDevOTOS.h:174
static constexpr uint8_t kRegAccHH
Definition: sfDevOTOS.h:435
static constexpr float kMaxScalar
Maximum scalar value for the linear and angular scalars.
Definition: sfDevOTOS.h:368
static constexpr float kRadianToDegree
Definition: sfDevOTOS.h:461
static constexpr uint8_t kRegAccYH
Definition: sfDevOTOS.h:433
void setAngularUnit(sfe_otos_angular_unit_t unit)
Sets the angular unit used by all methods using a pose.
Definition: sfDevOTOS.cpp:196
static constexpr uint8_t kRegAccXL
Definition: sfDevOTOS.h:430
sfTkError_t getVelocity(sfe_otos_pose2d_t &pose)
Gets the velocity measured by the OTOS.
Definition: sfDevOTOS.cpp:308
static constexpr uint8_t kRegSelfTest
Definition: sfDevOTOS.h:410
static constexpr uint8_t kRegVelXH
Definition: sfDevOTOS.h:425
sfTkError_t setOffset(sfe_otos_pose2d_t &pose)
Sets the offset of the OTOS. This is useful if your sensor is mounted off-center from a robot....
Definition: sfDevOTOS.cpp:293
static constexpr float kRpsToInt16
Definition: sfDevOTOS.h:491
sfTkError_t getAcceleration(sfe_otos_pose2d_t &pose)
Gets the acceleration measured by the OTOS.
Definition: sfDevOTOS.cpp:313
static constexpr uint8_t kRegPosHL
Definition: sfDevOTOS.h:422
static constexpr uint8_t kRegVelHH
Definition: sfDevOTOS.h:429
static constexpr uint8_t kRegAccStdXH
Definition: sfDevOTOS.h:449
float _meterToUnit
Definition: sfDevOTOS.h:398
sfTkError_t begin(sfTkII2C *commBus=nullptr)
Begins the Qwiic OTOS and verifies it is connected.
Definition: sfDevOTOS.cpp:38
static constexpr uint8_t kRegOffHH
Definition: sfDevOTOS.h:416
static constexpr uint8_t kRegPosYL
Definition: sfDevOTOS.h:420
static constexpr float kInt16ToMpss
Definition: sfDevOTOS.h:480
static constexpr uint8_t kRegAccStdXL
Definition: sfDevOTOS.h:448
static constexpr float kRadToInt16
Definition: sfDevOTOS.h:485
sfTkError_t getStatus(sfe_otos_status_t &status)
Gets the status register from the OTOS, which includes warnings and errors reported by the sensor.
Definition: sfDevOTOS.cpp:283
sfTkError_t getAccelerationStdDev(sfe_otos_pose2d_t &pose)
Gets the standard deviation of the measured acceleration.
Definition: sfDevOTOS.cpp:328
sfTkError_t getPosition(sfe_otos_pose2d_t &pose)
Gets the position measured by the OTOS.
Definition: sfDevOTOS.cpp:298
static constexpr uint8_t kRegAccStdYH
Definition: sfDevOTOS.h:451
void setLinearUnit(sfe_otos_linear_unit_t unit)
Sets the linear unit used by all methods using a pose.
Definition: sfDevOTOS.cpp:178
static constexpr uint8_t kRegPosYH
Definition: sfDevOTOS.h:421
static constexpr uint8_t kRegPosHH
Definition: sfDevOTOS.h:423
sfTkError_t getAngularScalar(float &scalar)
Gets the angular scalar used by the OTOS.
Definition: sfDevOTOS.cpp:237
static constexpr uint8_t kRegVelYH
Definition: sfDevOTOS.h:427
static constexpr uint8_t kRegImuCalib
Definition: sfDevOTOS.h:407
float _radToUnit
Definition: sfDevOTOS.h:399
static constexpr float kMpssToInt16
Definition: sfDevOTOS.h:479
static constexpr uint8_t kRegScalarLinear
Definition: sfDevOTOS.h:405
sfTkError_t writePoseRegs(uint8_t reg, sfe_otos_pose2d_t &pose, float xyToRaw, float hToRaw)
Definition: sfDevOTOS.cpp:424
static constexpr uint8_t kRegVelHL
Definition: sfDevOTOS.h:428
static constexpr uint8_t kRegOffYL
Definition: sfDevOTOS.h:413
sfTkError_t getVelocityStdDev(sfe_otos_pose2d_t &pose)
Gets the standard deviation of the measured velocity.
Definition: sfDevOTOS.cpp:323
static constexpr uint8_t kRegStatus
Definition: sfDevOTOS.h:417
sfTkError_t getImuCalibrationProgress(uint8_t &numSamples)
Gets the progress of the IMU calibration. Used for asynchronous calibration with calibrateImu()
Definition: sfDevOTOS.cpp:167
static constexpr float kInt16ToRpss
Definition: sfDevOTOS.h:498
sfTkError_t getVersionInfo(sfe_otos_version_t &hwVersion, sfe_otos_version_t &fwVersion)
Gets the hardware and firmware version numbers from the OTOS.
Definition: sfDevOTOS.cpp:76
static constexpr uint8_t kRegVelStdYL
Definition: sfDevOTOS.h:444
static constexpr float kRpssToInt16
Definition: sfDevOTOS.h:497
sfe_otos_linear_unit_t _linearUnit
Definition: sfDevOTOS.h:393
void regsToPose(uint8_t *rawData, sfe_otos_pose2d_t &pose, float rawToXY, float rawToH)
Definition: sfDevOTOS.cpp:434
static constexpr float kInt16ToRad
Definition: sfDevOTOS.h:486
static constexpr uint8_t kRegProductId
Definition: sfDevOTOS.h:402
sfTkError_t readPoseRegs(uint8_t reg, sfe_otos_pose2d_t &pose, float rawToXY, float rawToH)
Definition: sfDevOTOS.cpp:404
sfTkError_t setPosition(sfe_otos_pose2d_t &pose)
Sets the position measured by the OTOS. This is useful if your robot does not start at the origin,...
Definition: sfDevOTOS.cpp:303
static constexpr uint8_t kRegPosStdHH
Definition: sfDevOTOS.h:441
static constexpr float kMeterToInt16
Definition: sfDevOTOS.h:467
sfTkError_t isConnected()
Checks if the device is connected.
Definition: sfDevOTOS.cpp:55
static constexpr uint8_t kRegPosXH
Definition: sfDevOTOS.h:419
static constexpr uint8_t kRegVelYL
Definition: sfDevOTOS.h:426
static constexpr uint8_t kRegScalarAngular
Definition: sfDevOTOS.h:406
static constexpr uint8_t kRegAccStdHL
Definition: sfDevOTOS.h:452
static constexpr uint8_t kRegAccStdHH
Definition: sfDevOTOS.h:453
static constexpr uint8_t kRegPosStdXL
Definition: sfDevOTOS.h:436
sfTkError_t getPosVelAccStdDev(sfe_otos_pose2d_t &pos, sfe_otos_pose2d_t &vel, sfe_otos_pose2d_t &acc)
Gets the standard deviation of the measured position, velocity, and acceleration in a single burst re...
Definition: sfDevOTOS.cpp:355
sfTkError_t getSignalProcessConfig(sfe_otos_signal_process_config_t &config)
Gets the signal processing configuration from the OTOS.
Definition: sfDevOTOS.cpp:271
static constexpr float kMpsToInt16
Definition: sfDevOTOS.h:473
static constexpr uint8_t kRegReset
Definition: sfDevOTOS.h:408
sfTkError_t setLinearScalar(float scalar)
Sets the linear scalar used by the OTOS. Can be used to compensate for scaling issues with the sensor...
Definition: sfDevOTOS.cpp:224
static constexpr float kDegreeToRadian
Definition: sfDevOTOS.h:462
static constexpr uint8_t kRegFwVersion
Definition: sfDevOTOS.h:404
static constexpr uint8_t kRegAccHL
Definition: sfDevOTOS.h:434
sfTkError_t selfTest()
Performs a self test of the OTOS.
Definition: sfDevOTOS.cpp:97
static constexpr uint8_t kRegVelXL
Definition: sfDevOTOS.h:424
sfTkError_t getPosVelAcc(sfe_otos_pose2d_t &pos, sfe_otos_pose2d_t &vel, sfe_otos_pose2d_t &acc)
Gets the position, velocity, and acceleration measured by the OTOS in a single burst read.
Definition: sfDevOTOS.cpp:333
sfTkError_t getLinearScalar(float &scalar)
Gets the linear scalar used by the OTOS.
Definition: sfDevOTOS.cpp:209
sfTkError_t getPositionStdDev(sfe_otos_pose2d_t &pose)
Gets the standard deviation of the measured position.
Definition: sfDevOTOS.cpp:318
static constexpr uint8_t kRegOffXL
Definition: sfDevOTOS.h:411
sfTkError_t setSignalProcessConfig(sfe_otos_signal_process_config_t &config)
Sets the signal processing configuration on the OTOS. This is primarily useful for creating and testi...
Definition: sfDevOTOS.cpp:277
sfe_otos_angular_unit_t _angularUnit
Definition: sfDevOTOS.h:394
sfTkError_t getOffset(sfe_otos_pose2d_t &pose)
Gets the offset of the OTOS.
Definition: sfDevOTOS.cpp:288
sfe_otos_linear_unit_t getLinearUnit()
Gets the linear unit used by all methods using a pose.
Definition: sfDevOTOS.cpp:173
static constexpr uint8_t kRegAccStdYL
Definition: sfDevOTOS.h:450
sfTkII2C * _commBus
Definition: sfDevOTOS.h:388
sfTkError_t resetTracking()
Resets the tracking algorithm, which resets the position to the origin, but can also be used to recov...
Definition: sfDevOTOS.cpp:265
static constexpr uint8_t kRegAccXH
Definition: sfDevOTOS.h:431
static constexpr uint8_t kRegAccYL
Definition: sfDevOTOS.h:432
static constexpr uint8_t kRegVelStdYH
Definition: sfDevOTOS.h:445
static constexpr uint8_t kRegPosStdYH
Definition: sfDevOTOS.h:439
sfTkError_t setAngularScalar(float scalar)
Sets the angular scalar used by the OTOS. Can be used to compensate for scaling issues with the senso...
Definition: sfDevOTOS.cpp:252
sfTkError_t getPosVelAccAndStdDev(sfe_otos_pose2d_t &pos, sfe_otos_pose2d_t &vel, sfe_otos_pose2d_t &acc, sfe_otos_pose2d_t &posStdDev, sfe_otos_pose2d_t &velStdDev, sfe_otos_pose2d_t &accStdDev)
Gets the position, velocity, acceleration, and standard deviation of each in a single burst read.
Definition: sfDevOTOS.cpp:377
static constexpr float kInt16ToMeter
Definition: sfDevOTOS.h:468
static constexpr float kInt16ToRps
Definition: sfDevOTOS.h:492
static constexpr uint8_t kRegOffHL
Definition: sfDevOTOS.h:415
void poseToRegs(uint8_t *rawData, sfe_otos_pose2d_t &pose, float xyToRaw, float hToRaw)
Definition: sfDevOTOS.cpp:447
static constexpr uint8_t kRegSignalProcess
Definition: sfDevOTOS.h:409
static constexpr uint8_t kRegOffXH
Definition: sfDevOTOS.h:412
static constexpr uint8_t kRegVelStdXH
Definition: sfDevOTOS.h:443
static constexpr float kInchToMeter
Definition: sfDevOTOS.h:460
sfTkError_t calibrateImu(uint8_t numSamples=255, bool waitUntilDone=true)
Calibrates the IMU on the OTOS, which removes the accelerometer and gyroscope offsets.
Definition: sfDevOTOS.cpp:128
static constexpr float kInt16ToMps
Definition: sfDevOTOS.h:474
static constexpr float kMinScalar
Minimum scalar value for the linear and angular scalars.
Definition: sfDevOTOS.h:365
static constexpr uint8_t kRegVelStdXL
Definition: sfDevOTOS.h:442
static constexpr uint8_t kRegPosStdHL
Definition: sfDevOTOS.h:440
static constexpr float kMeterToInch
Definition: sfDevOTOS.h:459
sfe_otos_angular_unit_t getAngularUnit()
Gets the angular unit used by all methods using a pose.
Definition: sfDevOTOS.cpp:191
static constexpr uint8_t kRegOffYH
Definition: sfDevOTOS.h:414
static constexpr uint8_t kProductId
Definition: sfDevOTOS.h:456
static constexpr uint8_t kRegHwVersion
Definition: sfDevOTOS.h:403
static constexpr uint8_t kRegVelStdHL
Definition: sfDevOTOS.h:446
static constexpr uint8_t kDefaultAddress
Default I2C addresses of the Qwiic OTOS.
Definition: sfDevOTOS.h:362
sfDevOTOS()
Default constructor, only initializes member variables.
Definition: sfDevOTOS.cpp:31
static constexpr uint8_t kRegPosXL
Definition: sfDevOTOS.h:418
static constexpr uint8_t kRegPosStdXH
Definition: sfDevOTOS.h:437
virtual void delayMs(uint32_t ms)=0
static constexpr uint8_t kRegVelStdHH
Definition: sfDevOTOS.h:447
static constexpr uint8_t kRegPosStdYL
Definition: sfDevOTOS.h:438
sfe_otos_linear_unit_t
Enumerations for linear units used by the OTOS driver.
Definition: sfDevOTOS.h:54
@ kSfeOtosLinearUnitMeters
Meters.
Definition: sfDevOTOS.h:56
@ kSfeOtosLinearUnitInches
Inches (default)
Definition: sfDevOTOS.h:59
sfe_otos_angular_unit_t
Enumerations for angular units used by the OTOS driver.
Definition: sfDevOTOS.h:65
@ kSfeOtosAngularUnitRadians
Radians.
Definition: sfDevOTOS.h:67
@ kSfeOtosAngularUnitDegrees
Degrees (default)
Definition: sfDevOTOS.h:70
2D pose structure, including x and y coordinates and heading angle
Definition: sfDevOTOS.h:40
float y
Y value.
Definition: sfDevOTOS.h:45
float x
X value.
Definition: sfDevOTOS.h:42
float h
Heading value.
Definition: sfDevOTOS.h:48
Self test register bit fields.
Definition: sfDevOTOS.h:119
uint8_t inProgress
Returns 1 while the self test is in progress.
Definition: sfDevOTOS.h:126
uint8_t fail
Returns 1 if the self test failed.
Definition: sfDevOTOS.h:132
uint8_t start
Write 1 to start the self test.
Definition: sfDevOTOS.h:123
uint8_t value
Raw register value.
Definition: sfDevOTOS.h:139
uint8_t reserved
Reserved bits, do not use.
Definition: sfDevOTOS.h:135
uint8_t pass
Returns 1 if the self test passed.
Definition: sfDevOTOS.h:129
Signal process config register bit fields.
Definition: sfDevOTOS.h:91
uint8_t reserved
Reserved bits, do not use.
Definition: sfDevOTOS.h:110
uint8_t enAcc
Whether to feed the accelerometer data to the Kalman filters.
Definition: sfDevOTOS.h:99
uint8_t enRot
Whether to rotate the IMU and optical sensor data by the heading angle.
Definition: sfDevOTOS.h:103
uint8_t value
Raw register value.
Definition: sfDevOTOS.h:114
uint8_t enLut
Whether to use the internal lookup table calibration for the optical sensor.
Definition: sfDevOTOS.h:96
uint8_t enVar
Whether to use the correct sensor variance in the Kalman filters, or use 0 varaince to effectively di...
Definition: sfDevOTOS.h:107
Status register bit fields.
Definition: sfDevOTOS.h:144
uint8_t value
Raw register value.
Definition: sfDevOTOS.h:166
uint8_t warnTiltAngle
Returns 1 if the tilt angle threshold has been exceeded. While set, the accelerometer data is ignored...
Definition: sfDevOTOS.h:149
uint8_t errorLsm
Returns 1 if the IMU has a fatal error.
Definition: sfDevOTOS.h:162
uint8_t warnOpticalTracking
Returns 1 if the optical tracking is unreliable. While set, only the IMU data is used for tracking un...
Definition: sfDevOTOS.h:153
uint8_t errorPaa
Returns 1 if the optical sensor has a fatal error.
Definition: sfDevOTOS.h:159
uint8_t reserved
Reserved bits, do not use.
Definition: sfDevOTOS.h:156
Version register bit fields.
Definition: sfDevOTOS.h:75
uint8_t major
Major version number.
Definition: sfDevOTOS.h:82
uint8_t minor
Minor version number.
Definition: sfDevOTOS.h:79
uint8_t value
Raw register value.
Definition: sfDevOTOS.h:86