## 5 Plume Navigation Model
### Male Navigation Algorithm  
As originally formulated, MothPy [75] focuses on the latter stage of the male search for a female. Male moths are initially stationary, positioned downwind of the female, and do not actively search for the plume. Rather, the plume will diffuse and be advected toward them. Once a sufficient amount of pheromone reaches the male moths, they start moving upwind, toward the female. Thus, the random flight mode described in Section 2.2 is not employed in MothPy. Conversely, our Plume Navigation Model considers a full night of calling where the male random flight mode is included and where several female strategies are implemented.  
We define our coordinate system \(\mathbf{x}=(x,y)\) with the female moth at the origin and several, noninteracting, male moths initially positioned downwind of her as shown in Figure 11A. In addition to male moth movement, we track the concentration of pheromone \(c(\mathbf{x},t)\) released by the female moth as it diffuses and is convected by wind. We assume that the wind velocity field \(\mathbf{U}\) is uniform along the positive \(x\) direction so that \(\mathbf{U}=(U(\mathbf{x},t),V(\mathbf{x},t))=(U,0)\), where \(U\) is a constant. Male moths are assumed to move at a constant flight speed \(v\) so that the motion of a moth at location \(\mathbf{x}=(x(t),y(t))\) is updated at every time step \(\Delta t\) via  
\[x(t+\Delta t) =x(t)+v\Delta t\cos\theta, \tag{20a}\] \[y(t+\Delta t) =y(t)+v\Delta t\sin\theta, \tag{20b}\]  
where \(\theta\in[0,2\pi)\) is the angular direction of moth movement, as measured from the \(x\) axis. Upwind movement thus occurs along \(\theta=\pi\), while casting occurs along \(\theta=\pm\pi/2\). We also assume that the pheromone plume can be sensed by a male moth only if it is locally present at a large enough threshold concentration \(C_{\text{tol}}\). The algorithm for updating \(\theta\) for a moth at position \(\mathbf{x}\) is as follows:  
* _Random flight_: If the male moth does not detect pheromone (\(c(\mathbf{x},t)<C_{\text{tol}}\)) and has never detected pheromone at earlier times \(t^{\prime}<t\), the moth chooses a random direction \(\theta\) drawn uniformly from \([0,2\pi)\). Note that this motion implies that, overall, the moth executes a random flight with effective diffusivity \(D\simeq v^{2}\Delta t/4\). For the experimentally measured male flight speeds reported in Section 2.2, \(v=0.5\) to \(5\) m/s, and for \(\Delta t=1\) s, this corresponds to \(D\simeq 1\) to \(10^{-2}\) m\({}^{2}\)/s.
* _Surging:_ Upon detection of pheromone signals for \(c(\mathbf{x},t)\geq C_{\text{tol}}\), the moth will align with the upwind direction of airflow (\(\theta=\pi\)) with a margin of error \(\epsilon\). The updated direction of moment \(\theta\) will be selected uniformly from \((\pi-\epsilon,\ \pi+\epsilon)\) at each timestep.
* _Casting:_ Upon loss of contact with the pheromone plume for \(c(\mathbf{x},t)<C_{\text{tol}}\), the moth will search for the plume perpendicular to the direction of airflow (\(\theta=\pm\pi/2\)) with a margin of error \(\epsilon\). The updated direction of movement \(\theta\) will be selected uniformly in \((-\pi/2-\epsilon,\ -\pi/2+\epsilon)\) or in \((\pi/2-\epsilon,\ \pi/2+\epsilon)\) at each timestep. If the male moth is unable to find the lost pheromone plume after casting for a given time \(t_{\text{cast}}\), it returns to random flight mode. Otherwise, it returns to surging. Typical total casting times are on the order of \(10\) s ([PERSON] et al. [20]), so we choose \(t_{\text{cast}}=10\) s.
* _Mating:_ Once the male moth is within a radius \(r_{\text{cap}}\) of a female, the two successfully mate.  
Example male moth trajectories exhibiting each movement mode (random flight, surging, casting, and mating) are shown as colored trajectories in Figure 11B.