How to rotate a simple model if you have accelerator, gyroscope, magnetometer data?
I'm not exactly sure what you want to do with the Accelerometer and Magnetometer data, but the rotation can be done pretty easily with Animation Nodes.

After installing Animation Nodes (link above), create a text block in Blender with all of your Euler Rotation data. Make sure that there is only one space between each of the elements so it can be parsed easier:



In the Animation Nodes node editor add a Text Block Reader node (press Ctrl + A to search all nodes or Shift + A to view the node menu). Then add a Split Text node and split by Lines:



Next, we need to parse all of these strings into vectors. To do this, add an Expression node and create a new input from the Text List output of the previous node and name it t. Use the gear icon to set the output type to Euler List. Paste the following code into the text box:



[[float(e) for e in a.split(" ")] for a in t]


If your data is in degrees, you'll need to convert to radians:

[[(float(e)*pi/180) for e in a.split(" ")] for a in t]




The rest of it is just inserting and connecting nodes. Here's the completed NodeTree:



You can replace the Cube object with whatever yours is named.

Here is the result: