Recent advancements in networking, micro-electromechanical systems technology and computing have made it possible to develop low-cost, low-power, multi-functional sensor nodes. Many potential applications are emerging: environment and habitat monitoring, infrastructure security and industry sensing. Most of these applications require sensor nodes know theirs position information to accomplish their respective tasks efficiently. Therefore, localization is one of the key issues in sensor networks. In this paper, we present an alternating combination trilateration algorithm based on relative position of sensor nodes and weighted polygon. This approach does not need a large amount of anchor nodes for achieving high estimation accuracy. Simulations show that this approach can significantly improve localization accuracy and it is robust to range measurement noise.