| Algorithm 1 Encoding strategy at the source node |
| 1: Destination nodes obtain the value of current signal strength . 2: Destination nodes send packets pkg1 to the source node . 3: receives some packets pkg1 from the destination nodes. |
| 4: obtains the value of from pkg1. 5: works out the mean value Avg of V. 6: If |
| 7: Set the redundancy value to 0. 8: Else 9: Set the redundancy value to (−60−Avg)/20. |
| 10: Endif |
| 11: divides a data frame into slices. |
| 12: generates a –by- random matrix . 13: generates encoded data with and . 14: The encoded packets consisting of row vectors of and will be generated. 15: sends encoded packets to the network. |