Fundamentals of Wireless Sensor Networks: Theory and Practice