View full-text article in PMC Sensors (Basel). 2022 Sep 15;22(18):6980. doi: 10.3390/s22186980 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 3 get_node Input: row, temp_adj_mat Output: related_rows 1:if row.s_id∈nodes_ids then 2: Find the nearest node in nodes[row.s_id] with t < sim_max_delay 3: if nearest_node exists then 4: return nearest_node 5: end if 6:else 7: row.id←size(nodes_ids) 8: Append row to nodes[row.s_id] and nodes_ids 9: Add 1 empty row and 1 empty column to adj_mat and temp_adj_mat 10: return row 11:end if