Using custom accelerometer, gyro & magnetometer to move objects

So, here’s my problem:
I am using 2 9 DoF (3X Accel, 3X Gyro, 3X Mag) modules to implement a motion capture billiards game. In order to control the cue, I need to assign the readings to transformation of my Cue GameObject. My sensors give me linear and angular accelerations in real values (m/sec^2 and rad/sec^2). I am really stuck as I have programmed the entire driver for the sensors and the game, but I couldn’t integrate the two parts.

Does anyone have any idea as to how I can apply this data to control the cue? Any kind of help is appreciated.

The best way to do it is using sensor fusion methods based on unscented Kalman filters/ sigma point filters

Note: you need accurate time stamps of all measurements.

this may be helpful for a start, though based on extended Kalman filter instead of unscented