> For the complete documentation index, see [llms.txt](https://mugic-motion.gitbook.io/mugic-r-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mugic-motion.gitbook.io/mugic-r-documentation/about-mugic-r/data-api.md).

# 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:&#x20;

* 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”

{% hint style="info" %}
(Note: Depending on the flags, some of these data may be 0. They are all on by default.)
{% endhint %}

{% hint style="info" %}
The values are provided by the on-board BNO055 integrated sensor, whose [full documentation](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bno055-ds000.pdf) is provided on [the vendor’s website](https://www.bosch-sensortec.com/products/smart-sensors/bno055.html).  The most useful values for the average user are **acceleration** and **quaternion orientations**.
{% endhint %}

<br>
