## 4 Angle Selection and Ray Categorization
### Node Orientation  
Since angle of arrival (AoA) based ranging techniques utilizes the angles to obtain the range in a distributed manner, all nodes within an AUN ought to have a sense of orientation relative to the sea surface and bottom. Basically, nodes individually need to infer a depth axis from which they will measure AoA angles. Therefore, after deployment and selecting the feasible angles to avoid shadow and overlapping regions, a node utilizes the natural forces of buoyancy and gravity to roughly orient itself and obtain the positive direction of the vertical axis denoted by \(z\)-axis [27]. Since using buoyancy and gravity orientation is subject to errors, an error mitigation mechanism is required to accurately determine the vertical direction, i.e., the \(z\)-axis. In our approach, nodes leverage the selected set of beams \(\kappa\) to refine the orientation of a node, as explained next. Figure 4: Transmission sphere segmentation using a geodesic grid; (**a**) an icosahedron inscribed on a circle, (**b**) subdivided icosahedron by bisecting each triangle and projecting onto the sphere generates pentagons, shown in light blue, and hexagons, and (**c**) a rotated and scaled version of the Voronoi polygon. Let us assume that node \(n_{a}\) picks \(q\) distinct transmission channels where \(|\kappa|=q\). Then, beacons are transmitted on every channel such that each beacon has a fixed phase \((\rho_{0})\) and is appended by a unique identifier. Once all messages are transmitted, \(n_{a}\) enters a listening phase where it is particularly interested in receiving a reflected version of its transmitted message from the same angle it was transmitted on. Basically, identifying a reflected signal is a two-step process where first \(n_{a}\) compares the identifier extracted from the received reflected signal to that of the transmitted message in the same direction. Since the underwater medium is inhomogeneous and non-symmetrical in general, only reflected signal from the sea surface, sea bottom and nearby obstacles are envisaged to bounce back to the transmitter. Moreover, the surface and bottom reflections will be limited to those beams incorporating a ray that is perpendicular to both the underwater layer boundaries and the bouncing surfaces; this is because any inclination of the ray will be amplified by both refraction and surface reflection and will cause the ray to divert away from the sender, especially for deep water scenarios as shown in Figure 5.  
When \(n_{a}\) confirms the reception of a reflected message, it calculates the distance to the object \((z_{TOF})\) causing the reflection by factoring in the ToF and the measured SS in its vicinity. Then, \(n_{a}\) computes the phase shift experienced by the received signal \((\rho_{r})\) and stores \((z_{TOF},\theta_{T},\rho_{r})\) in a candidate list where \(\theta_{T}\) corresponds to the transmission angle of that beam. After accounting for all reflected signals, node \(n_{a}\) utilizes the pressure sensor to estimate the depth \(\left(z_{p}\right)\) and looks for the best match within the candidate list where \(\rho_{T}\approx\pi\) and \(z_{TOF}\approx z_{p}\). The best match should also have a direction that is close to the one found by the natural forces of buoyancy and gravity. Once a match is found, \(n_{a}\) regards the center angle of that beam as the initial direction to the surface \((z_{i})\), as shown in Figure 6. Note that a transmitted beam is envisioned as a collection of rays that form a conical shape initiating at \(n_{a}\). Moreover, if a match was not found in the candidate list that represents the surface reflection, but a bottom reflection was found, the node utilizes the bottom reflection in a similar fashion to fork a negative and then positive \(z\)-axis.