Cross-layer design and analysis of WSN-based mobile target detection systems