Data API
Last updated
Last updated
Once your computer receives the data over either WIFI using port 4000, or over USB, you will receive datagrams with the given format:
Over WIFI: UDP network packet addressed to computer IP over port 4000. Contents: OSC Message “/mugicdata AX AY AZ EX EY EZ GX GY GZ MX MY MZ QW QX QY QZ Battery SysStatus GyroStatus AccelStatus MagStatus Secs SeqNum” (“A”=accelerometer, so AX AY AZ means the acceleration of X, Y and Z angles. See page 6 “MUGIC® Datagram and description”)
Over USB: discard any line on the serial port not beginning with “mugicdata” (or pipe it into a log, since they consist of logging/debugging information indicating state transitions and other operations of the MUGIC® device). The lines containing data have the format: “mugicdata AX AY AZ EX EY EZ GX GY GZ MX MY MZ QW QX QY QZ Battery SysStatus GyroStatus AccelStatus MagStatus Secs SeqNum”