Barrier Coverage in Wireless Sensor Networks