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 ignored attribute 29 # define __stdcall // __attribute__((stdcall)) // JLBC @ MRPT: GCC warns about ignored attribute 32 #ifndef _XSENS_STD_H_2006_09_11 35 #if !defined(_XSENS_TIME_2006_09_12) && !defined(_CMT_DLL_IMPORT) 39 #ifndef _CMT_FILE_DEF_H_2007_01_24 43 #ifdef _CMT_STATIC_LIB 49 #define CMT_IND_PREAMBLE 0 53 #define CMT_IND_DATA0 4 54 #define CMT_IND_LENEXTH 4 55 #define CMT_IND_LENEXTL 5 56 #define CMT_IND_DATAEXT0 6 58 #define CMT_PREAMBLE 0xFA 59 #define CMT_BID_MASTER 0xFF 60 #define CMT_BID_MT 0x01 61 #define CMT_EXTLENCODE 0xFF 63 #define CMT_LEN_MSGHEADER 4 64 #define CMT_LEN_MSGEXTHEADER 6 65 #define CMT_LEN_MSGHEADERCS 5 66 #define CMT_LEN_MSGEXTHEADERCS 7 67 #define CMT_LEN_CHECKSUM 1 68 #define CMT_LEN_UNSIGSHORT 2 69 #define CMT_LEN_UNSIGINT 4 70 #define CMT_LEN_FLOAT 4 73 #define CMT_MAXDATALEN 8192 74 #define CMT_MAXSHORTDATALEN 254 75 #define CMT_MAXMSGLEN (CMT_MAXDATALEN+7) 76 #define CMT_MAXSHORTMSGLEN (CMT_MAXSHORTDATALEN+5) 77 #define CMT_MAXGARBAGE (CMT_MAXMSGLEN+1) 81 #define CMT_DID_TYPEH_MASK 0x00F00000 82 #define CMT_DID_TYPEH_MT 0x00000000 83 #define CMT_DID_TYPEH_XM 0x00100000 84 #define CMT_DID_TYPEH_MTI_MTX 0x00300000 85 #define CMT_DID_TYPEH_MTIG 0x00500000 89 #define CMT_MID_WAKEUP 0x3E 90 #define CMT_MID_WAKEUPACK 0x3F 93 #define CMT_MID_REQDID 0x00 94 #define CMT_MID_DEVICEID 0x01 95 #define CMT_LEN_DEVICEID 4 96 #define CMT_MID_INITBUS 0x02 97 #define CMT_MID_INITBUSRESULTS 0x03 98 #define CMT_LEN_INITBUSRESULTS 4 99 #define CMT_MID_REQPERIOD 0x04 100 #define CMT_MID_REQPERIODACK 0x05 101 #define CMT_LEN_PERIOD 2 102 #define CMT_MID_SETPERIOD 0x04 103 #define CMT_MID_SETPERIODACK 0x05 105 #define CMT_MID_SETBID 0x06 106 #define CMT_MID_SETBIDACK 0x07 107 #define CMT_MID_AUTOSTART 0x06 108 #define CMT_MID_AUTOSTARTACK 0x07 109 #define CMT_MID_BUSPWR 0x08 110 #define CMT_LEN_BUSPWR 2 111 #define CMT_MID_BUSPWRACK 0x09 113 #define CMT_MID_REQDATALENGTH 0x0A 114 #define CMT_MID_DATALENGTH 0x0B 115 #define CMT_LEN_DATALENGTH 2 116 #define CMT_MID_REQCONFIGURATION 0x0C 117 #define CMT_MID_CONFIGURATION 0x0D 118 #define CMT_LEN_CONFIGURATION 118 119 #define CMT_MID_RESTOREFACTORYDEF 0x0E 120 #define CMT_MID_RESTOREFACTORYDEFACK 0x0F 122 #define CMT_MID_GOTOMEASUREMENT 0x10 123 #define CMT_MID_GOTOMEASUREMENTACK 0x11 124 #define CMT_MID_REQFWREV 0x12 125 #define CMT_MID_FIRMWAREREV 0x13 126 #define CMT_LEN_FIRMWAREREV 3 128 #define CMT_MID_REQBTDISABLE 0x14 129 #define CMT_MID_REQBTDISABLEACK 0x15 130 #define CMT_LEN_BTDISABLE 1 131 #define CMT_MID_DISABLEBT 0x14 132 #define CMT_MID_DISABLEBTACK 0x15 133 #define CMT_MID_REQOPMODE 0x16 134 #define CMT_MID_REQOPMODEACK 0x17 135 #define CMT_LEN_OPMODE 1 136 #define CMT_MID_SETOPMODE 0x16 137 #define CMT_MID_SETOPMODEACK 0x17 139 #define CMT_MID_REQBAUDRATE 0x18 140 #define CMT_MID_REQBAUDRATEACK 0x19 141 #define CMT_LEN_BAUDRATE 1 142 #define CMT_MID_SETBAUDRATE 0x18 143 #define CMT_MID_SETBAUDRATEACK 0x19 145 #define CMT_MID_REQSYNCMODE 0x1A 146 #define CMT_MID_REQSYNCMODEACK 0x1B 147 #define CMT_LEN_SYNCMODE 1 148 #define CMT_MID_SETSYNCMODE 0x1A 149 #define CMT_MID_SETSYNCMODEACK 0x1B 151 #define CMT_MID_REQPRODUCTCODE 0x1C 152 #define CMT_MID_PRODUCTCODE 0x1D 153 #define CMT_LEN_PRODUCTCODE 20 156 #define CMT_MID_XMPWROFF 0x44 157 #define CMT_LEN_XMPWROFF 0 160 #define CMT_MID_REQOUTPUTMODE 0xD0 161 #define CMT_MID_REQOUTPUTMODEACK 0xD1 162 #define CMT_LEN_OUTPUTMODE 2 163 #define CMT_MID_SETOUTPUTMODE 0xD0 164 #define CMT_MID_SETOUTPUTMODEACK 0xD1 166 #define CMT_MID_REQOUTPUTSETTINGS 0xD2 167 #define CMT_MID_REQOUTPUTSETTINGSACK 0xD3 168 #define CMT_LEN_OUTPUTSETTINGS 4 169 #define CMT_MID_SETOUTPUTSETTINGS 0xD2 170 #define CMT_MID_SETOUTPUTSETTINGSACK 0xD3 172 #define CMT_MID_REQOUTPUTSKIPFACTOR 0xD4 173 #define CMT_MID_REQOUTPUTSKIPFACTORACK 0xD5 174 #define CMT_LEN_OUTPUTSKIPFACTOR 2 175 #define CMT_MID_SETOUTPUTSKIPFACTOR 0xD4 176 #define CMT_MID_SETOUTPUTSKIPFACTORACK 0xD5 178 #define CMT_MID_REQSYNCINSETTINGS 0xD6 179 #define CMT_MID_REQSYNCINSETTINGSACK 0xD7 180 #define CMT_LEN_SYNCINMODE 2 181 #define CMT_LEN_SYNCINSKIPFACTOR 2 182 #define CMT_LEN_SYNCINOFFSET 4 183 #define CMT_MID_SETSYNCINSETTINGS 0xD6 184 #define CMT_MID_SETSYNCINSETTINGSACK 0xD7 186 #define CMT_MID_REQSYNCOUTSETTINGS 0xD8 187 #define CMT_MID_REQSYNCOUTSETTINGSACK 0xD9 188 #define CMT_LEN_SYNCOUTMODE 2 189 #define CMT_LEN_SYNCOUTSKIPFACTOR 2 190 #define CMT_LEN_SYNCOUTOFFSET 4 191 #define CMT_LEN_SYNCOUTPULSEWIDTH 4 192 #define CMT_MID_SETSYNCOUTSETTINGS 0xD8 193 #define CMT_MID_SETSYNCOUTSETTINGSACK 0xD9 195 #define CMT_MID_REQERRORMODE 0xDA 196 #define CMT_MID_REQERRORMODEACK 0xDB 197 #define CMT_LEN_ERRORMODE 2 198 #define CMT_MID_SETERRORMODE 0xDA 199 #define CMT_MID_SETERRORMODEACK 0xDB 201 #define CMT_MID_REQTRANSMITDELAY 0xDC 202 #define CMT_MID_REQTRANSMITDELAYACK 0xDD 203 #define CMT_LEN_TRANSMITDELAY 2 204 #define CMT_MID_SETTRANSMITDELAY 0xDC 205 #define CMT_MID_SETTRANSMITDELAYACK 0xDD 208 #define CMT_MID_REQXMERRORMODE 0x82 209 #define CMT_MID_REQXMERRORMODEACK 0x83 210 #define CMT_LEN_XMERRORMODE 2 211 #define CMT_MID_SETXMERRORMODE 0x82 212 #define CMT_MID_SETXMERRORMODEACK 0x83 214 #define CMT_MID_REQBUFFERSIZE 0x84 215 #define CMT_MID_REQBUFFERSIZEACK 0x85 216 #define CMT_LEN_BUFFERSIZE 2 217 #define CMT_MID_SETBUFFERSIZE 0x84 218 #define CMT_MID_SETBUFFERSIZEACK 0x85 221 #define CMT_MID_REQHEADING 0x82 222 #define CMT_MID_REQHEADINGACK 0x83 223 #define CMT_LEN_HEADING 4 224 #define CMT_MID_SETHEADING 0x82 225 #define CMT_MID_SETHEADINGACK 0x83 227 #define CMT_MID_REQMAGNETICDECLINATION 0x6A 228 #define CMT_MID_REQMAGNETICDECLINATIONACK 0x6B 229 #define CMT_LEN_MAGNETICDECLINATION 4 230 #define CMT_MID_SETMAGNETICDECLINATION 0x6A 231 #define CMT_MID_SETMAGNETICDECLINATIONACK 0x6B 233 #define CMT_MID_REQLOCATIONID 0x84 234 #define CMT_MID_REQLOCATIONIDACK 0x85 235 #define CMT_LEN_LOCATIONID 2 236 #define CMT_MID_SETLOCATIONID 0x84 237 #define CMT_MID_SETLOCATIONIDACK 0x85 239 #define CMT_MID_REQEXTOUTPUTMODE 0x86 240 #define CMT_MID_REQEXTOUTPUTMODEACK 0x87 241 #define CMT_LEN_EXTOUTPUTMODE 2 242 #define CMT_MID_SETEXTOUTPUTMODE 0x86 243 #define CMT_MID_SETEXTOUTPUTMODEACK 0x87 246 #define CMT_MID_REQBATLEVEL 0x88 247 #define CMT_MID_BATLEVEL 0x89 250 #define CMT_MID_REQINITTRACKMODE 0x88 251 #define CMT_MID_REQINITTRACKMODEACK 0x89 252 #define CMT_LEN_INITTRACKMODE 2 253 #define CMT_MID_SETINITTRACKMODE 0x88 254 #define CMT_MID_SETINITTRACKMODEACK 0x89 261 #define CMT_MID_STOREXKFSTATE 0x8A 262 #define CMT_LEN_STOREXKFSTATE 0 263 #define CMT_MID_STOREXKFSTATEACK 0x8B 265 #define CMT_MID_REQUTCTIME 0x60 266 #define CMT_MID_UTCTIME 0x61 267 #define CMT_LEN_UTCTIME 12 269 #define CMT_LEN_SCENARIOLABEL 20 270 #define CMT_LEN_SCENARIOFULL (1+1+CMT_LEN_SCENARIOLABEL) 271 #define CMT_MID_REQAVAILABLESCENARIOS 0x62 272 #define CMT_MID_AVAILABLESCENARIOS 0x63 273 #define CMT_LEN_AVAILABLESCENARIOS (CMT_MAX_SCENARIOS_IN_MT*CMT_LEN_SCENARIOFULL) 275 #define CMT_MID_REQSCENARIO 0x64 276 #define CMT_MID_REQSCENARIOACK 0x65 277 #define CMT_LEN_REQSCENARIOACK 2 278 #define CMT_MID_SETSCENARIO 0x64 279 #define CMT_MID_SETSCENARIOACK 0x65 280 #define CMT_LEN_SETSCENARIO 1 282 #define CMT_MID_REQGRAVITYMAGNITUDE 0x66 283 #define CMT_MID_REQGRAVITYMAGNITUDEACK 0x67 284 #define CMT_MID_SETGRAVITYMAGNITUDE 0x66 285 #define CMT_MID_SETGRAVITYMAGNITUDEACK 0x67 286 #define CMT_LEN_GRAVITYMAGNITUDE 4 288 #define CMT_MID_REQGPSLEVERARM 0x68 289 #define CMT_MID_REQGPSLEVERARMACK 0x69 290 #define CMT_MID_SETGPSLEVERARM 0x68 291 #define CMT_MID_SETGPSLEVERARMACK 0x69 292 #define CMT_LEN_GPSLEVERARM 12 295 #define CMT_MID_GOTOCONFIG 0x30 296 #define CMT_MID_GOTOCONFIGACK 0x31 297 #define CMT_MID_BUSDATA 0x32 298 #define CMT_MID_MTDATA 0x32 301 #define CMT_MID_PREPAREDATA 0x32 302 #define CMT_MID_REQDATA 0x34 303 #define CMT_MID_REQDATAACK 0x35 307 #define CMT_LEN_RAWDATA 20 308 #define CMT_LEN_CALIBDATA 36 309 #define CMT_LEN_CALIB_ACCDATA 12 310 #define CMT_LEN_CALIB_GYRDATA 12 311 #define CMT_LEN_CALIB_MAGDATA 12 312 #define CMT_LEN_ORIENT_QUATDATA 16 313 #define CMT_LEN_ORIENT_EULERDATA 12 314 #define CMT_LEN_ORIENT_MATRIXDATA 36 315 #define CMT_LEN_SAMPLECNT 2 316 #define CMT_LEN_TEMPDATA 4 319 #define CMT_LEN_CALIBDATA_FLT 9 320 #define CMT_LEN_ORIENT_QUATDATA_FLT 4 321 #define CMT_LEN_ORIENT_EULERDATA_FLT 3 322 #define CMT_LEN_ORIENT_MATRIXDATA_FLT 9 327 #define CMT_IND_RAW_ACCX 0 328 #define CMT_IND_RAW_ACCY 2 329 #define CMT_IND_RAW_ACCZ 4 330 #define CMT_IND_RAW_GYRX 6 331 #define CMT_IND_RAW_GYRY 8 332 #define CMT_IND_RAW_GYRZ 10 333 #define CMT_IND_RAW_MAGX 12 334 #define CMT_IND_RAW_MAGY 14 335 #define CMT_IND_RAW_MAGZ 16 336 #define CMT_IND_RAW_TEMP 18 338 #define CMT_IND_CALIB_ACCX 0 339 #define CMT_IND_CALIB_ACCY 4 340 #define CMT_IND_CALIB_ACCZ 8 341 #define CMT_IND_CALIB_GYRX 12 342 #define CMT_IND_CALIB_GYRY 16 343 #define CMT_IND_CALIB_GYRZ 20 344 #define CMT_IND_CALIB_MAGX 24 345 #define CMT_IND_CALIB_MAGY 28 346 #define CMT_IND_CALIB_MAGZ 32 348 #define CMT_IND_ORIENT_Q0 0 349 #define CMT_IND_ORIENT_Q1 4 350 #define CMT_IND_ORIENT_Q2 8 351 #define CMT_IND_ORIENT_Q3 12 353 #define CMT_IND_ORIENT_ROLL 0 354 #define CMT_IND_ORIENT_PITCH 4 355 #define CMT_IND_ORIENT_YAW 8 357 #define CMT_IND_ORIENT_A 0 358 #define CMT_IND_ORIENT_B 4 359 #define CMT_IND_ORIENT_C 8 360 #define CMT_IND_ORIENT_D 12 361 #define CMT_IND_ORIENT_E 16 362 #define CMT_IND_ORIENT_F 20 363 #define CMT_IND_ORIENT_G 24 364 #define CMT_IND_ORIENT_H 28 365 #define CMT_IND_ORIENT_I 32 367 #define CMT_IND_SAMPLECNTH 0 368 #define CMT_IND_SAMPLECNTL 1 372 #define CMT_FLDNUM_RAW_ACCX 0 373 #define CMT_FLDNUM_RAW_ACCY 1 374 #define CMT_FLDNUM_RAW_ACCZ 2 375 #define CMT_FLDNUM_RAW_GYRX 3 376 #define CMT_FLDNUM_RAW_GYRY 4 377 #define CMT_FLDNUM_RAW_GYRZ 5 378 #define CMT_FLDNUM_RAW_MAGX 6 379 #define CMT_FLDNUM_RAW_MAGY 7 380 #define CMT_FLDNUM_RAW_MAGZ 8 381 #define CMT_FLDNUM_RAW_TEMP 9 383 #define CMT_FLDNUM_CALIB_ACCX 0 384 #define CMT_FLDNUM_CALIB_ACCY 1 385 #define CMT_FLDNUM_CALIB_ACCZ 2 386 #define CMT_FLDNUM_CALIB_GYRX 3 387 #define CMT_FLDNUM_CALIB_GYRY 4 388 #define CMT_FLDNUM_CALIB_GYRZ 5 389 #define CMT_FLDNUM_CALIB_MAGX 6 390 #define CMT_FLDNUM_CALIB_MAGY 7 391 #define CMT_FLDNUM_CALIB_MAGZ 8 393 #define CMT_FLDNUM_ORIENT_Q0 0 394 #define CMT_FLDNUM_ORIENT_Q1 1 395 #define CMT_FLDNUM_ORIENT_Q2 2 396 #define CMT_FLDNUM_ORIENT_Q3 3 398 #define CMT_FLDNUM_ORIENT_ROLL 0 399 #define CMT_FLDNUM_ORIENT_PITCH 1 400 #define CMT_FLDNUM_ORIENT_YAW 2 402 #define CMT_FLDNUM_ORIENT_A 0 403 #define CMT_FLDNUM_ORIENT_B 1 404 #define CMT_FLDNUM_ORIENT_C 2 405 #define CMT_FLDNUM_ORIENT_D 3 406 #define CMT_FLDNUM_ORIENT_E 4 407 #define CMT_FLDNUM_ORIENT_F 5 408 #define CMT_FLDNUM_ORIENT_G 6 409 #define CMT_FLDNUM_ORIENT_H 7 410 #define CMT_FLDNUM_ORIENT_I 8 413 #define CMT_LEN_RAW_ACCX 2 414 #define CMT_LEN_RAW_ACCY 2 415 #define CMT_LEN_RAW_ACCZ 2 416 #define CMT_LEN_RAW_GYRX 2 417 #define CMT_LEN_RAW_GYRY 2 418 #define CMT_LEN_RAW_GYRZ 2 419 #define CMT_LEN_RAW_MAGX 2 420 #define CMT_LEN_RAW_MAGY 2 421 #define CMT_LEN_RAW_MAGZ 2 422 #define CMT_LEN_RAW_TEMP 2 424 #define CMT_LEN_CALIB_ACCX 4 425 #define CMT_LEN_CALIB_ACCY 4 426 #define CMT_LEN_CALIB_ACCZ 4 427 #define CMT_LEN_CALIB_GYRX 4 428 #define CMT_LEN_CALIB_GYRY 4 429 #define CMT_LEN_CALIB_GYRZ 4 430 #define CMT_LEN_CALIB_MAGX 4 431 #define CMT_LEN_CALIB_MAGY 4 432 #define CMT_LEN_CALIB_MAGZ 4 434 #define CMT_LEN_ORIENT_Q0 4 435 #define CMT_LEN_ORIENT_Q1 4 436 #define CMT_LEN_ORIENT_Q2 4 437 #define CMT_LEN_ORIENT_Q3 4 439 #define CMT_LEN_ORIENT_ROLL 4 440 #define CMT_LEN_ORIENT_PITCH 4 441 #define CMT_LEN_ORIENT_YAW 4 443 #define CMT_LEN_ORIENT_A 4 444 #define CMT_LEN_ORIENT_B 4 445 #define CMT_LEN_ORIENT_C 4 446 #define CMT_LEN_ORIENT_D 4 447 #define CMT_LEN_ORIENT_E 4 448 #define CMT_LEN_ORIENT_F 4 449 #define CMT_LEN_ORIENT_G 4 450 #define CMT_LEN_ORIENT_H 4 451 #define CMT_LEN_ORIENT_I 4 454 #define CMT_VALUE_RAW_ACC 0 455 #define CMT_VALUE_RAW_GYR 1 456 #define CMT_VALUE_RAW_MAG 2 457 #define CMT_VALUE_RAW_TEMP 3 458 #define CMT_VALUE_CALIB_ACC 4 459 #define CMT_VALUE_CALIB_GYR 5 460 #define CMT_VALUE_CALIB_MAG 6 461 #define CMT_VALUE_ORIENT_QUAT 7 462 #define CMT_VALUE_ORIENT_EULER 8 463 #define CMT_VALUE_ORIENT_MATRIX 9 464 #define CMT_VALUE_SAMPLECNT 10 465 #define CMT_VALUE_TEMP 11 467 #define CMT_INVALIDSETTINGVALUE 0xFFFFFFFF 471 #define CMT_MID_RESET 0x40 472 #define CMT_MID_RESETACK 0x41 473 #define CMT_MID_ERROR 0x42 476 #define CMT_MID_XMPWROFF 0x44 479 #define CMT_MID_REQFILTERSETTINGS 0xA0 480 #define CMT_MID_REQFILTERSETTINGSACK 0xA1 481 #define CMT_LEN_FILTERSETTINGS 4 482 #define CMT_MID_SETFILTERSETTINGS 0xA0 483 #define CMT_MID_SETFILTERSETTINGSACK 0xA1 484 #define CMT_MID_REQAMD 0xA2 485 #define CMT_MID_REQAMDACK 0xA3 486 #define CMT_LEN_AMD 2 487 #define CMT_MID_SETAMD 0xA2 488 #define CMT_MID_SETAMDACK 0xA3 489 #define CMT_MID_RESETORIENTATION 0xA4 490 #define CMT_MID_RESETORIENTATIONACK 0xA5 491 #define CMT_LEN_RESETORIENTATION 2 493 #define CMT_MID_REQGPSSTATUS 0xA6 494 #define CMT_MID_GPSSTATUS 0xA7 495 #define CMT_LEN_GPSSTATUS (1+5*16) 498 #define CMT_BAUDCODE_9K6 0x09 500 #define CMT_BAUDCODE_19K2 0x07 502 #define CMT_BAUDCODE_38K4 0x05 503 #define CMT_BAUDCODE_57K6 0x04 505 #define CMT_BAUDCODE_115K2 0x02 506 #define CMT_BAUDCODE_230K4 0x01 507 #define CMT_BAUDCODE_460K8 0x00 508 #define CMT_BAUDCODE_921K6 0x80 511 #define CMT_ERROR_NOBUSCOMM 0x01 512 #define CMT_ERROR_BUSNOTREADY 0x02 513 #define CMT_ERROR_PERIODINVALID 0x03 514 #define CMT_ERROR_MESSAGEINVALID 0x04 515 #define CMT_ERROR_INITOFBUSFAILED1 0x10 516 #define CMT_ERROR_INITOFBUSFAILED2 0x11 517 #define CMT_ERROR_INITOFBUSFAILED3 0x12 518 #define CMT_ERROR_SETBIDPROCFAILED1 0x14 519 #define CMT_ERROR_SETBIDPROCFAILED2 0x15 520 #define CMT_ERROR_MEASUREMENTFAILED1 0x18 521 #define CMT_ERROR_MEASUREMENTFAILED2 0x19 522 #define CMT_ERROR_MEASUREMENTFAILED3 0x1A 523 #define CMT_ERROR_MEASUREMENTFAILED4 0x1B 524 #define CMT_ERROR_MEASUREMENTFAILED5 0x1C 525 #define CMT_ERROR_MEASUREMENTFAILED6 0x1D 526 #define CMT_ERROR_TIMEROVERFLOW 0x1E 527 #define CMT_ERROR_BAUDRATEINVALID 0x20 528 #define CMT_ERROR_PARAMETERINVALID 0x21 529 #define CMT_ERROR_MEASUREMENTFAILED7 0x23 532 #define CMT_ERRORMODE_IGNORE 0x0000 533 #define CMT_ERRORMODE_INCSAMPLECNT 0x0001 534 #define CMT_ERRORMODE_INCSAMPLECNT_SENDERROR 0x0002 535 #define CMT_ERRORMODE_SENDERROR_GOTOCONFIG 0x0003 538 #define CMT_CONF_MASTERDID 0 539 #define CMT_CONF_PERIOD 4 540 #define CMT_CONF_OUTPUTSKIPFACTOR 6 541 #define CMT_CONF_SYNCIN_MODE 8 542 #define CMT_CONF_SYNCIN_SKIPFACTOR 10 543 #define CMT_CONF_SYNCIN_OFFSET 12 544 #define CMT_CONF_DATE 16 545 #define CMT_CONF_TIME 24 546 #define CMT_CONF_NUMDEVICES 96 548 #define CMT_CONF_DID 98 549 #define CMT_CONF_DATALENGTH 102 550 #define CMT_CONF_OUTPUTMODE 104 551 #define CMT_CONF_OUTPUTSETTINGS 106 552 #define CMT_CONF_BLOCKLEN 20 555 #define CMT_CONF_MASTERDIDLEN 4 556 #define CMT_CONF_PERIODLEN 2 557 #define CMT_CONF_OUTPUTSKIPFACTORLEN 2 558 #define CMT_CONF_SYNCIN_MODELEN 2 559 #define CMT_CONF_SYNCIN_SKIPFACTORLEN 2 560 #define CMT_CONF_SYNCIN_OFFSETLEN 4 561 #define CMT_CONF_DATELEN 8 562 #define CMT_CONF_TIMELEN 8 563 #define CMT_CONF_RESERVED_CLIENTLEN 32 564 #define CMT_CONF_RESERVED_HOSTLEN 32 565 #define CMT_CONF_NUMDEVICESLEN 2 567 #define CMT_CONF_DIDLEN 4 568 #define CMT_CONF_DATALENGTHLEN 2 569 #define CMT_CONF_OUTPUTMODELEN 2 570 #define CMT_CONF_OUTPUTSETTINGSLEN 4 573 #define CMT_SYNC_CLOCKFREQMHZ 29.4912 574 #define CMT_SYNC_CLOCK_NS_TO_TICKS (CMT_SYNC_CLOCKFREQMHZ * 1.0e-3) 575 #define CMT_SYNC_CLOCK_TICKS_TO_NS (1.0e3 / CMT_SYNC_CLOCKFREQMHZ) 578 #define CMT_PARAM_SYNCIN_MODE 0x00 579 #define CMT_PARAM_SYNCIN_SKIPFACTOR 0x01 580 #define CMT_PARAM_SYNCIN_OFFSET 0x02 583 #define CMT_SYNCIN_DISABLED 0x0000 584 #define CMT_SYNCIN_EDGE_RISING 0x0001 585 #define CMT_SYNCIN_EDGE_FALLING 0x0002 586 #define CMT_SYNCIN_EDGE_BOTH 0x0003 587 #define CMT_SYNCIN_EDGE_MASK 0x0003 588 #define CMT_SYNCIN_TYPE_DOSAMPLING 0x0000 589 #define CMT_SYNCIN_TYPE_SENDLASTDATA 0x0004 590 #define CMT_SYNCIN_TYPE_CLOCK 0x0010 591 #define CMT_SYNCIN_TYPE_MASK 0x001C 594 #define CMT_PARAM_SYNCOUT_MODE 0x00 595 #define CMT_PARAM_SYNCOUT_SKIPFACTOR 0x01 596 #define CMT_PARAM_SYNCOUT_OFFSET 0x02 597 #define CMT_PARAM_SYNCOUT_PULSEWIDTH 0x03 600 #define CMT_SYNCOUT_DISABLED 0x0000 601 #define CMT_SYNCOUT_TYPE_TOGGLE 0x0001 602 #define CMT_SYNCOUT_TYPE_PULSE 0x0002 603 #define CMT_SYNCOUT_POL_NEG 0x0000 604 #define CMT_SYNCOUT_POL_POS 0x0010 605 #define CMT_SYNCOUT_TYPE_MASK 0x000F 606 #define CMT_SYNCOUT_POL_MASK 0x0010 609 #define CMT_OUTPUTMODE_MT9 0x8000 610 #define CMT_OUTPUTMODE_XM 0x0000 611 #define CMT_OUTPUTMODE_RAW 0x4000 612 #define CMT_OUTPUTMODE_RAWGPSPRINT 0x1000 613 #define CMT_OUTPUTMODE_TEMP 0x0001 614 #define CMT_OUTPUTMODE_CALIB 0x0002 615 #define CMT_OUTPUTMODE_ORIENT 0x0004 616 #define CMT_OUTPUTMODE_AUXILIARY 0x0008 617 #define CMT_OUTPUTMODE_POSITION 0x0010 618 #define CMT_OUTPUTMODE_VELOCITY 0x0020 619 #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 (CMT_OUTPUTSETTINGS_ORIENTMODE_QUATERNION |\ 769 CMT_OUTPUTSETTINGS_TIMESTAMP_SAMPLECNT) 771 #define CMT_GOTO_CONFIG_TRIES 3 // 50 773 #define CMT_MAX_DEVICES_PER_PORT 11 774 #define CMT_DEFAULT_SAMPLE_FREQUENCY 100 775 #define CMT_DEFAULT_PERIOD 1152 776 #define CMT_DEFAULT_SKIP 0 777 #define CMT_DEFAULT_FILTER_GAIN 1.0f 778 #define CMT_DEFAULT_FILTER_WEIGHTING 1.0f 779 #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 857 #pragma pack(push, 2) 880 #ifndef _CMT_DLL_IMPORT 904 #ifndef _CMT_DLL_IMPORT 915 #define CMT_MAX_FILENAME_LENGTH 512 917 #define CMT_DID_BROADCAST 0x80000000 918 #define CMT_DID_MASTER 0 920 #ifdef _CMT_ADD_PRIVATE 921 # include "cmtprivate.h" 937 #ifndef _CMT_DLL_IMPORT 953 #ifndef _CMT_DLL_IMPORT 983 #ifndef _CMT_DLL_IMPORT 1023 #ifndef _CMT_DLL_IMPORT 1054 #define CMT_MAX_SCENARIOS_IN_MT 5 1055 #define CMT_MAX_SCENARIOS 254 1066 #define CMT_MAX_OBJECTS 20 1127 # endif // ifdef _WIN32/Linux 1177 #define CMT_MAX_SVINFO 16 1190 #define CMT_AUTO_SAVE_FRAMES 5000 1191 #define CMT_FILE_LAST_FRAME 0xFFFFFFFF 1193 #define CMT_BID_BROADCAST (const uint8_t)0x00 1194 #define CMT_BID_INVALID (const uint8_t)0xFE 1195 #define CMT_MID_REQEMTS (const uint8_t)0x90 1196 #define CMT_MID_EMTSDATA (const uint8_t)0x91 1197 #define CMT_EMTS_SIZE 1056 void readFromMessage(const void *message)
A structure for storing the firmware version.
char m_filterType
The type of filter this scenario is intended for '3': XKF-3, '6': XKF-6.
bool operator==(const TPoint2D &p1, const TPoint2D &p2)
Exact comparison between 2D points.
uint8_t m_type
The type of the scenario. When set to 255 in an operation, the 'current' scenario is used...
unsigned __int16 uint16_t
#define CMT_SYNCOUT_DEFAULT_PULSE_WIDTH
uint8_t m_version
The version of the scenario.
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...
Structure for storing information about a serial port.
uint32_t m_deviceId
The device Id of the detected Xsens device.
uint32_t m_offset
Offset in ns.
A structure for storing sync out settings.
Callback function, called right before switching from Measurement mode to Config mode.
uint8_t m_reservedForClient[32]
double getRealSampleFrequency(void) const
Return the real sample frequency in Hz.
A structure for storing UTC Time values.
double m_pitch
The pitch (rotation around y-axis / right-left-line)
Callback function, called when a full message has been received from a port.
A structure for storing sync in settings.
uint32_t m_pulseWidth
Pulse width in ns.
uint32_t m_offset
Offset in ns.
void getPeriodAndSkipFactor(uint16_t &period, uint16_t &skip) const
Compute the period and skip factor.
#define CMT_DEFAULT_SAMPLE_FREQUENCY
bool operator==(const CmtDeviceMode &dev) const
Check if all fields of the two structures are equal.
Callback function, called when a full message has been sent by a port.
Structure containing a full device configuration as returned by the ReqConfig message.
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
#define CMT_DEFAULT_PERIOD
CmtOutputMode m_outputMode
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
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
uint16_t m_samplingPeriod
bool operator==(const CmtDeviceMode2 &dev) const
Check if all fields of the two structures are equal.
XsensResultValue(__cdecl * CmtCallbackFunction)(int32_t, CmtCallbackSelector, void *, void *)
struct CmtDeviceConfiguration::_devInfo m_deviceInfo[CMT_MAX_DEVICES_PER_PORT]
uint16_t m_numberOfDevices
XsensResultValue
Xsens return values.
double m_roll
The roll (rotation around x-axis / back-front-line)
void setSampleFrequency(uint16_t freq)
Compute the period and skip factor from a sample frequency.
uint32_t m_baudrate
The baudrate at which an Xsens device was detected.
double getRealSampleFrequency(void) const
Return the real sample frequency in Hz.
uint32_t m_outputSettings
bool operator>(const CArray< T, N > &x, const CArray< T, N > &y)
#define CMT_LEN_SCENARIOLABEL
CmtOutputSettings m_outputSettings
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
char m_label[CMT_LEN_SCENARIOLABEL+1]
The label of the scenario.
uint8_t m_portNr
The port number.
A structure for storing device modes using period and skip factor (new default)
uint16_t m_sampleFrequency
unsigned __int64 uint64_t
void setPeriodAndSkipFactor(uint16_t period, uint16_t skip)
Compute the sample frequency from a period and skip factor.
Callback function, called right after successfully switching to Measurement mode. ...
#define CMT_DEFAULT_OUTPUT_SETTINGS
uint32_t CmtOutputMode
An output mode bit-field.
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
Callback function, called right before sending a GotoMeasurement message.
bool operator<(const CPoint< DERIVEDCLASS > &a, const CPoint< DERIVEDCLASS > &b)
Used by STL algorithms.
double m_yaw
The yaw (rotation around z-axis / down-up-line)
CmtOutputSettings m_outputSettings
Callback function, called when bytes have been read from a port.
uint16_t getSampleFrequency(void) const
Return the sample frequency in Hz.
A structure for storing device modes.
uint32_t m_masterDeviceId
CmtOutputMode m_outputMode
char m_portName[32]
The port name.
CmtGpsSatelliteInfo m_svInfo[CMT_MAX_SVINFO]
unsigned __int32 uint32_t
#define CMT_DEFAULT_OUTPUT_MODE
#define CMT_MAX_DEVICES_PER_PORT
uint8_t m_navigationStatus
uint32_t CmtDeviceId
The type of a Device Id.
uint16_t CmtMtTimeStamp
An MT timestamp (sample count)
A structure for storing scenario information.
uint8_t m_reservedForHost[32]
uint8_t m_data[CMT_MAXMSGLEN]
Callback function, called when a full data bundle is available and has been processed by the CMT...
uint16_t m_syncinSkipFactor
uint64_t CmtOutputSettings
An output settings bit-field.
uint16_t m_outputSkipFactor