How to find the optimal angles to direct a light beam? I have an optical system that looks as follows:

Sketch of optical system
There is a light beam shining on a mirror with a direction that is controlled using $\alpha$ and $\beta$ as shown in the sketch. The two green planes are parallel detector planes on which the incoming light beam can be registered (Points $R_1$ and $R_2$). The goal is to steer the beam such that it goes exactly through $P_{1,goal}$ and $P_{2,goal}$ . It can be done iteratively, however I want to calculate the optimal $\alpha$ and $\beta$ such that the beam fulfills this condition. The main issue is that I don't know much about the optical system:

*

*The distances between the two green detector planes are not known

*The absolute values of angles $\alpha$ and $\beta$ are not known (the relative angles are known however!)

*The location of the light source $S$ is not known

However, I know the position of $P_{1,goal}$ and $P_{2,goal}$ on their corresponding plane and I know $R_1$ and $R_2$ (as this is measured by the detector). Moreover, whenever $\alpha$ or $\beta$ is altered, I know by how much.
I tried to approach this problem by using linear algebra. I could come up with the following forumlas that hold for my sketch (where $i=(1,\dots,N)$ denote the different points for each beam I record):
$$\tag1\overrightarrow{P_i^*}= \overrightarrow{S}-\frac{(\overrightarrow{S}-\overrightarrow{P})\cdot\overrightarrow{n_d}}{\overrightarrow{n_d}\cdot\overrightarrow{n_{s,i}}}\cdot\overrightarrow{n_{s,i}}
$$
$$\tag2
\overrightarrow{n_{r,i}}=\overrightarrow{n_{s,i}}-2\cdot \frac{\overrightarrow{n_{d}}\cdot\overrightarrow{n_{s,i}}}{\left \| \overrightarrow{n_{d}} \right \|^2}\cdot\overrightarrow{n_{d}}
$$
$$
\tag3
\overrightarrow{n_{r,i}}=\overrightarrow{R_{1,i}}-\overrightarrow{P_{i}^*}=\overrightarrow{R_{2,i}}-\overrightarrow{P_{i}^*}$$
However, in my opinion there are too many unknowns in the formulas to calculate anything properly. Hence, I am looking for different approaches towards tackling this problem. I can record as many $R_1$ and $R_2$ and their corresponding angles as I want, so I think starting from this I should be able to find a unique solution.
Any help would be highly appreciated!
 A: To have an account over the known facts.
Given a mirror plane $\Pi_m\to (p-p_m)\cdot\vec n_m=0$, the incident ray support line $L_1\to p = S+\lambda\vec n_S$ the reflected ray line support $L_2\to p=p^* + \mu\vec n_r$ and the detector planes $\Pi_1\to (p-p_1)\cdot \vec n_d=0,\ \ \Pi_2\to(p-p_2)\cdot\vec n_d=0$ we have
$$
p^* = \Pi_m\cap L_1\Rightarrow\cases{(S+\lambda\vec n_S-p_m)\cdot\vec n_m=0\\ \lambda = \frac{(p_m-S)\cdot\vec n_m}{\vec n_S\cdot\vec n_m}\\
p^* = S+\frac{(p_m-S)\cdot\vec n_m}{\vec n_S\cdot\vec n_m}\vec n_S
}
$$
now $\vec n_r = 2\vec n_m+\vec n_S$ and follows the determination of $R_1,\ R_2$ as the intersections $R_1 = L_2\cap\Pi_1,\ R_2 = L_2\cap \Pi_2$
so in the same procedure as to $p^*$ determination we have
$$
R_k = p^* +\frac{(p_k-p^*)\cdot \vec n_d}{\vec n_r\cdot\vec n_d}\vec n_r,\ \ k = \{1,2\}
$$
now assuming that $P_1, P_2$ are over the same line $L_P\to p = p_1 +\gamma \vec n_d$ we have
$$
R_k-P_k = p^* +\frac{(p_k-p^*)\cdot \vec n_d}{\vec n_r\cdot\vec n_d}\vec n_r-P_k,\ \ k = \{1,2\}
$$
with $p_2 = p_1 + \delta \vec n_d$ and $P_2 = P_1 + \delta \vec n_d$ (we can choose $p_{1,2} = P_{1,2}$)
Resuming, assuming that $\vec n_m = \vec n_m(\beta)$ and $\vec n_S = \vec n_S(\alpha)$ we need to know $S,p_m,\vec n_d, p_1,\delta$. Considering a plane problem, we have $8$ unknowns to determine from the following data $\{\alpha_j,\beta_j,\|R_{1j}-P_{1j}\|,\|R_{2j}-P_{2j}\|, j = 1,\cdots,n\}$
A: If the reference for angle $\beta$ is parallel to $Y$-axis, and ray $P_{1,goal}-P_{2,goal}$ is also perpendicular to $Y$-axis then the angle between $n_d$ (perpendicular to the mirror) and $n_r$ is $\beta$. By Reflection Law, then the angle between $n_d$ and $n_s$ is also $\beta$. Then $\alpha=\pi/2-2\beta$
This means than the ray $n_s$ may not pass through point $S$.
If we know, for sure, that it does pass through $S$ then we need to move the mirror horizontally/vertically until it succeed.
To solve this problem we need more data:

*

*Relative position of mirror and point S

*Point of rotation of the
mirror, related to the detectors.

