I'm trying to understand the output from a rotation sensor. I'm assuming, that the rotation sensor in some cases, is simply an abstraction of the data from the accelerometer, i.e. the rotation angles are calculated from the accelerometer data. I'm not sure whether this is an correct assumption?

I've tried to read data from accelerometer and rotation sensor in a symbian and Qt project. If the assumption made above is true, then I should be able to rotate the accelerometer data back with the rotation data, so that it is [0 0 1g]'.

Now the problem arises: It is not clear to me, whether the rotations should be understood as intrinsic or extrinsic rotation. And in which order are they performed.

I've tried different orders of rotations, e.g. Rz*Rx*Ry or Ry*Rx*Rz, and both intrinsic and extrinsic rotations. But I cannot rotate the accelerometer data into [0 0 1g]' . Am I doing somthing wrong? Or is it not possible to use the rotation data to rotate the accelerometer data back into its reference position?

One example could look like this:
%data from rotation, in degrees
rotation = [1.6378 -100.5986 0];

%data from accelerometer
acc = [10.8222 0.3147 -2.0003];

%rotate acc back to reference frame, expected value = [0 0 9.82]
acc_ref = Ry(-100.5986)*Rx(1.6378)*Rz(0)*acc;

acc_ref is now somthing like [-0.0244 0.0001 11.0100]. The problem is mainly, that the x-component is not close enough to zero.

I don't think it is because of noise or filtering of data, as I have tried different samples of the data and filtered data.