A Node Localization Algorithm for Wireless Sensor Networks Using Distance Clustering to Select the Anchor Nodes