Source code for the paper: Y.W. Law et al., "Energy-efficient data acquisition by adaptive sampling for wireless sensor networks," in Proceedings of the 2009 International Conference on Wireless Communications and Mobile Computing: Connecting the World Wirelessly (IWCMC ’09), pages 1146–1151, ACM, 2009.