A 2 D positioning system using WSNs in indoor environment