The proliferation of wireless and mobile devices has fostered the demand of context aware applications. Location is one of the most significant contexts. Multilateration, as a basic building block of localization, however, have not yet overcome the challenges of (1) poor ranging measurement; (2) dynamic and noisy environments; (3) fluctuations in wireless communications. Hence, they often suffer poor accuracy and can hardly be employed in practical applications. In this study, we propose Quality of Trilateration (QoT) that quantifies the geometric relationship of objects and the ranging noise. Based on QoT, we design a confidence based iterative localization scheme, in which nodes dynamically select trilaterations with the highest quality for localization. To validate this design, a wireless sensor network prototype is deployed and results show that QoT well represents trilateration accuracy, and the proposed scheme significantly improve localization performances.