Optimizing lifetime for continuous data aggregation with precision guarantees in wireless sensor networks