Hello,
Can you please explain in more details about what do you mean by saying: "adjust each according to it's matching rotation so that we get pure x,y,z components"?
I'm really sorry, but what can I see from the information given is, you have a six-tuple specifying the acceleration and (maybe) the "current position" of some object and you want to transform the acceleration values of that object to the Cartesian plane.
It would be nice if you can provide more details about the problem that you want to solve. Also, from the description, it seems that you want to do some data analysis (and, maybe, a machine learning) task related to sensor data. Being a ML and DS enthusiast, I would like to see if I can help you with the project.
Feel free to contact me, if you find this proposal useful.
Regards,
Atul Rajdhar