I have two devices with a 3-axis accelerometer each. Both devices are placed on a bigger object so they move together. The movement is quite slow, I expect a bandwidth < 1 Hz.
I want to calculate the difference in orientation between the two devices. But since they are positioned randomly on the bigger object how I can do the math?
Example of meta-code:
typedef struct
{
float x;
float y;
float z;
} acc_t;
typedef struct
{
float yaw;
float pitch;
float roll;
} pos_t;
acc_t acc1;
acc_t acc2;
pos_t pos;
do_measure(&acc1, device1); // reads the accelerometer and fill the struct
do_measure(&acc2, device2);
do_diff(acc1, acc2, &pos); // calculate the orientation of acc2 compared to acc1
I have no problem to acquire the data from the accelerometer (do_measure()), but I don't know how to implement do_diff(). I'm not asking to write the code, but just a hint about the math behind.