I posted this same question on space.stackexchange but never received any answer. So I am posting here hoping to get an answer as this is a quite mathematical topic.
I am trying to fully understand the TRIAD algorithm for attitude determination of a satellite. https://en.wikipedia.org/wiki/Triad_method
So so far I know that the vectors $\vec{r}_1$ and $\vec{r}_2$ can be constructed using measurements from different sensors. For example: if you have a sunsensor on each side of a satellite (in the x- ,y- and z-direction) and only the x-side is facing the sun you could eventually have a vector as follows $\vec{r}_1 = [100,0,0,]^T$.
But what about the vectors which are not fixed to the body of the satellite itself? How do you construct vectors for such a inertial reference frame (orbital reference frame)?
Any alternatives are welcome.
The final goal is to get the rotation matrix A.
$$A = [\vec{R}_1;\vec{R}_2; (\vec{R}_1 \times \vec{R}_2)] [\vec{r}_1; \vec{r}_2;(\vec{r}_1 \times \vec{r}_2)]^T$$
EDIT: I know ot has something to do with spherical harmonics
