Synchronization with accelerometer


  I have an external accelerometer which has 3 axes(x,y,z) and when rotated , gives the tilt or rotation about each axes. Now what I aim to do is synchronize the axes of this accelerometer with the racquet which a player is holding as a milkshape model. Can anyone guide me as to how to do this ?

The racquet is just another joint of the imported milkshape player. So when I pass on the values obtained from the accelerometer to the racquet joint using jc.setRotation(int joint, float time, float x, float y, float z)… some rotations take place, but they are not similar to the ones performed externally by the accelerometer. I think this is an issue of synchronization and also the fact that setRotation method sets rotation relative to its parent joint.

Please help me resolve this issue.

Thank you