## 4 Solution of the Problem
### UAV Deployment Optimization  
In the proposed system, the UAV hovers at a point in a 2D region, while the STAR-RIS is attached on it for better communication for the entire system. \(SIC_{max}\) denotes the maximum demodulation capability of SIC in the system, which means that the BS can transmit the superposition coding signal from \(SIC_{max}\) users in maximum one transmission. If the number of users exceeds the SIC limit, the communication mode switches to time division multiple access plus non-orthogonal multiple access (TDMA + NOMA) mode [18]. For example, there are four users and \(SIC_{max}=2\). In this circumstance, the BS transmits the superposition coding signal containing the two users' symbols in each transmission. If there are four users and \(SIC_{max}=4\), the BS transmits the superposition coding signal containing the four users' symbols in each transmission. To guarantee that the STAR-RIS exactly serves one user on each side, we set \(SIC_{max}=2\) in the proposed scheme. Setting the \(SIC_{max}=2\) is essential to avoid mutual interference between more than one user served on the same side of the STAR-RIS. Without this constraint, the signals intended for these users would interfere with each other, significantly degrading system performance. Moreover, scenarios with more than one user on the same side of the STAR-RIS are beyond the scope of our paper. We define the user density as \(U_{density}\), denoting the number of users per square meter. The radius \(R_{uav}\) of the coverage area is given by  
\[R_{uav}=h_{uav}\tan(\theta_{uav}/2), \tag{10}\]  
where \(\theta_{uav}\in(0,\pi)\) is the angle, and the coverage area is calculated as  
\[Area_{uav}=\pi\cdot(h_{uav}\tan(\theta_{uav}/2))^{2}. \tag{11}\]  
The expected number of users in each transmission is  
\[t=\left\{ \begin{array}{cc}U_{density}\pi(h_{uav}\tan(\theta_{uav}/2))^{2} (if\;U_{density}\pi(h_{uav}\tan(\theta_{uav}/2))^{2}\leq SIC_{max}),\\ SIC_{max}(else),\end{array} \right. \tag{12}\]  
is the optimal transmit beamforming solution to problem (9a). So we have the optimal beamforming vector \(\mathbf{w}_{k}^{*}\), where \(\mathbf{w}_{k}^{*}=\sqrt{P_{max}}\frac{\left(\mathbf{F}_{k}^{H}\mathbf{\Theta}_{ \mathbf{i}}\mathbf{G}\right)^{H}}{\left\|\mathbf{F}_{k}^{H}\mathbf{\Theta}_{ \mathbf{i}}\mathbf{G}\right\|}\triangleq\mathbf{w}_{k}^{\text{MRT}}\). Given \(h_{uw}\) and \(\mathbf{w}_{k}^{*}\), the problem (9a) can be simplified to the following equivalent problem  
\[\max_{\mathbf{\Theta}_{\mathbf{i}}}\log_{2}\!\left(\!1+\frac{ \left\|\mathbf{F}_{r}^{H}\mathbf{\Theta}_{r}\mathbf{G}\right\|^{2}}{\left\| \mathbf{F}_{k}^{H}\mathbf{\Theta}_{\mathbf{i}}\mathbf{G}\right\|^{2}+\sigma_{ r}^{2}}\right)+\log_{2}\!\left(\!1+\frac{\left\|\mathbf{F}_{l}^{H}\mathbf{\Theta}_{ \mathbf{i}}\mathbf{G}\right\|^{2}}{\sigma_{l}^{2}}\!\right)\!,\] (16a) s.t. \[k\in\{t,r\}\text{,(\ref{eq:16a}), (\ref{eq:16a}), (\ref{eq:16a}), (\ref{eq:16a}), (\ref{eq:16a}).} \tag{16b}\]  
We assume \(\boldsymbol{v}_{k}=\left[v_{k}^{1},\cdots,v_{k}^{m},\cdots,v_{k}^{M}\right]^{H}\) where \(v_{k}^{m}=\sqrt{\beta_{m}^{k}}e^{i\phi_{m}},\forall k\in\{t,r\},\forall m\in \mathcal{M}\). Then, we have \(\mathbf{F}_{k}^{H}\mathbf{\Theta}_{\mathbf{i}}\mathbf{G}=\boldsymbol{v}_{k}^{H }\mathbf{\Phi}_{k}\), where \(\mathbf{\Phi}_{k}=\text{diag}\!\left(\mathbf{F}_{k}^{H}\right)\mathbf{G}\). Thus, problem (16a) is equivalent to  
\[\max_{\mathbf{\Theta}_{\mathbf{i}}}\log_{2}\!\left(\!1+\frac{ \left\|\mathbf{v}_{r}^{H}\mathbf{\Phi}_{r}\right\|^{2}}{\left\|\mathbf{v}_{l}^ {H}\mathbf{\Phi}_{l}\right\|^{2}+\sigma_{r}^{2}}\!\right)+\log_{2}\!\left(\!1 +\frac{\left\|\mathbf{v}_{l}^{H}\mathbf{\Phi}_{l}\right\|^{2}}{\sigma_{l}^{2 }}\!\right)\!,\] (17a) s.t. \[k\in\{t,r\}\text{,(\ref{eq:16a}), (\ref{eq:16a}), (\ref{eq:16a}), (\ref{eq:16a}), (\ref{eq:16a}).} \tag{17b}\]  
Since \(\sigma_{k}\) is already given, problem (17a) depends only on the \(\left\|\mathbf{v}_{k}^{H}\mathbf{\Phi}_{k}\right\|^{2}\).