./mtdevice.py [commands] [opts]
Print this help and quit.
Reset device to factory defaults.
Change baudrate from BAUD (see below) to NEW_BAUD.
Configure the device (see OUTPUT description below).
Print MTData. It is the default if no other command is supplied.
Print current MT device configuration.
Change the current XKF scenario.
Configure the device in legacy mode (needs MODE and SETTINGS arguments
-y, --synchronization=settings (see below)
Configure the synchronization settings of each sync line (see below)
-u, --setUTCTime=time (see below)
Sets the UTC time buffer of the device
Serial interface of the device (default: /dev/ttyUSB0). If 'auto', then
all serial ports are tested at all baudrates and the first
suitable device is used.
Baudrate of serial interface (default: 115200). If 0, then all
rates are tried until a suitable one is found.
Timeout of serial communication in second (default: 0.002).
Initial wait to allow device to be ready in second (default: 0.1).
The format is a sequence of "<group><type><frequency>?<format>?"
The frequency and format are optional.
The groups and types can be:
t temperature (max frequency: 1 Hz):
i timestamp (max frequency: 2000 Hz):
ii Integer Time of the Week (ITOW)
o orientation data (max frequency: 400 Hz):
b pressure (max frequency: 50 Hz):
a acceleration (max frequency: 2000 Hz (see documentation)):
ah acceleration HR (max frequency 1000 Hz)
p position (max frequency: 400 Hz):
n GNSS (max frequency: 4 Hz):
ns GNSS satellites info
w angular velocity (max frequency: 2000 Hz (see documentation)):
wh rate of turn HR (max frequency 1000 Hz)
g GPS (max frequency: 4 Hz):
r Sensor Component Readout (max frequency: 2000 Hz):
rr ACC, GYR, MAG, temperature
m Magnetic (max frequency: 100 Hz):
v Velocity (max frequency: 400 Hz):
s Status (max frequency: 2000 Hz):
Frequency is specified in decimal and is assumed to be the maximum
frequency if it is omitted.
Format is a combination of the precision for real valued numbers and
f single precision floating point number (32-bit) (default)
d double precision floating point number (64-bit)
e East-North-Up (default)
The default configuration for the MTi-1/10/100 IMUs can be
For getting quaternion orientation in float with sample time:
For longitude, latitude, altitude and orientation (on MTi-G-700):
The format follows the xsens protocol documentation. All fields are required
and separated by commas.
Note: The entire synchronization buffer is wiped every time a new one
is set, so it is necessary to specify the settings of multiple
It also possible to clear the synchronization with the argument "clear"
Function (see manual for details):
4 Interval Transition Measurement
Line (manual for details):
1 GPSClockIn (only available for 700/710)
2 Input Line (SyncIn)
5 ExtTimepulseIn (only available for 700/710)
6 Software (only available for SendLatest with ReqData message)
1 Positive pulse/ Rising edge
2 Negative pulse/ Falling edge
Skip First (unsigned_int):
Number of initial events to skip before taking actions
Skip Factor (unsigned_int):
Number of events to skip before taking action again
Ignored with ReqData.
Pulse Width (unsigned_int):
For SyncOut, the width of the generated pulse in 100 microseconds
unit. Ignored for Toggle pulses.
Delay after receiving a sync pulse to taking action,
100 microseconds units, range [0...600000]
Reference clock period in milliseconds for ClockBiasEstimation
Offset from event to pulse generation.
100 microseconds unit, range [-30000...+30000]
For changing the sync setting of the SyncIn line to trigger indication
with rising edge, one time triggering and no skipping and delay. Enter
Note a number is still in the place for pulse width despite it being
To set multiple lines at once:
./mtdevice.py -y 3,2,1,0,0,0,0,0 -y 9,0,1,0,0,0,10,0
To clear the synchronization settings of MTi
./mtdevice.py -y clear
There are two ways to set the UTCtime for the MTi.
Option #1: set MTi to the current UTC time based on local system time with
Option #2: set MTi to a specified UTC time
The time fields are set as follows:
year: range [1999,2099]
day: day of the month, range [1,31]
hour: hour of the day, range [0,23]
min: minute of the hour, range [0,59]
sec: second of the minute, range [0,59]
ns: nanosecond of the second, range [0,1000000000]
1: Valid Time of Week
Note: the flag is ignored for setUTCTime as it is set by the module
itself when connected to a GPS
Set UTC time for the device:
./mtdevice.py -u 1999,1,1,0,0,0,0,0
Legacy mode of the device to select the information to output.
This is required for 'legacy-configure' command.
MODE can be either the mode value in hexadecimal, decimal or
binary form, or a string composed of the following characters
t temperature, [0x0001]
c calibrated data, [0x0002]
o orientation data, [0x0004]
a auxiliary data, [0x0008]
p position data (requires MTi-G), [0x0010]
v velocity data (requires MTi-G), [0x0020]
s status data, [0x0800]
g raw GPS mode (requires MTi-G), [0x1000]
r raw (incompatible with others except raw GPS), [0x4000]
For example, use "--output-mode=so" to have status and
Legacy settings of the device. This is required for 'legacy-configure'
SETTINGS can be either the settings value in hexadecimal,
decimal or binary form, or a string composed of the following
characters (in any order):
t sample count (excludes 'n')
n no sample count (excludes 't')
q orientation in quaternion (excludes 'e' and 'm')
e orientation in Euler angles (excludes 'm' and 'q')
m orientation in matrix (excludes 'q' and 'e')
A acceleration in calibrated data
G rate of turn in calibrated data
M magnetic field in calibrated data
i only analog input 1 (excludes 'j')
j only analog input 2 (excludes 'i')
N North-East-Down instead of default: X North Z up
For example, use "--output-settings=tqMAG" for all calibrated
data, sample counter and orientation in quaternion.
Sampling period in (1/115200) seconds (default: 1152).
Minimum is 225 (1.95 ms, 512 Hz), maximum is 1152
Note that for legacy devices it is the period at which sampling occurs,
not the period at which messages are sent (see below).
Only for mark III devices.
Number of samples to skip before sending MTData message
The frequency at which MTData message is send is:
115200/(PERIOD * (SKIPFACTOR + 1))
If the value is 0xffff, no data is send unless a ReqData request