Localization using neural networks in wireless sensor networks