Source: https://www.ee.columbia.edu/~shane/projects/sensornet/part1.pdf