An Integrated Approach to the Design of Wireless Sensor Networks for Structural Health Monitoring