Skip to main content
. 2020 Apr 16;20(8):2254. doi: 10.3390/s20082254
Algorithm 3 Decoding strategy at the destination node
1: Destination node D receives a packet pkg3.
2: D gets frame number N from pkg3.
3: If N==DFlag
4:    D discards pkg3.
5:  Else
6:    D gets row vector Pi and coded data slice Yi from pkg3.
7:    If N==Flag
8:      r1=rank(G)
9:      r2=rank(PiG)
10:      If r2>r1 do
11:        Put Pi into G
12:        Put Yi into existing encoded data H.
13:        Count++;
14:        If Count==K
15:          D calculates the inverse matrix G1 of G.
16:          D uses G1 to decode H into raw data P.
17:          D sends P to the play module.
18:          DFlag=N
19:        Endif
20:      Endif
21:    Else
22:      Flag=N
23:        D gets K from pkg3.
24:        Clear matrix G and encoded data H
25:        Count=0
26:        goto step 6
27: Endif