## 3 System Model
### Air-to-Ground Path Loss Model  
Now, if the \(i\)th MD wants to offload its task to the \(j\)th UAV-MEC server, where the position of MD \(i\) is denoted \((x_{i},y_{i},0)\) in the 3D coordinate system, then the ground distance between MD \(i\) and UAV-MEC server \(j\) in time slot t is denoted \(r_{i,j}(t)\). While the UAV-MEC server moves along the ellipsoidal path, the 3D distance between MD \(i\) and UAV-MEC server \(j\) in time slot t is expressed as  
\[d_{i,j}(t)=\sqrt{(x_{i}-x_{j}(t))^{2}+(y_{i}-y_{j}(t))^{2}+h^{2}}. \tag{6}\]  
The wireless communications model between the UAV-MEC server and the ground MDs is constructed based on line-of-sight (LoS) and non-line-of-sight (NLoS) link propagation modes, from which the air-to-ground path loss model is derived. From [44; 45], the mathematical equations for the path loss of the LoS and NLoS propagation modes can be expressed as follows  
Figure 1: The XY-plane positions of MDs and a UAV with an ellipsoidal trajectory. \[PL_{\text{LoS}} =20\log d_{i,j}(t)+20\log f+20\log\frac{4\pi}{c}+\eta_{\text{LoS}}, \tag{7}\] \[PL_{\text{NLG}} =20\log d_{i,j}(t)+20\log f+20\log\frac{4\pi}{c}+\eta_{\text{NLG}},\]  
where \(c\) represents the light's propagation speed and \(f\) represents the carrier frequency; \(\eta_{\text{LoS}}\) and \(\eta_{\text{NLG}}\) are the environment factors specific to average the additional path losses for the LoS and NLoS propagation modes, respectively. However, according to the International Telecommunication Union (ITU) guidelines for radio transmissions, the following parameters are essential for figuring out the geometric probability of LoS transmission in an urban setting:  
* \(\alpha\) represents the portion of the total land area occupied by buildings. * \(\beta\) quantifies the average density of buildings per unit area, measured in terms of the number of buildings per square kilometer. * \(\gamma\) is a scale parameter that illustrates the distribution of building heights, using the Rayleigh probability density function. Using these parameters, the LoS probability equation between MD \(i\) and UAV-MEC server \(j\) can be represented as  
\[P(\text{LoS})=\prod_{n=0}^{m}\left(1-\exp\left(-\frac{\left(h_{\text{j}}-(n+ \frac{1}{2})\frac{\left(h_{\text{j}}-h_{\text{j}}\right)}{(m+1)}\right)^{2}}{ 2\gamma^{2}}\right)\right), \tag{8}\]  
with  
\[m=\left\lfloor(h_{\text{j}}-h_{\text{i}})tan\theta\sqrt{\alpha\beta-1}\right\rfloor, \tag{9}\]  
where the height of the transmitter (the UAV-MEC server) and the receiver (the MD) are denoted \(h_{j}\) and \(h_{i}\), respectively. It is important to mention that the system's frequency has no effect on the geometric LoS formula, and this formula can be represented by using the simple modified sigmoid function (S-curve), which significantly simplifies the calculation of the LoS probability. Moreover, the probability function for the LoS link using the S-curve can be represented as  
\[P(\text{LoS})=\frac{1}{1+a\exp(-b(\omega-a))}, \tag{10}\]  
where the propagation environment determines constants a and b, which represent various scenarios, including suburban, urban, dense urban, and high-rise urban zones; \(\omega=\arctan(\frac{h}{r_{ij}(I)})\) is the elevation angle between MD \(i\) and UAV-MEC server \(j\) in time slot \(t\) along the ellipsoidal trajectory. The probability function for establishing the NLoS link is then  
\[P(\text{NLoS})=1-P(\text{LoS}). \tag{11}\]  
Therefore, the probabilistic mean path loss of the system in time slot t can be expressed as  
\[PL_{i,j}(t))=P(\text{LoS})\times PL_{\text{LoS}}+P(\text{NLoS})\times PL_{ \text{NLoS}}. \tag{12}\]  
Now, using Equations (7), (10), and (11) in (12) and by applying basic algebraic operations, we have the following [44,46]:  
\[PL_{i,j}(t) =\frac{\eta_{\text{LoS}}-\eta_{\text{NLoS}}}{1+a\exp\left(-b \left(\arctan(\frac{h}{r_{ij}(I)})-a\right)\right)} \tag{13}\] Figure 1:0where \(r_{i,j}(t)=\sqrt{\left(x_{i}-x_{j}(t)\right)^{2}+\left(y_{i}-y_{j}(t)\right)^{2}}\). In our scenario, we assume the transmit power of each MD is the same.