A distributed localization protocol for wireless sensor networks