Localization and network management in radio and underwater networks