Optimized localization in large-scale heterogeneous WSN