## 3 Methods
### Fire Point Location  
In the forest fire detection application, UAV swarms usually use a clustering network to transmit information [29; 30; 31]. The cluster head UAV needs to achieve rapid maneuvers, locate the fire point, and transmit the fire location to other UAVs. Therefore, in complex mountain forest environments, excellent UAV path planning algorithms are necessary to achieve rapid positioning of forest fires. The particle swarm optimization algorithm has been widely used in UAV path planning due to its fast convergence speed and easy implementation. The particle swarm optimization algorithm utilizes points in the search space to simulate individuals in natural bird flocks. The foraging behavior process is likened to the iterative process of optimizing feasible solution transformations. The search process primarily relies on the fitness function for evolution without external information. Each individual approaches the optimal solution based on its individual extreme value and global extreme value. The particle swarm optimization algorithm supposes there is a particle population with a size \(M\) and an \(N\)-dimensional space search area, denoted as \(\mathbf{X}=[\mathbf{x}_{1},\dots,\mathbf{x}_{i},\dots,\mathbf{x}_{M}]^{T}\). The \(i_{th}\) particle location can be described as \(\mathbf{x}_{i}=[x_{i1},\dots,x_{i2},\dots,\)\(x_{iN}]^{T}\), and its speed, that is, the distance the particle moving in each iteration can be expressed as \(\mathbf{v}_{i}=[v_{i1},\dots,v_{i2},\dots,v_{iN}]^{T}\). When the \(i_{th}\) particle passes through the position with the best fitness, the individual extreme value can be denoted as \(\mathbf{P}_{i}=[p_{i1},\dots,p_{i2},\dots,\)\(p_{iN}]^{T}\). When the entire population searches for the position with the best fitness, the global extreme value can be expressed as \(\mathbf{P}_{g}=\big{[}p_{g1},\dots,p_{g2},\dots,p_{gN}\big{]}^{T}\). The feasible solution to the optimization problem is the position of the optimized particle. Each iteration of the particle updates its position and velocity according to the following equations:  
\[v_{id}^{k+1}=w\mathbf{v}_{id}^{k}+c_{1}r_{1}\Big{(}p_{id}^{k}-x_{id}^{k}\Big{)}+c_{ 2}r_{2}\Big{(}p_{gd}^{k}-x_{gd}^{k}\Big{)} \tag{2}\]  
\[x_{id}^{k+1}=x_{id}^{k}+v_{id}^{k+1} \tag{3}\]  
where \(\mathbf{v}_{i}^{k}\) is the speed of the \(i_{th}\) particle in the \(k_{th}\) iteration, \(v_{id}^{k}\) is the \(d_{th}\) dimension component of \(\mathbf{v}_{i}^{k}\), \(\mathbf{x}_{i}^{k}\) is the position of the \(i_{th}\) particle in the \(k_{th}\) iteration, \(x_{id}^{k}\) is the \(d_{th}\) dimension component of \(\mathbf{x}_{i}^{k}\), \(\mathbf{p}_{i}^{k}\) is the individual extreme value of the \(i_{th}\) particle in the \(k_{th}\) iteration, \(p_{id}^{k}\) is the \(d_{th}\) dimension component of \(\mathbf{p}_{i}^{k}\), \(\mathbf{p}_{g}^{k}\) is the global extreme value of the particle swarm in the \(k_{th}\) iteration, \(p_{gd}^{k}\) is the \(d_{th}\) dimension component of \(\mathbf{p}_{g}^{k}\), \(w\) is inertia weight, \(c_{1}\) is the individual learning factor, \(c_{2}\) is the group learning factor, \(r_{1}\) and \(r_{2}\) are random numbers uniformly distributed between \([0,1]\), \(1\leq i\leq M\), \(1\leq d\leq N\). In the UAV swarm applied to forest fire detection, the PSO algorithm is employed to find the particle locations of the optimal flight path of the UAVs. The fitness function of PSO is used to calculate the distance from the starting point position to the particle position and then to the ending point position, which determines the direction of the updated iteration of the particle positions.