Let $A\in M_3(\mathbb R)$ and $F$ is a real vector s.t. $$\operatorname{trace}(A)=\sum_{p=1}^3 F_p.$$ Find an orthonormal matrix $U$ ($U^{\tau}U=UU^{\tau}=I$) s.t. $$\operatorname{diag}(U^{\tau}AU)=F,$$ or explicitly $$\sum_{i,j=1}^3 U_{ip}A_{ij}U_{jp}=F_p.$$ It is well known that an orthogonal $3\times3$ matrix forms a $3-D$ manifold. Naively, one expects that these $3$ additional constraints allow finding a unique point. As explained here, one equation is redundant, and therefore one expects a $1$-parameter solution to the problem in general case. One can also imagine a case when there is a unique solution, namely when the problem of finding a $3-D$ rotation can be reduced to $2-D$ rotation, which is parameterized by only one angle.
My question is the following: how can the $1$-dimensional general solution be parametrized, what are the exact conditions of having 0-dimensional solutions, and when the solutions do not exist.
It is tempting to bring this problem in correspondence of finding a matrix congruence (it has a solution only when the two matrices have the same inertia) such as discussed here, and which can be solved by the Gram–Schmidt process. However, there are some differences such as we impose from the beginning a certain structure of the solution and impose fewer constraints.