Given a gravity vector $g$ in a 3D coordinate frame $F$ we can find pitch $p$ and roll $r$ (Euler angles) of $F$ relative to $g$. Assume we apply a rigid transformation to $F$, sense a new gravity vector $g'$, and compute new Euler angles $p'$ and $r'$. Can we predict the yaw angles $y$ or $y'$ given $(p, r, p', r')$? Intuitively it seems doable since axis rotations are all linked but I do not know where to start.
Update: I think the solution depends on the rotation part, $R$, of the rigid transformation, and so cannot be predicted using only $(p, r, p', r')$. I've been thinking about it graphically where the pitch vector (axis of pitch rotation), for example, is embedded in world coordinates. But since its exact rotation about $g$ is unknown, I think of the pitch vector as, like, a cone, $C$, of all possible orientations. Then, after the rigid transformation is applied and $g',p',r'$ are measured we can find a new cone $C'$ for the new pitch vector. I think the intersection of $R*C$ and $C'$ contain the possible pitch vectors, where $R*C$ is just the cone made up of all vectors in $C$ rotated by $R$. Similarly, we compute the set of possible roll vectors. So, this would constrain the solutions to a small finite set that could be checked manually. Is this analysis sound? I am sorry for my loose terminology, I am not a mathematician.
Think about it this way. At any point in time the local frame can rotate about the gravity vector and the gravity vector would be invariant in that frame. So, you you can't uniquely determine the yaw angles about global Z in either the original frame or the new frame. You need three non-colinear points to uniquely determine a frame's orientation. The gravity vector gives you only colinear points.