Recently, I am reading a technical report: 3GPP TR 38.900 V14.3.1 [1]. I want to derive the equation (7.1-15) on page 18 in [1], which is $$ \psi = \arg ((\sin \gamma \cos \theta \sin(\phi - \alpha) + \cos \gamma (\cos \beta \sin \theta - \sin \beta \cos \theta \cos(\phi - \alpha))) \\ + j(\sin \gamma \cos(\phi - \alpha) + \sin \beta \cos \gamma \sin(\phi - \alpha))), \tag{1} $$ where $\psi$ is the angle between $\hat{\theta}$ and $\hat{\theta'}$. $\hat{\theta}$ represents the spherical unit vectors of the Global Coordinate System (GCS) and $\hat{\theta'}$ is the representation in the Local Coordinate System (LCS). $\alpha$ is called the bearing angle, $\beta$ is called the downtilt angle and $\gamma$ is called the slant angle. $\theta$ is the zenith angle and $\phi$ is the azimuth angle in a Cartesian coordinate system.
For the further introduction to GCS and LCS, please see Section 7.1 in [1].
Question
How to derive (7.1-15) in [1]?
Reference
[1] 3GPP TR 38.900 V14.3.1. URL: http://www.3gpp.org/ftp//Specs/archive/38_series/38.900/38900-e31.zip.
The following is my attempt to solve the question: From (7.1-12) in [1] we know $$\psi = \arg(\hat{\theta}(\theta, \phi)^T R \hat{\theta'}(\theta', \phi') + j \hat{\phi}(\theta, \phi)^T R \hat{\theta'}(\theta', \phi')). \tag{2} $$ First, we consider the real part in $\arg(\cdot)$: $$\hat{\theta}(\theta, \phi)^T R \hat{\theta'}(\theta', \phi') \tag{3}.$$ From (7.1-13) in [1] we know $$ \hat{\theta} = \left[ \begin{matrix} \cos \theta \cos \phi \\ \cos \theta \sin \phi \\ -\sin \theta \end{matrix} \right]. \tag{4} $$ As for the matrix $R$, please see (7.1-2) in [1]. Moreover, $$ \hat{\theta'}(\theta', \phi') = \left[ \begin{matrix} \cos \theta' \cos \phi' \\ \cos \theta' \sin \phi' \\ -\sin \theta' \end{matrix} \right]. \tag{5} $$ From (7.1-1) in [1] we get $$ \begin{align} \cos \theta' & = \cos (\text{acos} (\cos \beta \cos \gamma \cos \theta + (\sin \beta \cos \gamma \cos(\phi - \alpha) - \sin \gamma \sin(\phi - \alpha)) \sin \theta)) \\ & = \cos \beta \cos \gamma \cos \theta + (\sin \beta \cos \gamma \cos(\phi-\alpha) - \sin \gamma \sin(\phi - \alpha)) \sin \theta, \tag{6} \end{align} $$ where acos is arccos.
On the other hand, from (7.1-8) in [1] we get
$$
\begin{align}
\cos \phi' = &\cos (\arg ((\cos \beta \sin \theta \cos(\phi - \alpha) - \sin \beta \cos \theta) \\
& + j (\cos \beta \sin \gamma \cos \theta + (\sin \beta \sin \gamma \cos(\phi - \alpha) \\
& + \cos \gamma \sin (\phi - \alpha)) \sin \theta))). \tag{7}
\end{align}
$$

Let $$ a = \cos \beta \sin \theta \cos(\phi - \alpha) - \sin \beta \cos \theta \tag{8} $$ and $$ b = \cos \beta \sin \gamma \cos \theta + (\sin \beta \sin \gamma \cos(\phi - \alpha) + \cos \gamma \sin (\phi - \alpha)) \sin \theta \tag{9} ,$$ then $$ \begin{align} (7) & = \cos(\arg(a+jb)) \\ & = \frac{a}{c} \\ & = \frac{a}{\sqrt{a^2 + b^2}} \\ & = \frac{\cos \beta \sin \theta \cos(\phi - \alpha) - \sin \beta \cos \theta}{\sqrt{[\cos \beta \sin \theta \cos(\phi - \alpha) - \sin \beta \cos \theta]^2 + [\cos \beta \sin \gamma \cos \theta + (\sin \beta \sin \gamma \cos(\phi - \alpha) + \cos \gamma \sin (\phi - \alpha)) \sin \theta]^2}}. \tag{10} \end{align} $$
On the other hand, $$ \begin{align} \sin \phi' & = \frac{b}{c} \\ & = \frac{\cos \beta \sin \gamma \cos \theta + (\sin \beta \sin \gamma \cos(\phi - \alpha) + \cos \gamma \sin (\phi - \alpha)) \sin \theta}{c}, \tag{11} \end{align} $$ where $c$ is the denominator of (10). Then $$ - \sin \theta' = \pm \sqrt{1 - \cos^2 \theta'}. \tag{12} $$ Because $\theta' \in [0, \pi]$, $\sin \theta' \geq 0$ and $- \sin \theta' \leq 0$. So $$ - \sin \theta' = - \sqrt{1 - \cos^2 \theta'}. \tag{13} $$
Substituting (6) into (13), we can get $$ \begin{align} & - \sin \theta' \\ = & - \sqrt{1- [\cos \beta \cos \gamma \cos \theta + (\sin \beta \cos \gamma \cos(\phi-\alpha) - \sin \gamma \sin(\phi - \alpha)) \sin \theta]^2}. \tag{14} \end{align} $$
Substituting (4), (7.1-2) in [1], and (5) into (3), we obtain $$ \begin{align} (3) = & \left[ \begin{matrix} \cos \theta \cos \phi \\ \cos \theta \sin \phi \\ -\sin \theta \end{matrix} \right]^T \\ & \left[ \begin{matrix} \cos \alpha \cos \beta & \cos \alpha \sin \beta \sin \gamma - \sin \alpha \cos \gamma & \cos \alpha \sin \beta \cos \gamma + \sin \alpha \sin \gamma \\ \sin \alpha \cos \beta & \sin \alpha \sin \beta \sin \gamma + \cos \alpha \cos \gamma & \sin \alpha \sin \beta \cos \gamma - \cos \alpha \sin \gamma \\ - \sin \beta & \cos \beta \sin \gamma & \cos \beta \cos \gamma \end{matrix} \right] \\ & \left[ \begin{matrix} [ \cos \beta \cos \gamma \cos \theta + (\sin \beta \cos \gamma \cos (\phi - \alpha) - \sin \gamma \sin (\phi - \alpha)) \sin \theta] a / c \\ [ \cos \beta \cos \gamma \cos \theta + (\sin \beta \cos \gamma \cos (\phi - \alpha) - \sin \gamma \sin (\phi - \alpha)) \sin \theta] b / c \\ - \sqrt{1 - [ \cos \beta \cos \gamma \cos \theta + (\sin \beta \cos \gamma \cos (\phi - \alpha) - \sin \gamma \sin (\phi - \alpha)) \sin \theta]^2} \end{matrix} \right]. \tag{15} \end{align} $$ Then I do not know how to continue. Any comments or answers are welcome. Thanks in advance.