40 inline short &
ax() {
return v[0]; }
41 inline short const &
ax()
const {
return v[0]; }
42 inline short &
ay() {
return v[1]; }
43 inline short const &
ay()
const {
return v[1]; }
44 inline short &
az() {
return v[2]; }
45 inline short const &
az()
const {
return v[2]; }
46 inline short &
gx() {
return v[3]; }
47 inline short const &
gx()
const {
return v[3]; }
48 inline short &
gy() {
return v[4]; }
49 inline short const &
gy()
const {
return v[4]; }
50 inline short &
gz() {
return v[5]; }
51 inline short const &
gz()
const {
return v[5]; }
52 inline short &
temp() {
return v[6]; }
53 inline short const &
temp()
const {
return v[6]; }
54 inline short &
mx() {
return v[7]; }
55 inline short const &
mx()
const {
return v[7]; }
56 inline short &
my() {
return v[8]; }
57 inline short const &
my()
const {
return v[8]; }
58 inline short &
mz() {
return v[9]; }
59 inline short const &
mz()
const {
return v[9]; }
60 inline short &
mst2() {
return v[10]; }
61 inline short const &
mst2()
const {
return v[10]; }
75 inline float &
ax() {
return v[0]; }
76 inline float const &
ax()
const {
return v[0]; }
77 inline float &
ay() {
return v[1]; }
78 inline float const &
ay()
const {
return v[1]; }
79 inline float &
az() {
return v[2]; }
80 inline float const &
az()
const {
return v[2]; }
81 inline float &
gx() {
return v[3]; }
82 inline float const &
gx()
const {
return v[3]; }
83 inline float &
gy() {
return v[4]; }
84 inline float const &
gy()
const {
return v[4]; }
85 inline float &
gz() {
return v[5]; }
86 inline float const &
gz()
const {
return v[5]; }
87 inline float &
temp() {
return v[6]; }
88 inline float const &
temp()
const {
return v[6]; }
89 inline float &
mx() {
return v[7]; }
90 inline float const &
mx()
const {
return v[7]; }
91 inline float &
my() {
return v[8]; }
92 inline float const &
my()
const {
return v[8]; }
93 inline float &
mz() {
return v[9]; }
94 inline float const &
mz()
const {
return v[9]; }
100#define JEVOIS_DMP_ACCEL 0x8000
101#define JEVOIS_DMP_GYRO 0x4000
102#define JEVOIS_DMP_CPASS 0x2000
103#define JEVOIS_DMP_ALS 0x1000
104#define JEVOIS_DMP_QUAT6 0x0800
105#define JEVOIS_DMP_QUAT9 0x0400
106#define JEVOIS_DMP_PQUAT6 0x0200
107#define JEVOIS_DMP_GEOMAG 0x0100
108#define JEVOIS_DMP_PRESSURE 0x0080
109#define JEVOIS_DMP_GYRO_CALIBR 0x0040
110#define JEVOIS_DMP_CPASS_CALIBR 0x0020
111#define JEVOIS_DMP_PED_STEPDET 0x0010
112#define JEVOIS_DMP_HEADER2 0x0008
113#define JEVOIS_DMP_PED_STEPIND 0x0007
115#define JEVOIS_DMP_ACCEL_ACCURACY 0x4000
116#define JEVOIS_DMP_GYRO_ACCURACY 0x2000
117#define JEVOIS_DMP_CPASS_ACCURACY 0x1000
118#define JEVOIS_DMP_FSYNC 0x0800
119#define JEVOIS_DMP_FLIP_PICKUP 0x0400
120#define JEVOIS_DMP_BATCH_MODE_EN 0x0100
121#define JEVOIS_DMP_ACT_RECOG 0x0080
132 void parsePacket(
unsigned char const * packet,
size_t siz);
173 std::vector<std::string>
activity();
188 size_t DMPpacketSize(
unsigned short ctl1,
unsigned short ctl2);
size_t DMPpacketSize(unsigned short ctl1, unsigned short ctl2)
Helper function to determine DMP packet size depending on options.
Main namespace for all JeVois classes and functions.
DMP data (Digital Motion Processor)
short cpassacc
Compass accuracy data (when JEVOIS_DMP_CPASS_ACCURACY in header2)
unsigned short bacstate
Activity recognition state (when JEVOIS_DMP_ACT_RECOG in header2)
short gyroacc
Gyro accuracy data (when JEVOIS_DMP_GYRO_ACCURACY in header2)
unsigned short steps
Number of steps (0..7) detected this cycle (when JEVOIS_DMP_PED_STEPDET)
long quat9acc
Quaternion9 accuracy (when JEVOIS_DMP_QUAT9 in header1)
long cpasscal[3]
Compass calibration data (when JEVOIS_DMP_CPASS_CALIBR in header1)
short gyro[3]
Raw gyro data (when JEVOIS_DMP_GYRO in header1)
short gyrobias[3]
Gyro bias/calibration data (when JEVOIS_DMP_GYRO_CALIBR in header1)
std::vector< std::string > activity2()
unsigned short fsync
Delay between FSYNC received from camera and first subsequent IMU data generated.
short accel[3]
Raw accelerometer data (when JEVOIS_DMP_ACCEL in header1)
unsigned short header1
Header 1 fields that indicate what data is valid.
short accelacc
Accelerometer accuracy data (when JEVOIS_DMP_ACCEL_ACCURACY in header2)
void parsePacket(unsigned char const *packet, size_t siz)
Populate our fields from a packet received from the DMP.
short cpass[3]
Raw compass data (when JEVOIS_DMP_CPASS in header1)
std::vector< std::string > activity()
Decode current ongoing activities into a string.
unsigned short header2
Header 2 fields that indicate what data is valid.
unsigned long stepts
Step detection timestamp (when JEVOIS_DMP_PED_STEPDET)
long quat9[3]
Quaternion9 data (when JEVOIS_DMP_QUAT9 in header1)
long geomagacc
Geomag accuracy (when JEVOIS_DMP_GEOMAG in header1)
long quat6[3]
Quaternion6 data (when JEVOIS_DMP_QUAT6 in header1)
float fsync_us() const
Delay between FSYNC and next IMU data, in microseconds.
short pickup
Flip/pickup detection (when JEVOIS_DMP_FLIP_PICKUP in header2)
unsigned short odrcnt
Output data rate counter (always here but unclear what it is)
long geomag[3]
Geomag data (when JEVOIS_DMP_GEOMAG in header1)
long bacts
Activity recognition timestamp (when JEVOIS_DMP_ACT_RECOG in header2)
static float fix2float(long val)
Convert a long fixed-point value to float.
short gbias[3]
Raw gyro bias data (when JEVOIS_DMP_GYRO in header1)
float const & temp() const
float v[10]
The values: ax, ay, az, gy, gy, gz, temp, mx, my, mz.
bool magovf
True if magnetometer overflow.
short v[11]
The values: ax, ay, az, gy, gy, gz, temp, mx, my, mz, mst2.
short const & mst2() const
short const & temp() const