Battery-aware network discovery algorithm for mobile terminals within heterogeneous networks