Data API

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”

(Note: Depending on the flags, some of these data may be 0. They are all on by default.)

The values are provided by the on-board BNO055 integrated sensor, whose full documentation is provided on the vendor’s website. The most useful values for the average user are acceleration and quaternion orientations.

Last updated