61 "data is returned each
time get() is called, hence timing may not be very "
62 "accurate depending on how regularly
get() is called. FIFO collects accel and gyro data "
63 "at the exact rates specified by parameters arate, grate into a 1kb FIFO
queue, and "
64 "
get() takes that data back from the FIFO. DMP runs the embedded "
65 "digital motion processor on raw data, and accumulates resulting output "
67 "parameter can only be set in a module's params.cfg
file.",
72 "Use any
string of letters including:"
76 "R=quaternion 6 (uses accel + gyro), "
77 "
Q=quaternion 9 (uses accel + gyro + compass), "
78 "
E=geomag (uses accel + compass), "
79 "P=flip/pickup detection, "
81 "T=activity recognition, "
82 "
F=frame sync from video sensor, "
83 "w=configure activity recognition for wearable, "
84 "g=gyro calibration (always on when gyro used), "
85 "m=compass calibration (always on when compass used), "
86 "b=accel accuracy (always on when accel used), "
87 "
h=gyro accuracy (always on when gyro used), "
88 "n=compass accuracy (always on when compass used).",
97 "accelerometer. Actual sample
rate may differ because of finite and "
98 "discrete divider settings. In FIFO
mode, grate controls the data
rate.",
103 "gyroscope. Actual sample
rate may differ because of finite and "
104 "discrete divider settings. In FIFO
mode, grate controls the data
rate.",
113 "set this parameter to Once to obtain repeated measurements "
114 "at your own pace. In JeVois
Inventor, you need to alternate between "
115 "Off and Once. In FIFO
mode, grate controls the data
rate.",
120 "low-pass filter on accelerometer data.",
121 50, { 0, 6, 12, 24, 50, 111, 246, 470, 1210 }, ParamCateg);
125 "filter on gyroscope data.",
126 51, { 0, 6, 12, 24, 51, 120, 150, 200, 360, 12100 }, ParamCateg);
130 "temperature sensor. Temperature sampling rate is always 1125Hz unless "
131 "tbw is 7932, in which case sampling is at 9kHz.",
132 34, { 0, 9, 17, 34, 66, 123, 218, 7932 }, ParamCateg);
137 4, { 2, 4, 8, 16 }, ParamCateg);
141 "500 means +/-500 degrees per second)).",
142 500, { 250, 500, 1000, 2000 }, ParamCateg);
200 public Parameter<imu::mode, imu::dmp, imu::arate, imu::grate, imu::mrate, imu::abw, imu::gbw,
201 imu::tbw, imu::arange, imu::grange, imu::pktdbg>
205 ICM20948(std::string
const & instance);
245 void sleep(
bool enable);
246 void cycle(
bool enable);
250 std::shared_ptr<IMU> itsIMU;
252 void onParamChange(imu::arate
const & param,
float const & newval)
override;
253 void onParamChange(imu::grate
const & param,
float const & newval)
override;
255 void onParamChange(imu::abw
const & param,
unsigned int const & newval)
override;
256 void onParamChange(imu::gbw
const & param,
unsigned int const & newval)
override;
257 void onParamChange(imu::tbw
const & param,
unsigned int const & newval)
override;
258 void onParamChange(imu::arange
const & param,
unsigned int const & newval)
override;
259 void onParamChange(imu::grange
const & param,
unsigned int const & newval)
override;
260 void onParamChange(imu::dmp
const & param, std::string
const & newval)
override;
262 unsigned char readMagRegister(
unsigned char magreg);
263 void writeMagRegister(
unsigned char magreg,
unsigned char val);
264 void waitForSlave4();
265 void computeFIFOpktSize(
float ar,
float gr,
int mm);
266 size_t getDMPsome(
bool blocking,
size_t desired);
268 unsigned short itsFIFOpktSiz = 0;
270 unsigned char itsDMPpacket[1024];