Mitigating the effect of propagation impairments on higher layer protocols and algorithms in wireless sensor networks