Hi, all What's the relationship of Pt_ and Pt_consume_? I know when a node receive a packet, it will calculate Pr according to Pt_, then decide whether successfully capture this packet. If I calculate "txPower" according to the distance between two nodes, and replace the Pt_ then the transmission range will be changed. But how much energy should be decreased also should be changed, which is implemented in function "em()->DecrTxEnergy(actual_txtime, Pt_consume_)". Then should we use "(txPower/Pt_)*Pt_consume_" to replace "Pt_consume_" or some other functon? Thanks in advance, Pei
--------------------------------- 抢注雅虎免费邮箱-3.5G容量,20M附件!