## 4 Angle Selection and Ray Categorization
### The Effect of Angle and Depth Errors  
The categorization algorithm presented in Section 4.6, utilizes the angle of transmission to estimate the ray type. Since a node starts by orienting itself, i.e., finds the vertical axis, and then extrapolates the horizontal axis, any error in determining the vertical axis will affect the accuracy of the transmission angle. If we denote the error in obtaining the vertical axis by \"\(e\)\", the error in calculating \(c_{LEP}\) from Equation (4) is given by:  
\[c_{LEP}=\frac{c_{T}}{\cos(\phi_{T}+e)} \tag{7}\]  
Using simple trigonometric function, the denominator can be rewritten as \(\cos(\phi_{T}+e)=\cos(\phi_{T})\cos(e)-\sin(\phi_{T})\sin(e)\). Moreover, since the value of \(e\) is assumed to be small, we can approximate \(\cos(e)=1\) and \(\sin(e)=0\) and write the denominator as \(\cos(\phi_{T})+e\sin(\phi_{T})\). Finally, since the value of \(\sin(\phi_{T})\) cannot grow more than one, the worst error can be expressed as follows:  
\[c_{LEP}=\frac{c_{T}}{\cos(\phi_{T})+e} \tag{8}\]  
Thus, the error in the angle can be viewed as an additive error to the cosine of that angle. In Section 5.2, we provide a plot that shows the error trend when a gaussian error is superimposed on the actual angle value.  
The error introduced when the depth is inaccurately measured has a very different pattern. Basically, the error in the depth directly affects the position of \(x_{LEP}\). Since our algorithm utilizes Equation (5) or (6) to determine the distance to the LEP, we discuss the error in each equation separately. Through Equation (5), a node concludes that a differentiable LEP is not possible and hence resorting to the straight-line model is necessary. If we replace the value of \(z_{T}\) with the erroneous depth, i.e., \(z_{Te}=z_{T}+e\) where \"\(e\)\" is the error observed in the depth, the error term can be extracted and is found to be additive, where the value of the additive error is given by \(\left(e\times\tan^{-1}\phi_{T}\right)\). Thus, the error in this situation will be scaled by the value suggested by the inverse tangent function and is dependent on the angle of transmission. On the other hand, Equation (6) assumes that the ray is refracting and hence a different error pattern is determined. Since only the fraction shown in Equation (6) contains the value of \(z_{T}\), we focus our attention on the fraction since all other parameters will not be affected. By substituting the value of \(z_{Te}=z_{T}+e\) into \(z_{T}\), one can show that the error term generated will be an additive error with a value given by:  
\[\text{Depth}-\text{caused Error}=\frac{e}{\left(\frac{c_{LEP}}{c_{T}}-1 \right)\cos(\phi_{T})} \tag{9}\]  
Moreover, since the temperature in underwater environment is limited between 30 \({}^{\circ}\)C and \(-1.7\)\({}^{\circ}\)C, the achievable SS values in practical oceanic environments are limited within the interval \(c_{int}=[1400,1580]\) (m/s) [29]. Using such limits in Equation (4) yields a maximum angle of transmission of \(27.6^{\circ}\) to have a LEP. Furthermore, the ratio \(\left(c_{LEP}/c_{T}\right)\) is always greater than one since \(c_{LEP}\) must be greater than \(c_{T}\) to achieve a LEP. Using the values within \(c_{int}\) we can obtain a maximum value for the ratio in actual underwater conditions and show that it cannot grow beyond 1.13. Coupling all the information above, a maximum bound on the depth-caused error is given by \(8.77\times e\) in actual sea water conditions. Thus, when determining the value of \(x_{LEP}\) for a differentiable LEP and if an error equivalent to \"\(e\)\" is experienced in determining the depth, the position of \(x_{LEP}\) will face a maximum error of \(8.77\times e\).