Location service design and simulation in ad hoc wireless sensor networks