Wireless ad hoc networks are the solution for providing network connectivity in challenging environments with a lack or absence of infrastructure. Data transmission in such networks typically adopts geographic routing protocols, which use geographic coordinates as addresses of network devices. However, geographic coordinates are not always obtainable, as traditional localization systems (GNSS, Wi-Fi, terrestrial infrastructure) might not be available due to signal loss. In this paper, we propose a method that assigns virtual coordinates to network nodes, which can be used as input for geographic routing protocols. The numerical results demonstrate the high topological similarity between the physical and the virtual network. Our method exhibits convergence advantages over conventional approaches and outperforms them in terms of the total number of discovered paths.