Cluster-Based Ranging for Accurate Localization in Wireless Sensor Neworks