Wireless sensor networks (WSNs) have gained researchers' attention in the last several years. Wireless sensor network localization is the process of determining the location of nodes in a wireless sensor network (WSN) and it is very important task, which involves collaboration between different sensor nodes. It is important to many applications and to the network main functions, such as: routing, communication, cluster creation, network coverage, etc. Localization is an interesting research area, and many works have been done so far. But a little work in this area has been done using NS-2. The difficulties of setting up a WSN with real nodes and the infeasibility of analysis make simulation an essential tool to study WSNs. NS-2 has several tools and modules that researchers can use to develop localization schemes either by modifying the existing modules or creating new ones. The objectives of this book are to extend and add new modules to NS-2 so as to implement localization algorithm (e.g. centroid) then evaluating its performance according to certain performance metrics.