## 4 Angle Selection and Ray Categorization
### Ray Classification and Selection  
The proposed ray classification process enables nodes in an AUN to associate established links to the ray types identified in Section 4.5, namely direct, reflected and refracted rays facing LEPs. Since the classification process utilizes the neighbor coordinates in inferring the ray type, nodes go through some ranging and localization algorithm [9; 11; 18] to obtain a relative map to neighbors. Once localized, nodes apply Algorithm 1 to infer the type of ray based on the approximated propagation path. According to Algorithm 1, node \(n_{T}\) utilizes the angle of departure and the measured SS reading \((c_{T})\) to infer the SS value at the first possible LEP \((c_{LEP})\). To infer the value of SS at the LEP point, nodes start by assuming that the ray is purely refracted where the steps taken will gauge the validity of such an assumption. Since the gazing angle at the LEP point must be zero, i.e., \(\phi_{LEP}=0\), the law of refraction can be used to obtain the value of \(c_{LEP}\) as follows:  
\[c_{LEP}=\frac{c_{T}}{\cos\phi_{T}} \tag{4}\]  
Node \(n_{T}\) considers the SSP of the region from its depth till the depth of the surface facing the transmission angle, and searches for the value of \(c_{LEP}\). If \(c_{LEP}\) is larger than the maximum value within the SSP of the considered region, node \(n_{T}\) concludes that a reflection is inevitable and falsifies the assumption of having a purely refracted ray. In such a case, node \(n_{T}\) utilizes a straight-line propagation path to estimate the location of the LEP as expressed below:  
\[x_{LEP}=x_{T}+\frac{|z_{LEP}-z_{T}|}{\left|\tan\phi_{T}\right|} \tag{5}\]  
where \(z_{LEP}\) in the above equation is either zero or the depth of the seabed depending on the surface the transmission angle is facing. Although the use of the straight-line propagation model does not factor in medium inhomogeneity, it suffices in identifying the type of received ray within a range of 5 km as will be shown in Section 5.2. On the other hand, if \(c_{LEP}\) is lower than the maximum value found in the SSP of the considered region, node \(n_{T}\) confirms its assumption of purely refracted ray and extracts the \(z\)-coordinate of the LEP \((z_{LEP})\). Node \(n_{T}\) then factors its depth \((z_{T})\) and the corresponding measured value \((c_{T})\) to compute the SS gradient of the layer enclosing both pairs and the transmitted ray, i.e., \(g=(c_{T}-c_{LEP})/(z_{T}-z_{LEP})\). Once the gradient is obtained, a node employs Equations (2) and (3) to deduce a radius \((R_{LEP})\). Then, the \(x_{LEP}\) for refracted rays facing a differentiable LEP can be found by using simple trigonometry manipulations, as illustrated in Figure 9. Essentially, nodes regard the depth in the interval \([z_{T},z_{LEP}]\) as a single layer and find the circular arc that approximates the signal propagation path. Since the transmission angle forms a tangent to the estimated circular propagation path and due to the fact that the tangent is perpendicular to the line connecting the node to the center of the circle, the center of the circle can be uniquely identified. Moreover, since the gazing angle is zero at the LEP point, the line connecting the LEP point and the center of the circular arc is always parallel to the \(z\)-axis. Thus, \(x_{LEP}\) can be mathematically expressed as follows:  
\[x_{LEP}=x_{T}+\left|\frac{c_{T}(z_{LEP}-z_{T})}{(c_{LEP}-c_{T})\cos(\phi_{T})} \right|\cos(90-\left|\phi_{T}\right|) \tag{6}\]Once the value of \(x_{LEP}\) is determined either by using Equation (5) or (6), node \(n_{T}\) compares the coordinate of node \(n_{R}=(x_{R},z_{R})\) to the LEP coordinate. If the node lies before the first LEP, i.e., \(x_{R}\leq x_{LEP}\), a direct ray is deduced. On the other hand, if \(x_{R}>x_{LEP}\) the node attempts to find the coordinate of the next LEP and repeats the process until the \(x\)-coordinate of the LEP grows more than the \(x_{R}\). The node then notes the number of LEP required before reaching \(x_{R}\).