Location-Aware Source Routing Protocol for Underwater Acoustic Networks of AUVs
Algorithm 3
A simplified version of the algorithm used to merge the link data from the link cache and the tracking system. At the conclusion of the merge, contains the merged link table.
Links are sorted into ascending order of the node IDs of their endpoints.
SORT-PREDICTED-LINKS ()
(2) SORT-CACHED-LINKS ()
Initialize the temporary merged link table.
(3)
POP removes and returns the head element.
(4) POP()
(5) POP()
Loop until both link tables are empty.
(6) whileor
(7) ifthen
They represent the same link. Choose one based on origin and age.