| Algorithm 3. Node type determination |
| //avg_rssi indicates the average of RSSIs //avr_snr indicates the average of SNRs 1: At an Orphan node that receives k TCRs, k > 1: 2: calculate avg_rssi and avg_snr with multiple TCRs; 3: determine nodeType using avg_rssi and avg_snr as follows: 4: if avg_rssi ≥ RSSI_Th1 and avg_snr ≥ SNR_Th1 then 5: nodeType = 1HopR; 6: else if avg_rssi ≥ RSSI_Th2 and avg_snr ≥ RSSI_Th2 then 7: nodeType = 1Hop; 8: else 9: nodeType = 2HopCan; |