Go to the documentation of this file.
10 #ifndef _CMTDEF_H_2006_05_01
11 #define _CMTDEF_H_2006_05_01
23 #define B230400 0010003
24 #define B460800 0010004
25 #define B921600 0010007
28 #define __cdecl // __attribute__((cdecl)) // JLBC @ MRPT: GCC warns about
30 #define __stdcall // __attribute__((stdcall)) // JLBC @ MRPT: GCC warns about
34 #ifndef _XSENS_STD_H_2006_09_11
37 #if !defined(_XSENS_TIME_2006_09_12) && !defined(_CMT_DLL_IMPORT)
41 #ifndef _CMT_FILE_DEF_H_2007_01_24
45 #ifdef _CMT_STATIC_LIB
51 #define CMT_IND_PREAMBLE 0
55 #define CMT_IND_DATA0 4
56 #define CMT_IND_LENEXTH 4
57 #define CMT_IND_LENEXTL 5
58 #define CMT_IND_DATAEXT0 6
60 #define CMT_PREAMBLE 0xFA
61 #define CMT_BID_MASTER 0xFF
62 #define CMT_BID_MT 0x01
63 #define CMT_EXTLENCODE 0xFF
65 #define CMT_LEN_MSGHEADER 4
66 #define CMT_LEN_MSGEXTHEADER 6
67 #define CMT_LEN_MSGHEADERCS 5
68 #define CMT_LEN_MSGEXTHEADERCS 7
69 #define CMT_LEN_CHECKSUM 1
70 #define CMT_LEN_UNSIGSHORT 2
71 #define CMT_LEN_UNSIGINT 4
72 #define CMT_LEN_FLOAT 4
75 #define CMT_MAXDATALEN 8192
76 #define CMT_MAXSHORTDATALEN 254
77 #define CMT_MAXMSGLEN (CMT_MAXDATALEN + 7)
78 #define CMT_MAXSHORTMSGLEN (CMT_MAXSHORTDATALEN + 5)
79 #define CMT_MAXGARBAGE (CMT_MAXMSGLEN + 1)
82 #define CMT_DID_TYPEH_MASK 0x00F00000
83 #define CMT_DID_TYPEH_MT 0x00000000
84 #define CMT_DID_TYPEH_XM 0x00100000
85 #define CMT_DID_TYPEH_MTI_MTX 0x00300000
86 #define CMT_DID_TYPEH_MTIG 0x00500000
90 #define CMT_MID_WAKEUP 0x3E
91 #define CMT_MID_WAKEUPACK 0x3F
94 #define CMT_MID_REQDID 0x00
95 #define CMT_MID_DEVICEID 0x01
96 #define CMT_LEN_DEVICEID 4
97 #define CMT_MID_INITBUS 0x02
98 #define CMT_MID_INITBUSRESULTS 0x03
99 #define CMT_LEN_INITBUSRESULTS 4
100 #define CMT_MID_REQPERIOD 0x04
101 #define CMT_MID_REQPERIODACK 0x05
102 #define CMT_LEN_PERIOD 2
103 #define CMT_MID_SETPERIOD 0x04
104 #define CMT_MID_SETPERIODACK 0x05
106 #define CMT_MID_SETBID 0x06
107 #define CMT_MID_SETBIDACK 0x07
108 #define CMT_MID_AUTOSTART 0x06
109 #define CMT_MID_AUTOSTARTACK 0x07
110 #define CMT_MID_BUSPWR 0x08
111 #define CMT_LEN_BUSPWR 2
112 #define CMT_MID_BUSPWRACK 0x09
114 #define CMT_MID_REQDATALENGTH 0x0A
115 #define CMT_MID_DATALENGTH 0x0B
116 #define CMT_LEN_DATALENGTH 2
117 #define CMT_MID_REQCONFIGURATION 0x0C
118 #define CMT_MID_CONFIGURATION 0x0D
119 #define CMT_LEN_CONFIGURATION 118
120 #define CMT_MID_RESTOREFACTORYDEF 0x0E
121 #define CMT_MID_RESTOREFACTORYDEFACK 0x0F
123 #define CMT_MID_GOTOMEASUREMENT 0x10
124 #define CMT_MID_GOTOMEASUREMENTACK 0x11
125 #define CMT_MID_REQFWREV 0x12
126 #define CMT_MID_FIRMWAREREV 0x13
127 #define CMT_LEN_FIRMWAREREV 3
129 #define CMT_MID_REQBTDISABLE 0x14
130 #define CMT_MID_REQBTDISABLEACK 0x15
131 #define CMT_LEN_BTDISABLE 1
132 #define CMT_MID_DISABLEBT 0x14
133 #define CMT_MID_DISABLEBTACK 0x15
134 #define CMT_MID_REQOPMODE 0x16
135 #define CMT_MID_REQOPMODEACK 0x17
136 #define CMT_LEN_OPMODE 1
137 #define CMT_MID_SETOPMODE 0x16
138 #define CMT_MID_SETOPMODEACK 0x17
140 #define CMT_MID_REQBAUDRATE 0x18
141 #define CMT_MID_REQBAUDRATEACK 0x19
142 #define CMT_LEN_BAUDRATE 1
143 #define CMT_MID_SETBAUDRATE 0x18
144 #define CMT_MID_SETBAUDRATEACK 0x19
146 #define CMT_MID_REQSYNCMODE 0x1A
147 #define CMT_MID_REQSYNCMODEACK 0x1B
148 #define CMT_LEN_SYNCMODE 1
149 #define CMT_MID_SETSYNCMODE 0x1A
150 #define CMT_MID_SETSYNCMODEACK 0x1B
152 #define CMT_MID_REQPRODUCTCODE 0x1C
153 #define CMT_MID_PRODUCTCODE 0x1D
154 #define CMT_LEN_PRODUCTCODE 20
157 #define CMT_MID_XMPWROFF 0x44
158 #define CMT_LEN_XMPWROFF 0
161 #define CMT_MID_REQOUTPUTMODE 0xD0
162 #define CMT_MID_REQOUTPUTMODEACK 0xD1
163 #define CMT_LEN_OUTPUTMODE 2
164 #define CMT_MID_SETOUTPUTMODE 0xD0
165 #define CMT_MID_SETOUTPUTMODEACK 0xD1
167 #define CMT_MID_REQOUTPUTSETTINGS 0xD2
168 #define CMT_MID_REQOUTPUTSETTINGSACK 0xD3
169 #define CMT_LEN_OUTPUTSETTINGS 4
170 #define CMT_MID_SETOUTPUTSETTINGS 0xD2
171 #define CMT_MID_SETOUTPUTSETTINGSACK 0xD3
173 #define CMT_MID_REQOUTPUTSKIPFACTOR 0xD4
174 #define CMT_MID_REQOUTPUTSKIPFACTORACK 0xD5
175 #define CMT_LEN_OUTPUTSKIPFACTOR 2
176 #define CMT_MID_SETOUTPUTSKIPFACTOR 0xD4
177 #define CMT_MID_SETOUTPUTSKIPFACTORACK 0xD5
179 #define CMT_MID_REQSYNCINSETTINGS 0xD6
180 #define CMT_MID_REQSYNCINSETTINGSACK 0xD7
181 #define CMT_LEN_SYNCINMODE 2
182 #define CMT_LEN_SYNCINSKIPFACTOR 2
183 #define CMT_LEN_SYNCINOFFSET 4
184 #define CMT_MID_SETSYNCINSETTINGS 0xD6
185 #define CMT_MID_SETSYNCINSETTINGSACK 0xD7
187 #define CMT_MID_REQSYNCOUTSETTINGS 0xD8
188 #define CMT_MID_REQSYNCOUTSETTINGSACK 0xD9
189 #define CMT_LEN_SYNCOUTMODE 2
190 #define CMT_LEN_SYNCOUTSKIPFACTOR 2
191 #define CMT_LEN_SYNCOUTOFFSET 4
192 #define CMT_LEN_SYNCOUTPULSEWIDTH 4
193 #define CMT_MID_SETSYNCOUTSETTINGS 0xD8
194 #define CMT_MID_SETSYNCOUTSETTINGSACK 0xD9
196 #define CMT_MID_REQERRORMODE 0xDA
197 #define CMT_MID_REQERRORMODEACK 0xDB
198 #define CMT_LEN_ERRORMODE 2
199 #define CMT_MID_SETERRORMODE 0xDA
200 #define CMT_MID_SETERRORMODEACK 0xDB
202 #define CMT_MID_REQTRANSMITDELAY 0xDC
203 #define CMT_MID_REQTRANSMITDELAYACK 0xDD
204 #define CMT_LEN_TRANSMITDELAY 2
205 #define CMT_MID_SETTRANSMITDELAY 0xDC
206 #define CMT_MID_SETTRANSMITDELAYACK 0xDD
209 #define CMT_MID_REQXMERRORMODE 0x82
210 #define CMT_MID_REQXMERRORMODEACK 0x83
211 #define CMT_LEN_XMERRORMODE 2
212 #define CMT_MID_SETXMERRORMODE 0x82
213 #define CMT_MID_SETXMERRORMODEACK 0x83
215 #define CMT_MID_REQBUFFERSIZE 0x84
216 #define CMT_MID_REQBUFFERSIZEACK 0x85
217 #define CMT_LEN_BUFFERSIZE 2
218 #define CMT_MID_SETBUFFERSIZE 0x84
219 #define CMT_MID_SETBUFFERSIZEACK 0x85
222 #define CMT_MID_REQHEADING 0x82
223 #define CMT_MID_REQHEADINGACK 0x83
224 #define CMT_LEN_HEADING 4
225 #define CMT_MID_SETHEADING 0x82
226 #define CMT_MID_SETHEADINGACK 0x83
228 #define CMT_MID_REQMAGNETICDECLINATION 0x6A
229 #define CMT_MID_REQMAGNETICDECLINATIONACK 0x6B
230 #define CMT_LEN_MAGNETICDECLINATION 4
231 #define CMT_MID_SETMAGNETICDECLINATION 0x6A
232 #define CMT_MID_SETMAGNETICDECLINATIONACK 0x6B
234 #define CMT_MID_REQLOCATIONID 0x84
235 #define CMT_MID_REQLOCATIONIDACK 0x85
236 #define CMT_LEN_LOCATIONID 2
237 #define CMT_MID_SETLOCATIONID 0x84
238 #define CMT_MID_SETLOCATIONIDACK 0x85
240 #define CMT_MID_REQEXTOUTPUTMODE 0x86
241 #define CMT_MID_REQEXTOUTPUTMODEACK 0x87
242 #define CMT_LEN_EXTOUTPUTMODE 2
243 #define CMT_MID_SETEXTOUTPUTMODE 0x86
244 #define CMT_MID_SETEXTOUTPUTMODEACK 0x87
247 #define CMT_MID_REQBATLEVEL 0x88
248 #define CMT_MID_BATLEVEL 0x89
251 #define CMT_MID_REQINITTRACKMODE 0x88
252 #define CMT_MID_REQINITTRACKMODEACK 0x89
253 #define CMT_LEN_INITTRACKMODE 2
254 #define CMT_MID_SETINITTRACKMODE 0x88
255 #define CMT_MID_SETINITTRACKMODEACK 0x89
262 #define CMT_MID_STOREXKFSTATE 0x8A
263 #define CMT_LEN_STOREXKFSTATE 0
264 #define CMT_MID_STOREXKFSTATEACK 0x8B
266 #define CMT_MID_REQUTCTIME 0x60
267 #define CMT_MID_UTCTIME 0x61
268 #define CMT_LEN_UTCTIME 12
270 #define CMT_LEN_SCENARIOLABEL 20
271 #define CMT_LEN_SCENARIOFULL (1 + 1 + CMT_LEN_SCENARIOLABEL)
272 #define CMT_MID_REQAVAILABLESCENARIOS 0x62
273 #define CMT_MID_AVAILABLESCENARIOS 0x63
274 #define CMT_LEN_AVAILABLESCENARIOS \
275 (CMT_MAX_SCENARIOS_IN_MT * CMT_LEN_SCENARIOFULL)
277 #define CMT_MID_REQSCENARIO 0x64
278 #define CMT_MID_REQSCENARIOACK 0x65
279 #define CMT_LEN_REQSCENARIOACK 2
280 #define CMT_MID_SETSCENARIO 0x64
281 #define CMT_MID_SETSCENARIOACK 0x65
282 #define CMT_LEN_SETSCENARIO 1
284 #define CMT_MID_REQGRAVITYMAGNITUDE 0x66
285 #define CMT_MID_REQGRAVITYMAGNITUDEACK 0x67
286 #define CMT_MID_SETGRAVITYMAGNITUDE 0x66
287 #define CMT_MID_SETGRAVITYMAGNITUDEACK 0x67
288 #define CMT_LEN_GRAVITYMAGNITUDE 4
290 #define CMT_MID_REQGPSLEVERARM 0x68
291 #define CMT_MID_REQGPSLEVERARMACK 0x69
292 #define CMT_MID_SETGPSLEVERARM 0x68
293 #define CMT_MID_SETGPSLEVERARMACK 0x69
294 #define CMT_LEN_GPSLEVERARM 12
297 #define CMT_MID_GOTOCONFIG 0x30
298 #define CMT_MID_GOTOCONFIGACK 0x31
299 #define CMT_MID_BUSDATA 0x32
300 #define CMT_MID_MTDATA 0x32
303 #define CMT_MID_PREPAREDATA 0x32
304 #define CMT_MID_REQDATA 0x34
305 #define CMT_MID_REQDATAACK 0x35
309 #define CMT_LEN_RAWDATA 20
310 #define CMT_LEN_CALIBDATA 36
311 #define CMT_LEN_CALIB_ACCDATA 12
312 #define CMT_LEN_CALIB_GYRDATA 12
313 #define CMT_LEN_CALIB_MAGDATA 12
314 #define CMT_LEN_ORIENT_QUATDATA 16
315 #define CMT_LEN_ORIENT_EULERDATA 12
316 #define CMT_LEN_ORIENT_MATRIXDATA 36
317 #define CMT_LEN_SAMPLECNT 2
318 #define CMT_LEN_TEMPDATA 4
321 #define CMT_LEN_CALIBDATA_FLT 9
322 #define CMT_LEN_ORIENT_QUATDATA_FLT 4
323 #define CMT_LEN_ORIENT_EULERDATA_FLT 3
324 #define CMT_LEN_ORIENT_MATRIXDATA_FLT 9
329 #define CMT_IND_RAW_ACCX 0
330 #define CMT_IND_RAW_ACCY 2
331 #define CMT_IND_RAW_ACCZ 4
332 #define CMT_IND_RAW_GYRX 6
333 #define CMT_IND_RAW_GYRY 8
334 #define CMT_IND_RAW_GYRZ 10
335 #define CMT_IND_RAW_MAGX 12
336 #define CMT_IND_RAW_MAGY 14
337 #define CMT_IND_RAW_MAGZ 16
338 #define CMT_IND_RAW_TEMP 18
340 #define CMT_IND_CALIB_ACCX 0
341 #define CMT_IND_CALIB_ACCY 4
342 #define CMT_IND_CALIB_ACCZ 8
343 #define CMT_IND_CALIB_GYRX 12
344 #define CMT_IND_CALIB_GYRY 16
345 #define CMT_IND_CALIB_GYRZ 20
346 #define CMT_IND_CALIB_MAGX 24
347 #define CMT_IND_CALIB_MAGY 28
348 #define CMT_IND_CALIB_MAGZ 32
350 #define CMT_IND_ORIENT_Q0 0
351 #define CMT_IND_ORIENT_Q1 4
352 #define CMT_IND_ORIENT_Q2 8
353 #define CMT_IND_ORIENT_Q3 12
355 #define CMT_IND_ORIENT_ROLL 0
356 #define CMT_IND_ORIENT_PITCH 4
357 #define CMT_IND_ORIENT_YAW 8
359 #define CMT_IND_ORIENT_A 0
360 #define CMT_IND_ORIENT_B 4
361 #define CMT_IND_ORIENT_C 8
362 #define CMT_IND_ORIENT_D 12
363 #define CMT_IND_ORIENT_E 16
364 #define CMT_IND_ORIENT_F 20
365 #define CMT_IND_ORIENT_G 24
366 #define CMT_IND_ORIENT_H 28
367 #define CMT_IND_ORIENT_I 32
369 #define CMT_IND_SAMPLECNTH 0
370 #define CMT_IND_SAMPLECNTL 1
374 #define CMT_FLDNUM_RAW_ACCX 0
375 #define CMT_FLDNUM_RAW_ACCY 1
376 #define CMT_FLDNUM_RAW_ACCZ 2
377 #define CMT_FLDNUM_RAW_GYRX 3
378 #define CMT_FLDNUM_RAW_GYRY 4
379 #define CMT_FLDNUM_RAW_GYRZ 5
380 #define CMT_FLDNUM_RAW_MAGX 6
381 #define CMT_FLDNUM_RAW_MAGY 7
382 #define CMT_FLDNUM_RAW_MAGZ 8
383 #define CMT_FLDNUM_RAW_TEMP 9
385 #define CMT_FLDNUM_CALIB_ACCX 0
386 #define CMT_FLDNUM_CALIB_ACCY 1
387 #define CMT_FLDNUM_CALIB_ACCZ 2
388 #define CMT_FLDNUM_CALIB_GYRX 3
389 #define CMT_FLDNUM_CALIB_GYRY 4
390 #define CMT_FLDNUM_CALIB_GYRZ 5
391 #define CMT_FLDNUM_CALIB_MAGX 6
392 #define CMT_FLDNUM_CALIB_MAGY 7
393 #define CMT_FLDNUM_CALIB_MAGZ 8
395 #define CMT_FLDNUM_ORIENT_Q0 0
396 #define CMT_FLDNUM_ORIENT_Q1 1
397 #define CMT_FLDNUM_ORIENT_Q2 2
398 #define CMT_FLDNUM_ORIENT_Q3 3
400 #define CMT_FLDNUM_ORIENT_ROLL 0
401 #define CMT_FLDNUM_ORIENT_PITCH 1
402 #define CMT_FLDNUM_ORIENT_YAW 2
404 #define CMT_FLDNUM_ORIENT_A 0
405 #define CMT_FLDNUM_ORIENT_B 1
406 #define CMT_FLDNUM_ORIENT_C 2
407 #define CMT_FLDNUM_ORIENT_D 3
408 #define CMT_FLDNUM_ORIENT_E 4
409 #define CMT_FLDNUM_ORIENT_F 5
410 #define CMT_FLDNUM_ORIENT_G 6
411 #define CMT_FLDNUM_ORIENT_H 7
412 #define CMT_FLDNUM_ORIENT_I 8
415 #define CMT_LEN_RAW_ACCX 2
416 #define CMT_LEN_RAW_ACCY 2
417 #define CMT_LEN_RAW_ACCZ 2
418 #define CMT_LEN_RAW_GYRX 2
419 #define CMT_LEN_RAW_GYRY 2
420 #define CMT_LEN_RAW_GYRZ 2
421 #define CMT_LEN_RAW_MAGX 2
422 #define CMT_LEN_RAW_MAGY 2
423 #define CMT_LEN_RAW_MAGZ 2
424 #define CMT_LEN_RAW_TEMP 2
426 #define CMT_LEN_CALIB_ACCX 4
427 #define CMT_LEN_CALIB_ACCY 4
428 #define CMT_LEN_CALIB_ACCZ 4
429 #define CMT_LEN_CALIB_GYRX 4
430 #define CMT_LEN_CALIB_GYRY 4
431 #define CMT_LEN_CALIB_GYRZ 4
432 #define CMT_LEN_CALIB_MAGX 4
433 #define CMT_LEN_CALIB_MAGY 4
434 #define CMT_LEN_CALIB_MAGZ 4
436 #define CMT_LEN_ORIENT_Q0 4
437 #define CMT_LEN_ORIENT_Q1 4
438 #define CMT_LEN_ORIENT_Q2 4
439 #define CMT_LEN_ORIENT_Q3 4
441 #define CMT_LEN_ORIENT_ROLL 4
442 #define CMT_LEN_ORIENT_PITCH 4
443 #define CMT_LEN_ORIENT_YAW 4
445 #define CMT_LEN_ORIENT_A 4
446 #define CMT_LEN_ORIENT_B 4
447 #define CMT_LEN_ORIENT_C 4
448 #define CMT_LEN_ORIENT_D 4
449 #define CMT_LEN_ORIENT_E 4
450 #define CMT_LEN_ORIENT_F 4
451 #define CMT_LEN_ORIENT_G 4
452 #define CMT_LEN_ORIENT_H 4
453 #define CMT_LEN_ORIENT_I 4
456 #define CMT_VALUE_RAW_ACC 0
457 #define CMT_VALUE_RAW_GYR 1
458 #define CMT_VALUE_RAW_MAG 2
459 #define CMT_VALUE_RAW_TEMP 3
460 #define CMT_VALUE_CALIB_ACC 4
461 #define CMT_VALUE_CALIB_GYR 5
462 #define CMT_VALUE_CALIB_MAG 6
463 #define CMT_VALUE_ORIENT_QUAT 7
464 #define CMT_VALUE_ORIENT_EULER 8
465 #define CMT_VALUE_ORIENT_MATRIX 9
466 #define CMT_VALUE_SAMPLECNT 10
467 #define CMT_VALUE_TEMP 11
469 #define CMT_INVALIDSETTINGVALUE 0xFFFFFFFF
472 #define CMT_MID_RESET 0x40
473 #define CMT_MID_RESETACK 0x41
474 #define CMT_MID_ERROR 0x42
477 #define CMT_MID_XMPWROFF 0x44
480 #define CMT_MID_REQFILTERSETTINGS 0xA0
481 #define CMT_MID_REQFILTERSETTINGSACK 0xA1
482 #define CMT_LEN_FILTERSETTINGS 4
483 #define CMT_MID_SETFILTERSETTINGS 0xA0
484 #define CMT_MID_SETFILTERSETTINGSACK 0xA1
485 #define CMT_MID_REQAMD 0xA2
486 #define CMT_MID_REQAMDACK 0xA3
487 #define CMT_LEN_AMD 2
488 #define CMT_MID_SETAMD 0xA2
489 #define CMT_MID_SETAMDACK 0xA3
490 #define CMT_MID_RESETORIENTATION 0xA4
491 #define CMT_MID_RESETORIENTATIONACK 0xA5
492 #define CMT_LEN_RESETORIENTATION 2
494 #define CMT_MID_REQGPSSTATUS 0xA6
495 #define CMT_MID_GPSSTATUS 0xA7
496 #define CMT_LEN_GPSSTATUS (1 + 5 * 16)
499 #define CMT_BAUDCODE_9K6 0x09
501 #define CMT_BAUDCODE_19K2 0x07
503 #define CMT_BAUDCODE_38K4 0x05
504 #define CMT_BAUDCODE_57K6 0x04
506 #define CMT_BAUDCODE_115K2 0x02
507 #define CMT_BAUDCODE_230K4 0x01
508 #define CMT_BAUDCODE_460K8 0x00
509 #define CMT_BAUDCODE_921K6 0x80
512 #define CMT_ERROR_NOBUSCOMM 0x01
513 #define CMT_ERROR_BUSNOTREADY 0x02
514 #define CMT_ERROR_PERIODINVALID 0x03
515 #define CMT_ERROR_MESSAGEINVALID 0x04
516 #define CMT_ERROR_INITOFBUSFAILED1 0x10
517 #define CMT_ERROR_INITOFBUSFAILED2 0x11
518 #define CMT_ERROR_INITOFBUSFAILED3 0x12
519 #define CMT_ERROR_SETBIDPROCFAILED1 0x14
520 #define CMT_ERROR_SETBIDPROCFAILED2 0x15
521 #define CMT_ERROR_MEASUREMENTFAILED1 0x18
522 #define CMT_ERROR_MEASUREMENTFAILED2 0x19
523 #define CMT_ERROR_MEASUREMENTFAILED3 0x1A
524 #define CMT_ERROR_MEASUREMENTFAILED4 0x1B
525 #define CMT_ERROR_MEASUREMENTFAILED5 0x1C
526 #define CMT_ERROR_MEASUREMENTFAILED6 0x1D
527 #define CMT_ERROR_TIMEROVERFLOW 0x1E
528 #define CMT_ERROR_BAUDRATEINVALID 0x20
529 #define CMT_ERROR_PARAMETERINVALID 0x21
530 #define CMT_ERROR_MEASUREMENTFAILED7 0x23
533 #define CMT_ERRORMODE_IGNORE 0x0000
534 #define CMT_ERRORMODE_INCSAMPLECNT 0x0001
535 #define CMT_ERRORMODE_INCSAMPLECNT_SENDERROR 0x0002
536 #define CMT_ERRORMODE_SENDERROR_GOTOCONFIG 0x0003
539 #define CMT_CONF_MASTERDID 0
540 #define CMT_CONF_PERIOD 4
541 #define CMT_CONF_OUTPUTSKIPFACTOR 6
542 #define CMT_CONF_SYNCIN_MODE 8
543 #define CMT_CONF_SYNCIN_SKIPFACTOR 10
544 #define CMT_CONF_SYNCIN_OFFSET 12
545 #define CMT_CONF_DATE 16
546 #define CMT_CONF_TIME 24
547 #define CMT_CONF_NUMDEVICES 96
549 #define CMT_CONF_DID 98
550 #define CMT_CONF_DATALENGTH 102
551 #define CMT_CONF_OUTPUTMODE 104
552 #define CMT_CONF_OUTPUTSETTINGS 106
553 #define CMT_CONF_BLOCKLEN 20
556 #define CMT_CONF_MASTERDIDLEN 4
557 #define CMT_CONF_PERIODLEN 2
558 #define CMT_CONF_OUTPUTSKIPFACTORLEN 2
559 #define CMT_CONF_SYNCIN_MODELEN 2
560 #define CMT_CONF_SYNCIN_SKIPFACTORLEN 2
561 #define CMT_CONF_SYNCIN_OFFSETLEN 4
562 #define CMT_CONF_DATELEN 8
563 #define CMT_CONF_TIMELEN 8
564 #define CMT_CONF_RESERVED_CLIENTLEN 32
565 #define CMT_CONF_RESERVED_HOSTLEN 32
566 #define CMT_CONF_NUMDEVICESLEN 2
568 #define CMT_CONF_DIDLEN 4
569 #define CMT_CONF_DATALENGTHLEN 2
570 #define CMT_CONF_OUTPUTMODELEN 2
571 #define CMT_CONF_OUTPUTSETTINGSLEN 4
574 #define CMT_SYNC_CLOCKFREQMHZ 29.4912
575 #define CMT_SYNC_CLOCK_NS_TO_TICKS (CMT_SYNC_CLOCKFREQMHZ * 1.0e-3)
576 #define CMT_SYNC_CLOCK_TICKS_TO_NS (1.0e3 / CMT_SYNC_CLOCKFREQMHZ)
579 #define CMT_PARAM_SYNCIN_MODE 0x00
580 #define CMT_PARAM_SYNCIN_SKIPFACTOR 0x01
581 #define CMT_PARAM_SYNCIN_OFFSET 0x02
584 #define CMT_SYNCIN_DISABLED 0x0000
585 #define CMT_SYNCIN_EDGE_RISING 0x0001
586 #define CMT_SYNCIN_EDGE_FALLING 0x0002
587 #define CMT_SYNCIN_EDGE_BOTH 0x0003
588 #define CMT_SYNCIN_EDGE_MASK 0x0003
589 #define CMT_SYNCIN_TYPE_DOSAMPLING 0x0000
590 #define CMT_SYNCIN_TYPE_SENDLASTDATA 0x0004
591 #define CMT_SYNCIN_TYPE_CLOCK 0x0010
592 #define CMT_SYNCIN_TYPE_MASK 0x001C
595 #define CMT_PARAM_SYNCOUT_MODE 0x00
596 #define CMT_PARAM_SYNCOUT_SKIPFACTOR 0x01
597 #define CMT_PARAM_SYNCOUT_OFFSET 0x02
598 #define CMT_PARAM_SYNCOUT_PULSEWIDTH 0x03
601 #define CMT_SYNCOUT_DISABLED 0x0000
602 #define CMT_SYNCOUT_TYPE_TOGGLE 0x0001
603 #define CMT_SYNCOUT_TYPE_PULSE 0x0002
604 #define CMT_SYNCOUT_POL_NEG 0x0000
605 #define CMT_SYNCOUT_POL_POS 0x0010
606 #define CMT_SYNCOUT_TYPE_MASK 0x000F
607 #define CMT_SYNCOUT_POL_MASK 0x0010
610 #define CMT_OUTPUTMODE_MT9 0x8000
611 #define CMT_OUTPUTMODE_XM 0x0000
612 #define CMT_OUTPUTMODE_RAW 0x4000
613 #define CMT_OUTPUTMODE_RAWGPSPRINT 0x1000
614 #define CMT_OUTPUTMODE_TEMP 0x0001
615 #define CMT_OUTPUTMODE_CALIB 0x0002
616 #define CMT_OUTPUTMODE_ORIENT 0x0004
617 #define CMT_OUTPUTMODE_AUXILIARY 0x0008
618 #define CMT_OUTPUTMODE_POSITION 0x0010
619 #define CMT_OUTPUTMODE_VELOCITY 0x0020
620 #define CMT_OUTPUTMODE_STATUS 0x0800
623 #define CMT_OUTPUTSETTINGS_XM 0x00000001
624 #define CMT_OUTPUTSETTINGS_TIMESTAMP_NONE 0x00000000
625 #define CMT_OUTPUTSETTINGS_TIMESTAMP_SAMPLECNT 0x00000001
626 #define CMT_OUTPUTSETTINGS_ORIENTMODE_QUATERNION 0x00000000
627 #define CMT_OUTPUTSETTINGS_ORIENTMODE_EULER 0x00000004
628 #define CMT_OUTPUTSETTINGS_ORIENTMODE_MATRIX 0x00000008
629 #define CMT_OUTPUTSETTINGS_CALIBMODE_ACCGYRMAG 0x00000000
630 #define CMT_OUTPUTSETTINGS_CALIBMODE_ACC 0x00000060
631 #define CMT_OUTPUTSETTINGS_CALIBMODE_ACCGYR 0x00000040
632 #define CMT_OUTPUTSETTINGS_CALIBMODE_ACCMAG 0x00000020
633 #define CMT_OUTPUTSETTINGS_CALIBMODE_GYR 0x00000050
634 #define CMT_OUTPUTSETTINGS_CALIBMODE_GYRMAG 0x00000010
635 #define CMT_OUTPUTSETTINGS_CALIBMODE_MAG 0x00000030
636 #define CMT_OUTPUTSETTINGS_DATAFORMAT_FLOAT 0x00000000
637 #define CMT_OUTPUTSETTINGS_DATAFORMAT_F1220 0x00000100
638 #define CMT_OUTPUTSETTINGS_DATAFORMAT_FP1632 0x00000200
639 #define CMT_OUTPUTSETTINGS_DATAFORMAT_DOUBLE 0x00000300
640 #define CMT_OUTPUTSETTINGS_AUXILIARYMODE_AIN1 0x00000800
641 #define CMT_OUTPUTSETTINGS_AUXILIARYMODE_AIN2 0x00000400
642 #define CMT_OUTPUTSETTINGS_POSITIONMODE_LLA_WGS84 0x00000000
643 #define CMT_OUTPUTSETTINGS_VELOCITYMODE_NED 0x00000000
644 #define CMT_OUTPUTSETTINGS_UNCERTAINTY_ORIENT 0x00100000
645 #define CMT_OUTPUTSETTINGS_UNCERTAINTY_POS 0x00200000
646 #define CMT_OUTPUTSETTINGS_UNCERTAINTY_VEL 0x00400000
647 #define CMT_OUTPUTSETTINGS_TIMESTAMP_MASK 0x00000003
648 #define CMT_OUTPUTSETTINGS_ORIENTMODE_MASK 0x0000000C
649 #define CMT_OUTPUTSETTINGS_CALIBMODE_ACC_MASK 0x00000010
650 #define CMT_OUTPUTSETTINGS_CALIBMODE_GYR_MASK 0x00000020
651 #define CMT_OUTPUTSETTINGS_CALIBMODE_MAG_MASK 0x00000040
652 #define CMT_OUTPUTSETTINGS_CALIBMODE_MASK 0x00000070
653 #define CMT_OUTPUTSETTINGS_DATAFORMAT_MASK 0x00000300
654 #define CMT_OUTPUTSETTINGS_AUXILIARYMODE_AIN1_MASK 0x00000400
655 #define CMT_OUTPUTSETTINGS_AUXILIARYMODE_AIN2_MASK 0x00000800
656 #define CMT_OUTPUTSETTINGS_AUXILIARYMODE_MASK 0x00000C00
657 #define CMT_OUTPUTSETTINGS_POSITIONMODE_MASK 0x0001C000
658 #define CMT_OUTPUTSETTINGS_VELOCITYMODE_MASK 0x00060000
659 #define CMT_OUTPUTSETTINGS_UNCERTAINTY_MASK 0x00F00000
660 #define CMT_OUTPUTSETTINGS_COORDINATES_NED 0x80000000
665 #define CMT_EXTOUTPUTMODE_DISABLED 0x0000
666 #define CMT_EXTOUTPUTMODE_EULER 0x0001
669 #define CMT_FACTORYOUTPUTMODE_DISABLE 0x0000
670 #define CMT_FACTORYOUTPUTMODE_DEFAULT 0x0001
671 #define CMT_FACTORYOUTPUTMODE_CUSTOM 0x0002
674 #define CMT_INITTRACKMODE_DISABLED 0x0000
675 #define CMT_INITTRACKMODE_ENABLED 0x0001
678 #define CMT_PARAM_FILTER_GAIN 0x00
679 #define CMT_PARAM_FILTER_RHO 0x01
680 #define CMT_DONOTSTORE 0x00
681 #define CMT_STORE 0x01
684 #define CMT_AMDSETTING_DISABLED 0x0000
685 #define CMT_AMDSETTING_ENABLED 0x0001
688 #define CMT_SENDRAWSTRING_INIT 0
689 #define CMT_SENDRAWSTRING_DEFAULT 1
690 #define CMT_SENDRAWSTRING_SEND 2
693 #define CMT_TO_DEFAULT 500
694 #define CMT_TO_INIT 250
695 #define CMT_TO_RETRY 50
697 #define CMT_PERIOD_10HZ 11520 // invalid with gps pulse time correction
698 #define CMT_PERIOD_12HZ 9600
699 #define CMT_PERIOD_15HZ 7680 // invalid with gps pulse time correction
700 #define CMT_PERIOD_16HZ 7200
701 #define CMT_PERIOD_18HZ 6400 // invalid with gps pulse time correction
702 #define CMT_PERIOD_20HZ 5760
703 #define CMT_PERIOD_24HZ 4800
704 #define CMT_PERIOD_25HZ 4608 // invalid with gps pulse time correction
705 #define CMT_PERIOD_30HZ 3840
706 #define CMT_PERIOD_32HZ 3600
707 #define CMT_PERIOD_36HZ 3200
708 #define CMT_PERIOD_40HZ 2880
709 #define CMT_PERIOD_45HZ 2560 // invalid with gps pulse time correction
710 #define CMT_PERIOD_48HZ 2400
711 #define CMT_PERIOD_50HZ 2304 // invalid with gps pulse time correction
712 #define CMT_PERIOD_60HZ 1920
713 #define CMT_PERIOD_64HZ 1800
714 #define CMT_PERIOD_72HZ 1600
715 #define CMT_PERIOD_75HZ 1536 // invalid with gps pulse time correction
716 #define CMT_PERIOD_80HZ 1440
717 #define CMT_PERIOD_90HZ 1280 // invalid with gps pulse time correction
718 #define CMT_PERIOD_96HZ 1200
720 #define CMT_PERIOD_100HZ 1152
721 #define CMT_PERIOD_120HZ 960
722 #define CMT_PERIOD_128HZ 900
723 #define CMT_PERIOD_144HZ 800
724 #define CMT_PERIOD_150HZ 768 // invalid with gps pulse time correction
725 #define CMT_PERIOD_160HZ 720
726 #define CMT_PERIOD_180HZ 640
727 #define CMT_PERIOD_192HZ 600
728 #define CMT_PERIOD_200HZ 576
729 #define CMT_PERIOD_225HZ 512 // invalid with gps pulse time correction
730 #define CMT_PERIOD_240HZ 480
731 #define CMT_PERIOD_256HZ 450
732 #define CMT_PERIOD_288HZ 400
733 #define CMT_PERIOD_300HZ 384
734 #define CMT_PERIOD_320HZ 360
735 #define CMT_PERIOD_360HZ 320
736 #define CMT_PERIOD_384HZ 300
737 #define CMT_PERIOD_400HZ 288
738 #define CMT_PERIOD_450HZ 256 // invalid with gps pulse time correction
739 #define CMT_PERIOD_480HZ 240
740 #define CMT_PERIOD_512HZ 225
744 #define CMT_BAUD_RATE_9600 CBR_9600
746 #define CMT_BAUD_RATE_19K2 CBR_19200
748 #define CMT_BAUD_RATE_38K4 CBR_38400
749 #define CMT_BAUD_RATE_57K6 CBR_57600
750 #define CMT_BAUD_RATE_115K2 CBR_115200
751 #define CMT_BAUD_RATE_230K4 230400
752 #define CMT_BAUD_RATE_460K8 460800
753 #define CMT_BAUD_RATE_921K6 921600
755 #define CMT_BAUD_RATE_9600 B9600
757 #define CMT_BAUD_RATE_19K2 B19200
759 #define CMT_BAUD_RATE_38K4 B38400
760 #define CMT_BAUD_RATE_57K6 B57600
761 #define CMT_BAUD_RATE_115K2 B115200
762 #define CMT_BAUD_RATE_230K4 B230400
763 #define CMT_BAUD_RATE_460K8 B460800
764 #define CMT_BAUD_RATE_921K6 B921600
767 #define CMT_DEFAULT_OUTPUT_MODE CMT_OUTPUTMODE_ORIENT
768 #define CMT_DEFAULT_OUTPUT_SETTINGS \
769 (CMT_OUTPUTSETTINGS_ORIENTMODE_QUATERNION | \
770 CMT_OUTPUTSETTINGS_TIMESTAMP_SAMPLECNT)
772 #define CMT_GOTO_CONFIG_TRIES 3 // 50
774 #define CMT_MAX_DEVICES_PER_PORT 11
775 #define CMT_DEFAULT_SAMPLE_FREQUENCY 100
776 #define CMT_DEFAULT_PERIOD 1152
777 #define CMT_DEFAULT_SKIP 0
778 #define CMT_DEFAULT_FILTER_GAIN 1.0f
779 #define CMT_DEFAULT_FILTER_WEIGHTING 1.0f
780 #define CMT_SYNCOUT_DEFAULT_PULSE_WIDTH 1000000 // 1ms = 1M ns
782 #define CMT_MAX_PORTS_PER_THREAD 20
783 #define CMT_MAX_FILES_PER_THREAD 20
784 #if CMT_MAX_PORTS_PER_THREAD >= CMT_MAX_FILES_PER_THREAD
785 #define CMT_MAX_DEVICES (CMT_MAX_PORTS_PER_THREAD * CMT_MAX_DEVICES_PER_PORT)
787 #define CMT_MAX_DEVICES (CMT_MAX_FILES_PER_THREAD * CMT_MAX_DEVICES_PER_PORT)
789 #define CMT_MAX_PACKETS_PER_BUNDLE CMT_MAX_PORTS_PER_THREAD
790 #define CMT_BUNDLE_QUEUE_SIZE 256
791 #define CMT_MAX_ITEMS_IN_PACKET 10
794 #define CMT_DEFAULT_READ_BUFFER_SIZE (CMT_MAXDATALEN * 8)
796 #define CMT_DEFAULT_WRITE_BUFFER_SIZE CMT_MAXDATALEN
798 #define CMT_DEFAULT_BAUD_RATE CMT_BAUD_RATE_115K2
800 #define CMT2_DATA_QUEUE_SIZE 60
803 #define CMT3_CONFIG_TIMEOUT 100
805 #define CMT1_DEFAULT_TIMEOUT 10
807 #define CMT2_DEFAULT_TIMEOUT 50
809 #define CMT3_DEFAULT_TIMEOUT_MEAS 16
811 #define CMT3_DEFAULT_TIMEOUT_CONF 3000
813 #define CMT4_DEFAULT_TIMEOUT_MEAS 1
815 #define CMT4_DEFAULT_TIMEOUT_CONF CMT3_DEFAULT_TIMEOUT_CONF
817 #define CMT4_MEASUREMENT_REQ_TIMEOUT 100
819 #define CMT4_DEFAULT_TIMEOUT_DATA 3000
861 #pragma pack(push, 2)
887 #ifndef _CMT_DLL_IMPORT
912 #ifndef _CMT_DLL_IMPORT
926 #define CMT_MAX_FILENAME_LENGTH 512
928 #define CMT_DID_BROADCAST 0x80000000
929 #define CMT_DID_MASTER 0
931 #ifdef _CMT_ADD_PRIVATE
932 #include "cmtprivate.h"
951 #ifndef _CMT_DLL_IMPORT
972 #ifndef _CMT_DLL_IMPORT
1010 #ifndef _CMT_DLL_IMPORT
1058 #ifndef _CMT_DLL_IMPORT
1095 #define CMT_MAX_SCENARIOS_IN_MT 5
1096 #define CMT_MAX_SCENARIOS 254
1118 #define CMT_MAX_OBJECTS 20
1215 #endif // ifdef _WIN32/Linux
1275 #define CMT_MAX_SVINFO 16
1290 #define CMT_AUTO_SAVE_FRAMES 5000
1291 #define CMT_FILE_LAST_FRAME 0xFFFFFFFF
1293 #define CMT_BID_BROADCAST (const uint8_t)0x00
1294 #define CMT_BID_INVALID (const uint8_t)0xFE
1295 #define CMT_MID_REQEMTS (const uint8_t)0x90
1296 #define CMT_MID_EMTSDATA (const uint8_t)0x91
1297 #define CMT_EMTS_SIZE 1056
A structure for storing device modes using period and skip factor (new default)
double getRealSampleFrequency(void) const
Return the real sample frequency in Hz.
Structure for storing information about a serial port.
double m_pitch
The pitch (rotation around y-axis / right-left-line)
@ CMT_CALLBACK_ONMESSAGERECEIVED
Callback function, called when a full message has been received from a port.
unsigned __int16 uint16_t
uint32_t m_masterDeviceId
@ CMT_CALLBACK_ONMEASUREMENTPREPARE
Callback function, called right before sending a GotoMeasurement message.
A structure for storing scenario information.
#define CMT_DEFAULT_SAMPLE_FREQUENCY
uint32_t m_offset
Offset in ns.
#define CMT_SYNCOUT_DEFAULT_PULSE_WIDTH
struct CmtDeviceConfiguration::_devInfo m_deviceInfo[CMT_MAX_DEVICES_PER_PORT]
void setSampleFrequency(uint16_t freq)
Compute the period and skip factor from a sample frequency.
#define MRPT_UNUSED_PARAM(a)
Determines whether this is an X86 or AMD64 platform.
void getPeriodAndSkipFactor(uint16_t &period, uint16_t &skip) const
Compute the period and skip factor.
bool operator==(const CmtDeviceMode &dev) const
Check if all fields of the two structures are equal.
@ CMT_CALLBACK_ONMEASUREMENTSTOP
Callback function, called right before switching from Measurement mode to Config mode.
uint8_t m_reservedForHost[32]
bool operator==(const mrpt::img::TCamera &a, const mrpt::img::TCamera &b)
bool operator<(const COccupancyGridMap2D::TPairLikelihoodIndex &e1, const COccupancyGridMap2D::TPairLikelihoodIndex &e2)
@ CMT_CALLBACK_ONPOSTPROCESS
Callback function, called when a full data bundle is available and has been processed by the CMT.
CmtOutputMode m_outputMode
A structure for storing sync in settings.
CmtDeviceMode(const CmtOutputMode mode=CMT_DEFAULT_OUTPUT_MODE, const CmtOutputSettings settings=CMT_DEFAULT_OUTPUT_SETTINGS, const uint16_t frequency=CMT_DEFAULT_SAMPLE_FREQUENCY)
default constructor, initializes to the given (default) MT settings
A structure for storing UTC Time values.
uint16_t m_syncinSkipFactor
char m_filterType
The type of filter this scenario is intended for '3': XKF-3, '6': XKF-6.
char m_portName[270]
The port name.
#define CMT_LEN_SCENARIOLABEL
void readFromMessage(const void *message)
uint32_t m_pulseWidth
Pulse width in ns.
CmtOutputSettings m_outputSettings
uint32_t m_offset
Offset in ns.
A structure for storing device modes.
#define CMT_DEFAULT_PERIOD
XsensResultValue(__cdecl * CmtCallbackFunction)(int32_t, CmtCallbackSelector, void *, void *)
char m_label[CMT_LEN_SCENARIOLABEL+1]
The label of the scenario.
uint16_t m_outputSkipFactor
double m_roll
The roll (rotation around x-axis / back-front-line)
CmtOutputMode m_outputMode
A structure for storing sync out settings.
double getRealSampleFrequency(void) const
Return the real sample frequency in Hz.
uint8_t m_version
The version of the scenario.
unsigned __int64 uint64_t
uint32_t m_outputSettings
void setPeriodAndSkipFactor(uint16_t period, uint16_t skip)
Compute the sample frequency from a period and skip factor.
@ CMT_RESETORIENTATION_STORE
@ CMT_RESETORIENTATION_HEADING
uint32_t CmtOutputMode
An output mode bit-field.
CmtOutputSettings m_outputSettings
Structure containing a full device configuration as returned by the ReqConfig message.
uint8_t m_portNr
The port number.
CmtSyncInSettings(const uint16_t mode=0, const uint16_t skip=0, const uint32_t offset=0)
default constructor, initializes to the given (default) MT settings
uint16_t m_sampleFrequency
uint8_t m_type
The type of the scenario.
uint16_t getSampleFrequency(void) const
Return the sample frequency in Hz.
CmtGpsSatelliteInfo m_svInfo[CMT_MAX_SVINFO]
@ CMT_CALLBACK_ONBYTESRECEIVED
Callback function, called when bytes have been read from a port.
A structure for storing the firmware version.
@ CMT_CALLBACK_ONMEASUREMENTSTART
Callback function, called right after successfully switching to Measurement mode.
@ CMT_RESETORIENTATION_OBJECT
CmtSyncOutSettings(const uint16_t mode=0, const uint16_t skip=0, const uint32_t offset=0, const uint32_t width=CMT_SYNCOUT_DEFAULT_PULSE_WIDTH)
default constructor, initializes to the given (default) MT settings
@ CMT_RESETORIENTATION_ALIGN
uint32_t m_baudrate
The baudrate at which an Xsens device was detected.
uint32_t CmtDeviceId
The type of a Device Id.
uint8_t m_valid
When set to 1, the time is valid, when set to 2, the time part is valid, but the date may not be vali...
uint16_t m_samplingPeriod
bool operator==(const CmtDeviceMode2 &dev) const
Check if all fields of the two structures are equal.
uint8_t m_reservedForClient[32]
uint8_t m_data[CMT_MAXMSGLEN]
@ CMT_RESETORIENTATION_GLOBAL
uint64_t CmtOutputSettings
An output settings bit-field.
double m_yaw
The yaw (rotation around z-axis / down-up-line)
#define CMT_DEFAULT_OUTPUT_SETTINGS
#define CMT_MAX_DEVICES_PER_PORT
uint8_t m_navigationStatus
XsensResultValue
Xsens return values.
CmtDeviceMode2(const CmtOutputMode mode=CMT_DEFAULT_OUTPUT_MODE, const CmtOutputSettings settings=CMT_DEFAULT_OUTPUT_SETTINGS, const uint16_t period=CMT_DEFAULT_PERIOD, const uint16_t skip=CMT_DEFAULT_SKIP)
default constructor, initializes to the given (default) MT settings
#define CMT_DEFAULT_OUTPUT_MODE
unsigned __int32 uint32_t
uint16_t CmtMtTimeStamp
An MT timestamp (sample count)
uint16_t m_numberOfDevices
uint32_t m_deviceId
The device Id of the detected Xsens device.
@ CMT_CALLBACK_ONMESSAGESENT
Callback function, called when a full message has been sent by a port.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |