I have a sensor (3 axis gyroscope) which can rotate and measure angular velocity in 3 dimensions (aligned with the sensor). I know what its current orientation is with respect to the world frame. Call this quaternion qs. I take a reading from my gyroscope and integrate it to give me a rotation in the sensor frame. Call this quaternion qr.
I now want to apply the rotation qr to the current orientation qs to obtain the new orientation, qs'. But I cannot use qr directly as it describes a rotation in the sensor body frame.
I need to transform my rotation quaternion into the world frame, and then I could just apply it to the orientation i.e. qs' = qs * qr_world. But I am really struggling to understand how I can perform this transformation qr -> qr_world.
Does this even make sense? I wonder if I have fundamentally misunderstood some concepts here. If it does make sense, then I am specifically interested in understanding how to do this using quaternion operations (if that is possible) rather than rotation matrices or euler angles.