1. A method for determining positions of nodes in a wireless sensor network (WSN), wherein the WSN includes an initial set of anchor nodes (anchors) at known locations, and a set of sensor nodes (sensors) at unknown locations, and wherein each sensor node includes a transceiver and a processor for performing steps of the method, comprising for each sensor node: estimating ranges to at least three of the anchors to determine, for each anchor, a position, an anchor ranging weight, and an anchor position weight; combining, for each anchor, the anchor ranging weight and the anchor position weight into a combined weight; minimizing a weighted least square (WLS) function for the positions and the combined weights of the at least three anchors to determine a position of the sensor, and a sensor position weight; identifying the sensor as being a member of a set of candidate anchor nodes; and selecting the candidate anchor node with a largest sensor position weight to be transformed to another anchor to minimize propagation of errors in the positions of the set of sensors.